Function at 0x45109a
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4b9e1f
call fcn.0049e324
sub esp, 0x114
mov eax, dword [0x57aa54]
xor eax, dword [ebp + 4]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x120], ecx
mov ecx, dword [ebp - 0x120]
call fcn.00450e8e
mov eax, dword [ebp - 0x120]
push dword [eax + 4]
push dword [ebp + 0xc]
lea ecx, [ebp - 0x7c]
call fcn.0043a890
and dword [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.00418897
mov byte [ebp - 4], 1
push dword [ebp + 8]
lea ecx, [ebp - 0xf4]
call fcn.00418c29
push dword [ebp + 0x10]
lea eax, [ebp - 0xf4]
push eax
push 0x29
call fcn.0043056e
add esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x451145
and byte [ebp - 0x115], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.0041896f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0043a939
mov al, byte [ebp - 0x115]
jmp 0x4517fe
and dword [ebp - 0x100], 0
push 0
lea eax, [ebp - 0x100]
push eax
push 0x40
mov ecx, dword [ebp - 0x120]
add ecx, 0x24
call fcn.004619e9
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
cmp dword [ebp - 0x100], 0x40
je 0x4511ed
cmp dword [ebp + 0x10], 0
je 0x4511b4
push str.Failed_to_write_DOS_header
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x28]
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
and byte [ebp - 0x116], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.0041896f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0043a939
mov al, byte [ebp - 0x116]
jmp 0x4517fe
mov eax, dword [ebp - 0x120]
mov eax, dword [eax + 0x10]
add eax, 0x40
mov dword [ebp - 0xfc], eax
mov ecx, dword [ebp - 0x120]
add ecx, 0x24
call fcn.004619e9
mov eax, dword [eax + 0x3c]
sub eax, 0x40
mov dword [ebp - 0x108], eax
push 0
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0x108]
push dword [ebp - 0xfc]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
and dword [ebp - 0x100], 0
push 0
lea eax, [ebp - 0x100]
push eax
push 4
mov ecx, dword [ebp - 0x120]
add ecx, 0x68
call fcn.004619e9
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
cmp dword [ebp - 0x100], 4
je 0x4512f2
cmp dword [ebp + 0x10], 0
je 0x4512b9
push str.Failed_to_write_Signature
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x28]
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
and byte [ebp - 0x117], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.0041896f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0043a939
mov al, byte [ebp - 0x117]
jmp 0x4517fe
and dword [ebp - 0x100], 0
push 0
lea eax, [ebp - 0x100]
push eax
push 0x14
mov ecx, dword [ebp - 0x120]
add ecx, 0x68
call fcn.004619e9
add eax, 4
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
cmp dword [ebp - 0x100], 0x14
je 0x45139d
cmp dword [ebp + 0x10], 0
je 0x451364
push str.Failed_to_write_file_header
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x28]
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
and byte [ebp - 0x118], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.0041896f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0043a939
mov al, byte [ebp - 0x118]
jmp 0x4517fe
and dword [ebp - 0x100], 0
push 0
lea eax, [ebp - 0x100]
push eax
mov ecx, dword [ebp - 0x120]
add ecx, 0x68
call fcn.004619e9
movzx eax, word [eax + 0x14]
push eax
mov ecx, dword [ebp - 0x120]
add ecx, 0x68
call fcn.004619e9
add eax, 0x18
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
mov ecx, dword [ebp - 0x120]
add ecx, 0x68
call fcn.004619e9
movzx eax, word [eax + 0x14]
cmp dword [ebp - 0x100], eax
je 0x45146a
cmp dword [ebp + 0x10], 0
je 0x451431
push str.Failed_to_write_optional_header
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x28]
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
and byte [ebp - 0x119], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.0041896f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0043a939
mov al, byte [ebp - 0x119]
jmp 0x4517fe
mov ecx, dword [ebp - 0x120]
add ecx, 0x164
call fcn.00461880
mov dword [ebp - 0x1c], eax
and dword [ebp - 0x18], 0
jmp 0x45148b
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x1c]
jge 0x45154a
and dword [ebp - 0x100], 0
push 0
lea eax, [ebp - 0x100]
push eax
push 0x28
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x120]
add ecx, 0x164
call fcn.00461894
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
cmp dword [ebp - 0x100], 0x28
je 0x451545
cmp dword [ebp + 0x10], 0
je 0x45150c
push str.Failed_to_write_section_header
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x28]
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
and byte [ebp - 0x11a], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.0041896f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0043a939
mov al, byte [ebp - 0x11a]
jmp 0x4517fe
jmp 0x451484
push 1
push 0
push 0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x14], eax
push 0
mov ecx, dword [ebp - 0x120]
add ecx, 0x164
call fcn.00461894
mov dword [ebp - 0x104], eax
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 0x14]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0xf8], eax
cmp dword [ebp - 0xf8], 0
jbe 0x4515c8
push 0
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0xf8]
mov eax, dword [ebp - 0x120]
mov eax, dword [eax + 0x10]
add eax, dword [ebp - 0x14]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
and dword [ebp - 0x18], 0
jmp 0x4515d5
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x1c]
jge 0x451789
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x120]
add ecx, 0x164
call fcn.00461894
mov dword [ebp - 0x10c], eax
push str..rsrc
push dword [ebp - 0x10c]
call fcn.0049e560
pop ecx
pop ecx
test eax, eax
jne 0x451665
push 0
push 0
mov eax, dword [ebp - 0x10c]
push dword [eax + 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x120]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x110], eax
lea eax, [ebp - 0x7c]
push eax
mov eax, dword [ebp - 0x10c]
push dword [eax + 0xc]
push dword [ebp - 0x110]
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x120]
mov ecx, dword [eax + 0x17c]
call fcn.0045fe95
jmp 0x451784
push 8
push dword [ebp - 0x10c]
lea eax, [ebp - 0x94]
push eax
call fcn.0049d180
add esp, 0xc
and byte [ebp - 0x8c], 0
mov eax, dword [ebp - 0x10c]
cmp dword [eax + 0x14], 0
jne 0x451694
jmp 0x4515ce
push 0
push 0
mov eax, dword [ebp - 0x10c]
push dword [eax + 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
and dword [ebp - 0x100], 0
mov eax, dword [ebp - 0x120]
mov eax, dword [eax + 0x14]
mov ecx, dword [ebp - 0x10c]
add eax, dword [ecx + 0x14]
mov dword [ebp - 0x114], eax
push 0
lea eax, [ebp - 0x100]
push eax
mov eax, dword [ebp - 0x10c]
push dword [eax + 0x10]
push dword [ebp - 0x114]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
mov eax, dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x100]
cmp ecx, dword [eax + 0x10]
je 0x451784
cmp dword [ebp + 0x10], 0
je 0x45174e
push str.Failed_to_write_section_data
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x10]
lea eax, [ebp - 0x94]
push eax
push str.section_name
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x28]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x10]
call dword [eax + 0x28]
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
and byte [ebp - 0x11b], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.0041896f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0043a939
mov al, byte [ebp - 0x11b]
jmp 0x4517fe
jmp 0x4515ce
push 0
lea eax, [ebp - 0x100]
push eax
mov eax, dword [ebp - 0x120]
push dword [eax + 0x20]
mov eax, dword [ebp - 0x120]
push dword [eax + 0x1c]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x57cb49
push dword [ebp - 0x100]
lea ecx, [ebp - 0x7c]
call fcn.0043acab
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
push 0x6f
lea ecx, [ebp - 0x7c]
call fcn.0043aa06
mov byte [ebp - 0x11c], 1
and byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.0041896f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.0043a939
mov al, byte [ebp - 0x11c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x80]
xor ecx, dword [ebp + 4]
call fcn.0049c63c
leave
ret 0xc