Function at 0x402140
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41cd00
mov eax, dword fs:[0]
push eax
sub esp, 0x274
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x240], ecx
mov eax, dword [ebp + 0xc]
xor esi, esi
mov edx, dword [ebp + 8]
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x264], eax
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x274], ebx
mov dword [ebp - 0x270], edi
mov dword [ebp - 0x24c], esi
mov dword [ebp - 0x26c], esi
mov dword [ebp - 4], esi
test edx, edx
je 0x402467
mov eax, dword [edx]
lea ecx, [ebp - 0x25c]
push ecx
push edx
call dword [eax + 0x38]
test eax, eax
jne 0x402467
nop dword [eax + eax]
mov eax, dword [ebp - 0x25c]
lea edx, [ebp - 0x258]
push edx
lea edx, [ebp - 0x224]
push edx
mov ecx, dword [eax]
push 5
push eax
call dword [ecx + 0x1c]
mov dword [ebp - 0x264], eax
xor eax, eax
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x258], eax
jbe 0x4022fd
nop word [eax + eax]
lea ecx, [ebp - 0x224]
lea eax, [ecx + eax*4]
mov dword [ebp - 0x27c], eax
lea edx, [ebp - 0x250]
mov eax, dword [eax]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
test eax, eax
jne 0x4022d6
nop word [eax + eax]
mov eax, dword [ebp - 0x250]
lea edx, [ebp - 0x23c]
push edx
lea edx, [ebp - 0x238]
push edx
mov ecx, dword [eax]
push 5
push eax
call dword [ecx + 0x1c]
xor ebx, ebx
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x23c], ebx
jbe 0x4022c2
mov eax, dword [ebp - 0x24c]
lea esi, [ebp - 0x238]
cmp edi, eax
je 0x402291
mov eax, dword [esi]
mov dword [edi], eax
add edi, 4
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x270], edi
jmp 0x4022b0
push esi
push edi
lea ecx, [ebp - 0x274]
call fcn.00404f30
mov eax, dword [ebp - 0x26c]
mov edi, dword [ebp - 0x270]
mov dword [ebp - 0x24c], eax
inc ebx
add esi, 4
cmp ebx, dword [ebp - 0x23c]
jb 0x402278
mov eax, dword [ebp - 0x278]
test eax, eax
je 0x402240
mov eax, dword [ebp - 0x250]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x27c]
mov eax, dword [eax]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x254]
inc eax
mov dword [ebp - 0x254], eax
cmp eax, dword [ebp - 0x258]
jb 0x402210
cmp dword [ebp - 0x264], 0
je 0x4021d0
mov eax, dword [ebp - 0x25c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ebx, dword [ebp - 0x274]
lea eax, [ebp - 0x244]
push 0
push eax
push 4
lea eax, [ebp - 0x248]
sub edi, ebx
push eax
mov eax, dword [ebp - 0x240]
sar edi, 2
mov dword [ebp - 0x248], edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [eax + 0x18]
call edi
xor esi, esi
cmp dword [ebp - 0x248], esi
jbe 0x40243c
nop dword [eax + eax]
mov eax, dword [ebx + esi*4]
cdq
mov dword [ebp - 0x268], eax
lea eax, [ebp - 0x244]
push 0
push eax
push 8
lea eax, [ebp - 0x268]
mov dword [ebp - 0x264], edx
push eax
mov eax, dword [ebp - 0x240]
push dword [eax + 0x18]
call edi
mov eax, dword [ebx + esi*4]
lea edx, [ebp - 0x280]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
push 0
lea eax, [ebp - 0x244]
push eax
push 8
lea eax, [ebp - 0x280]
push eax
mov eax, dword [ebp - 0x240]
push dword [eax + 0x18]
call edi
mov eax, dword [ebx + esi*4]
lea edx, [ebp - 0x210]
push edx
lea edx, [ebp - 0x23c]
push edx
mov ecx, dword [eax]
push 0xff
push eax
call dword [ecx + 0x18]
test eax, eax
jne 0x4023e4
mov eax, dword [ebp - 0x23c]
add eax, eax
jmp 0x4023e6
xor eax, eax
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x244]
push 0
push eax
push 4
lea eax, [ebp - 0x23c]
push eax
mov eax, dword [ebp - 0x240]
push dword [eax + 0x18]
call edi
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x40242f
push 0
lea ecx, [ebp - 0x244]
push ecx
push eax
lea eax, [ebp - 0x210]
push eax
mov eax, dword [ebp - 0x240]
push dword [eax + 0x18]
call edi
inc esi
cmp esi, dword [ebp - 0x248]
jb 0x402360
mov esi, dword [ebp - 0x24c]
test ebx, ebx
je 0x402494
sub esi, ebx
mov eax, ebx
and esi, 0xfffffffc
cmp esi, 0x1000
jb 0x40248a
mov ebx, dword [eax - 4]
add esi, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4024b2
jmp 0x40248a
push 0
lea eax, [ebp - 0x244]
push eax
push 4
lea eax, [ebp - 0x248]
push eax
mov eax, dword [ebp - 0x240]
push dword [eax + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x402442
push esi
push ebx
call fcn.0040513c
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004050db
mov esp, ebp
pop ebp
ret 8
call fcn.004102d2
int3