Function at 0x402140
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41cac0
mov eax, dword fs:[0]
push eax
sub esp, 0x274
mov eax, dword [0x426004]
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 ebx, ecx
mov dword [ebp - 0x240], ebx
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x264], eax
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x274], 0
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x24c], ecx
mov dword [ebp - 0x26c], ecx
mov dword [ebp - 4], ecx
test edx, edx
je 0x402481
mov eax, dword [edx]
lea ecx, [ebp - 0x25c]
push ecx
push edx
call dword [eax + 0x38]
test eax, eax
jne 0x402481
xor edi, edi
mov dword [ebp - 0x270], edi
nop word [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 0x40230d
nop word [eax + eax]
lea ecx, [ebp - 0x224]
lea eax, [ecx + eax*4]
mov ecx, dword [eax]
lea edx, [ebp - 0x250]
mov dword [ebp - 0x27c], eax
push edx
push ecx
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
jne 0x4022e6
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 0x4022d2
mov eax, dword [ebp - 0x24c]
lea esi, [ebp - 0x238]
cmp edi, eax
je 0x4022a1
mov eax, dword [esi]
mov dword [edi], eax
add edi, 4
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x270], edi
jmp 0x4022c0
push esi
push edi
lea ecx, [ebp - 0x274]
call fcn.00404d00
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 0x402288
mov eax, dword [ebp - 0x278]
test eax, eax
je 0x402250
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 0x402220
cmp dword [ebp - 0x264], 0
je 0x4021e0
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 0x40244c
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 0x4023f4
mov eax, dword [ebp - 0x23c]
add eax, eax
jmp 0x4023f6
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 0x40243f
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 0x402370
test ebx, ebx
je 0x40249c
mov ecx, dword [ebp - 0x24c]
mov eax, ebx
sub ecx, ebx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x402475
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4024ba
push ecx
push ebx
call fcn.0040513c
add esp, 8
jmp 0x40249c
push 0
lea eax, [ebp - 0x244]
push eax
push 4
lea eax, [ebp - 0x248]
push eax
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
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.0040ff47
int3