Function at 0x4163d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 0xc], ebp
push esi
push edi
test ebp, ebp
jne 0x4163eb
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, dword [ebp + 0x3c]
add eax, 0xa0
add eax, ebp
mov dword [esp + 0x18], eax
mov eax, dword [eax + 4]
test eax, eax
je 0x416629
push eax
push str.pReloc__Size:__x_n
push 0x100000
push 0x420410
call fcn.00401010
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 0x10
mov esi, eax
mov dword [0x42040c], esi
push 0xfffffffffffffff5
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push 0x420408
push esi
push 0x420410
push eax
call ebx
mov eax, dword [esp + 0x18]
push dword [eax]
push str.pReloc__VirtualAddress:__x_n
push 0x100000
push 0x420410
call fcn.00401010
add esp, 0x10
mov esi, eax
mov dword [0x42040c], esi
push 0xfffffffffffffff5
call edi
push 0
push 0x420408
push esi
push 0x420410
push eax
call ebx
mov eax, dword [esp + 0x18]
mov ebx, dword [eax]
add ebx, ebp
mov eax, dword [ebx + 4]
lea ebp, [ebx + 4]
mov dword [esp + 0x20], ebp
test eax, eax
je 0x416629
push eax
push dword [ebx]
push str.chunk__VirtualAddress:__x_tchunk__Size:_0x_x_n
push 0x100000
push 0x420410
call fcn.00401010
add esp, 0x14
mov esi, eax
mov dword [0x42040c], esi
push 0xfffffffffffffff5
call edi
push 0
push 0x420408
push esi
push 0x420410
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, dword [ebp]
sub ebp, 8
shr ebp, 1
push ebp
push str._tnumber_of_chunks:_0x_x_n
push 0x100000
push 0x420410
mov dword [esp + 0x2c], ebp
call fcn.00401010
add esp, 0x10
mov esi, eax
mov dword [0x42040c], esi
push 0xfffffffffffffff5
call edi
push 0
push 0x420408
push esi
push 0x420410
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test ebp, ebp
je 0x416611
lea eax, [ebx + 8]
mov dword [esp + 0x18], eax
movzx esi, word [eax]
mov ax, si
shr ax, 0xc
movzx ebp, ax
push ebp
push str.type:__hx_t
push 0x100000
push 0x420410
call fcn.00401010
add esp, 0x10
mov edi, eax
mov dword [0x42040c], edi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0
push 0x420408
push edi
push 0x420410
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, 0xfff
push esi
push str.offset:__x_n
push 0x100000
push 0x420410
call fcn.00401010
add esp, 0x10
mov edi, eax
mov dword [0x42040c], edi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0
push 0x420408
push edi
push 0x420410
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp ebp, 3
jne 0x4165c5
mov eax, dword [ebx]
mov ebp, dword [esp + 0x14]
add eax, esi
mov ecx, dword [esp + 0x28]
add dword [eax + ebp], ecx
jmp 0x4165f5
cmp ebp, 1
jne 0x4165e0
mov eax, dword [ebx]
mov ecx, dword [esp + 0x14]
add eax, esi
add ecx, eax
mov eax, dword [esp + 0x28]
shr eax, 0x10
add word [ecx], ax
jmp 0x4165f5
cmp ebp, 2
jne 0x4165f5
mov eax, dword [ebx]
mov ecx, dword [esp + 0x14]
add eax, esi
mov edx, dword [esp + 0x28]
add word [eax + ecx], dx
mov eax, dword [esp + 0x18]
add eax, 2
sub dword [esp + 0x1c], 1
mov dword [esp + 0x18], eax
jne 0x416524
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov eax, dword [esp + 0x20]
add ebx, dword [eax]
mov eax, dword [ebx + 4]
lea ebp, [ebx + 4]
mov dword [esp + 0x20], ebp
test eax, eax
jne 0x416497
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret