Function at 0x40c360
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x462040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x14], edx
xor ebx, ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 8], edi
mov esi, eax
test eax, eax
je 0x40c77e
lea ecx, [edi + 3]
mov dword [ebp - 0x10], 5
nop word [eax + eax]
mov dword [ebp - 0xc], 0x62eb20
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c3f2
add eax, 2
add eax, edi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c3cd
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x40c48f
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c3eb
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40c3d3
jmp 0x40c48f
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c403
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40c43d
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 3]
add ecx, 2
imul ecx, eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
test al, 1
jne 0x40c48f
mov ecx, 5
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c430
dec eax
jmp 0x40c431
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40c420
jmp 0x40c48f
mov eax, dword [ebp - 0xc]
mov ecx, 5
cdq
idiv ecx
test edx, edx
je 0x40c48f
mov eax, dword [ebp - 0xc]
lea ecx, [edi + 0x17]
add eax, 0xb
cdq
idiv ecx
mov ecx, 3
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
jne 0x40c48f
nop word [eax + eax]
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c481
inc eax
jmp 0x40c482
dec eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
je 0x40c470
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
push esi
add eax, ebx
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c7e1
cmp dword [ebp - 8], 0
je 0x40c7e1
mov dword [ebp - 0xc], 0x62eb20
mov ecx, 3
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
je 0x40c56f
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add eax, 2
add eax, ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c4f0
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x40c50c
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c50a
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40c4f2
mov ecx, 3
add ebx, dword [ebp - 8]
mov dword [ebp - 0xc], 0x62eb20
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c624
add eax, 2
add eax, ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c545
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x40c676
nop dword [eax + eax]
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c568
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40c550
jmp 0x40c676
mov eax, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c583
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40c5c7
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add ecx, 2
add eax, 3
imul eax, ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
jne 0x40c50c
mov ecx, 5
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c5b7
dec eax
jmp 0x40c5b8
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40c5a7
jmp 0x40c50c
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x10]
test edx, edx
je 0x40c511
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
add eax, 0xb
cdq
add ecx, 0x17
idiv ecx
mov ecx, 3
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
jne 0x40c511
nop dword [eax + eax]
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c611
inc eax
jmp 0x40c612
dec eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
je 0x40c600
jmp 0x40c511
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c635
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40c6cf
mov ecx, dword [ebp - 0xc]
lea eax, [ebx + 3]
add ecx, 2
imul ecx, eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
test al, 1
jne 0x40c671
mov ecx, 5
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c666
dec eax
jmp 0x40c667
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40c656
mov ecx, 3
add edi, dword [ebp - 8]
mov dword [ebp - 0xc], 0x62eb20
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c724
add eax, 2
add eax, esi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c6aa
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x40c772
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c6c8
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40c6b0
jmp 0x40c772
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x10]
test edx, edx
je 0x40c676
mov eax, dword [ebp - 0xc]
lea ecx, [ebx + 0x17]
add eax, 0xb
cdq
idiv ecx
mov ecx, 3
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
jne 0x40c676
nop dword [eax]
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c711
inc eax
jmp 0x40c712
dec eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
je 0x40c700
jmp 0x40c676
mov eax, dword [ebp - 0xc]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40c735
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40c794
mov ecx, dword [ebp - 0xc]
lea eax, [esi + 3]
add ecx, 2
imul ecx, eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
test al, 1
jne 0x40c76d
mov ecx, 5
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c762
dec eax
jmp 0x40c763
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40c752
mov ecx, 3
sub esi, dword [ebp - 8]
cmp edi, dword [ebp + 8]
jne 0x40c3a0
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00434f21
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x10]
test edx, edx
je 0x40c772
mov eax, dword [ebp - 0xc]
lea ecx, [esi + 0x17]
add eax, 0xb
cdq
idiv ecx
mov ecx, 3
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
jne 0x40c772
nop dword [eax]
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40c7d1
inc eax
jmp 0x40c7d2
dec eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
je 0x40c7c0
jmp 0x40c772
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00434f21
mov esp, ebp
pop ebp
ret