Function at 0x402c70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x370
mov eax, dword [0x425004]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x350], eax
mov ecx, dword [ebp + 8]
push edi
mov dword [ebp - 0x344], ecx
push ecx
mov ecx, ebx
call fcn.00402380
mov edi, eax
mov dword [ebp - 0x338], edi
test edi, edi
je 0x403042
mov ecx, dword [edi]
lea eax, [ebp - 0x318]
push eax
push 0
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x324], 0
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x324]
mov dword [ebp - 0x318], 0
push eax
push edi
call dword [ecx + 0x48]
mov eax, dword [edi]
lea ecx, [ebp - 0x318]
push ecx
push dword [ebp - 0x324]
push edi
call dword [eax + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x310]
push 0
push eax
push 4
lea eax, [ebp - 0x318]
push eax
push dword [ebx + 0x18]
call esi
mov eax, dword [edi]
lea ecx, [ebp - 0x318]
push ecx
push 0x20
lea ecx, [ebp - 0x30c]
push ecx
push dword [ebp + 0x10]
lea ecx, [ebp - 0x324]
push ecx
push edi
call dword [eax + 0x48]
cmp dword [ebp - 0x318], 0
mov dword [ebp - 0x34c], eax
mov dword [ebp - 0x334], 0
jbe 0x403029
lea edi, [ebp - 0x30c]
mov dword [ebp - 0x32c], edi
nop
push 0
lea eax, [ebp - 0x310]
mov dword [ebp - 0x328], 0
push eax
push 4
push edi
push dword [ebx + 0x18]
xorps xmm0, xmm0
mov dword [ebp - 0x320], 0
movlpd qword [ebp - 0x35c], xmm0
movlpd qword [ebp - 0x354], xmm0
call esi
mov ecx, dword [ebp - 0x338]
lea edx, [ebp - 0x340]
push edx
lea edx, [ebp - 0x360]
mov dword [ebp - 0x31c], 0
push edx
mov eax, dword [ecx]
lea edx, [ebp - 0x364]
push edx
lea edx, [ebp - 0x368]
push edx
lea edx, [ebp - 0x33c]
push edx
lea edx, [ebp - 0x31c]
push edx
push 0xff
lea edx, [ebp - 0x20c]
push edx
lea edx, [ebp - 0x36c]
push edx
push dword [edi]
push ecx
call dword [eax + 0x78]
mov eax, dword [ebp - 0x31c]
add eax, eax
push 0
mov dword [ebp - 0x31c], eax
lea eax, [ebp - 0x310]
push eax
push 4
lea eax, [ebp - 0x31c]
push eax
push dword [ebx + 0x18]
call esi
push 0
lea eax, [ebp - 0x310]
push eax
push dword [ebp - 0x31c]
lea eax, [ebp - 0x20c]
push eax
push dword [ebx + 0x18]
call esi
push 0
lea eax, [ebp - 0x310]
push eax
push 4
lea eax, [ebp - 0x33c]
push eax
push dword [ebx + 0x18]
call esi
push 0
lea eax, [ebp - 0x310]
push eax
push 4
lea eax, [ebp - 0x340]
push eax
push dword [ebx + 0x18]
call esi
mov ecx, dword [ebp - 0x344]
lea edx, [ebp - 0x328]
push edx
push dword [edi]
mov eax, dword [ecx]
push ecx
call dword [eax + 0x24]
test eax, eax
jne 0x402f78
mov eax, dword [ebp - 0x328]
lea edx, [ebp - 0x314]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
test eax, eax
jne 0x402eae
mov eax, dword [ebp - 0x314]
lea edx, [ebp - 0x35c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x314]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x328]
lea edx, [ebp - 0x314]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test eax, eax
jne 0x402f78
mov eax, dword [ebp - 0x314]
lea edx, [ebp - 0x354]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x314]
lea edx, [ebp - 0x330]
push edx
push 0x41d3f0
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
jne 0x402f6c
push 0x80
push eax
lea eax, [ebp - 0x28c]
push eax
call fcn.00406ad0
mov eax, dword [ebp - 0x330]
lea edx, [ebp - 0x28c]
add esp, 0xc
mov ecx, dword [eax]
push edx
lea edx, [ebp - 0x348]
push edx
push 8
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x330]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov esi, dword [ebp - 0x348]
xor edx, edx
mov dword [ebp - 0x320], edx
test esi, esi
je 0x402f66
lea eax, [ebp - 0x28c]
nop dword [eax]
mov ecx, dword [eax]
or ecx, dword [eax + 4]
je 0x402f58
inc edx
add eax, 0x10
sub esi, 1
jne 0x402f50
mov dword [ebp - 0x320], edx
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x314]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push 0
lea eax, [ebp - 0x310]
push eax
push 8
lea eax, [ebp - 0x35c]
push eax
push dword [ebx + 0x18]
call esi
push 0
lea eax, [ebp - 0x310]
push eax
push 8
lea eax, [ebp - 0x354]
push eax
push dword [ebx + 0x18]
call esi
push 0
lea eax, [ebp - 0x310]
push eax
push 4
lea eax, [ebp - 0x320]
push eax
push dword [ebx + 0x18]
call esi
xor edi, edi
cmp dword [ebp - 0x320], edi
jbe 0x402ff7
lea esi, [ebp - 0x28c]
nop dword [eax]
push 0
lea eax, [ebp - 0x310]
push eax
push 0x10
push esi
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc edi
add esi, 0x10
cmp edi, dword [ebp - 0x320]
jb 0x402fd0
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [ebp - 0x334]
add dword [ebp - 0x32c], 4
inc edi
cmp edi, dword [ebp - 0x318]
mov dword [ebp - 0x334], edi
mov edi, dword [ebp - 0x32c]
jb 0x402d60
mov edi, dword [ebp - 0x338]
mov eax, dword [ebp - 0x34c]
test eax, eax
je 0x402d16
mov ecx, dword [ebp - 0x324]
test ecx, ecx
je 0x403042
mov eax, dword [edi]
push ecx
push edi
call dword [eax + 0xc]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405531
mov esp, ebp
pop ebp
ret 0xc