Function at 0x402100
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
push edi
mov eax, dword [ebp + 8]
push eax
call fcn.00402a80
add esp, 4
and eax, 0xff
test eax, eax
je 0x402129
mov eax, 1
jmp 0x402397
mov ecx, dword [0x406064]
add ecx, 0x600
mov dword [ebp - 0x32c], ecx
mov byte [ebp - 0x324], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x323]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x210], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x20f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edx, dword [ebp - 0x32c]
mov dword [ebp - 4], edx
mov dword [ebp - 0x214], 0
jmp 0x402191
mov eax, dword [ebp - 0x214]
add eax, 1
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0xa
jge 0x4021b9
push 0xffff
push 0
call fcn.00401570
add esp, 8
mov ecx, dword [ebp - 0x214]
mov edx, dword [ebp - 4]
mov word [edx + ecx*2 + 0x28], ax
jmp 0x402182
lea eax, [ebp - 0x108]
push eax
push 0x104
call fcn.00401dd0
add esp, 8
mov byte [ebp - 0x324], 0x5c
push 0xa
lea ecx, [ebp - 0x323]
push ecx
call fcn.00402680
add esp, 8
push 0x42ea34
lea edx, [ebp - 0x324]
push edx
call fcn.004029e0
add esp, 8
lea eax, [ebp - 0x324]
push eax
lea ecx, [ebp - 0x108]
push ecx
call fcn.004029e0
add esp, 8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x328], 0
jne 0x402244
xor eax, eax
jmp 0x402397
push 5
push 0
call fcn.00401570
add esp, 8
shl eax, 0x14
add eax, 0x46
mov dword [ebp - 0x220], eax
mov eax, dword [0x406064]
mov ecx, dword [eax + 0x5fc]
mov dword [ebp - 0x330], ecx
push 0
push 0
mov edx, dword [ebp - 0x330]
push edx
mov eax, dword [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x330]
shr ecx, 1
push ecx
push 0x46
call fcn.00401570
add esp, 8
mov dword [ebp - 0x21c], eax
push 0
lea edx, [ebp - 0x21c]
push edx
mov eax, dword [ebp - 0x21c]
push eax
mov ecx, dword [ebp - 0x32c]
add ecx, dword [ebp - 0x21c]
push ecx
mov edx, dword [ebp - 0x328]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4022ce
jmp 0x402303
push 1
push 0
push 0x100046
mov eax, dword [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0xffffffff
jne 0x4022f5
jmp 0x402303
mov ecx, dword [ebp - 0x10c]
cmp ecx, dword [ebp - 0x220]
jb 0x402285
push 0
push 0
push 0
mov edx, dword [ebp - 0x328]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x218]
push eax
mov ecx, dword [ebp - 0x330]
push ecx
mov edx, dword [ebp - 0x32c]
push edx
mov eax, dword [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x328]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
test eax, eax
je 0x402379
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x108]
push edx
call dword [0x42f0e4]
mov dword [ebp - 0x334], eax
lea eax, [ebp - 0x108]
push eax
call fcn.00402a50
add esp, 4
jmp 0x402392
lea ecx, [ebp - 0x108]
push ecx
push 0x42ea30
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret