Function at 0x530149
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x5aeecf
call fcn.00591b5c
sub esp, 0x104
mov eax, dword [0x6c0bc0]
xor eax, dword [ebp + 4]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x110], ecx
mov ecx, dword [ebp - 0x110]
call fcn.0052ff3d
mov eax, dword [ebp - 0x110]
push dword [eax + 4]
push dword [ebp + 0xc]
lea ecx, [ebp - 0x6c]
call fcn.004f1ee3
and dword [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d00b6
mov byte [ebp - 4], 1
push dword [ebp + 8]
lea ecx, [ebp - 0xe4]
call fcn.004d0448
push dword [ebp + 0x10]
lea eax, [ebp - 0xe4]
push eax
push 0x29
call fcn.004d5565
add esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x5301f4
and byte [ebp - 0x105], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d018e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004f1f7d
mov al, byte [ebp - 0x105]
jmp 0x5308aa
and dword [ebp - 0xf0], 0
push 0
lea eax, [ebp - 0xf0]
push eax
push 0x40
mov ecx, dword [ebp - 0x110]
add ecx, 0x24
call fcn.005478c7
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
cmp dword [ebp - 0xf0], 0x40
je 0x53029c
cmp dword [ebp + 0x10], 0
je 0x530263
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.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x106], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d018e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004f1f7d
mov al, byte [ebp - 0x106]
jmp 0x5308aa
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x10]
add eax, 0x40
mov dword [ebp - 0xec], eax
mov ecx, dword [ebp - 0x110]
add ecx, 0x24
call fcn.005478c7
mov eax, dword [eax + 0x3c]
sub eax, 0x40
mov dword [ebp - 0xf8], eax
push 0
lea eax, [ebp - 0xf0]
push eax
push dword [ebp - 0xf8]
push dword [ebp - 0xec]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
and dword [ebp - 0xf0], 0
push 0
lea eax, [ebp - 0xf0]
push eax
push 4
mov ecx, dword [ebp - 0x110]
add ecx, 0x68
call fcn.005478c7
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
cmp dword [ebp - 0xf0], 4
je 0x5303a1
cmp dword [ebp + 0x10], 0
je 0x530368
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.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x107], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d018e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004f1f7d
mov al, byte [ebp - 0x107]
jmp 0x5308aa
and dword [ebp - 0xf0], 0
push 0
lea eax, [ebp - 0xf0]
push eax
push 0x14
mov ecx, dword [ebp - 0x110]
add ecx, 0x68
call fcn.005478c7
add eax, 4
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
cmp dword [ebp - 0xf0], 0x14
je 0x53044c
cmp dword [ebp + 0x10], 0
je 0x530413
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.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x108], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d018e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004f1f7d
mov al, byte [ebp - 0x108]
jmp 0x5308aa
and dword [ebp - 0xf0], 0
push 0
lea eax, [ebp - 0xf0]
push eax
mov ecx, dword [ebp - 0x110]
add ecx, 0x68
call fcn.005478c7
movzx eax, word [eax + 0x14]
push eax
mov ecx, dword [ebp - 0x110]
add ecx, 0x68
call fcn.005478c7
add eax, 0x18
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
mov ecx, dword [ebp - 0x110]
add ecx, 0x68
call fcn.005478c7
movzx eax, word [eax + 0x14]
cmp dword [ebp - 0xf0], eax
je 0x530519
cmp dword [ebp + 0x10], 0
je 0x5304e0
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.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x109], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d018e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004f1f7d
mov al, byte [ebp - 0x109]
jmp 0x5308aa
mov ecx, dword [ebp - 0x110]
add ecx, 0x164
call fcn.004d3450
mov dword [ebp - 0x1c], eax
and dword [ebp - 0x18], 0
jmp 0x53053a
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x1c]
jge 0x5305f9
and dword [ebp - 0xf0], 0
push 0
lea eax, [ebp - 0xf0]
push eax
push 0x28
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x110]
add ecx, 0x164
call fcn.00547772
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
cmp dword [ebp - 0xf0], 0x28
je 0x5305f4
cmp dword [ebp + 0x10], 0
je 0x5305bb
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.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x10a], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d018e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004f1f7d
mov al, byte [ebp - 0x10a]
jmp 0x5308aa
jmp 0x530533
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 - 0x110]
add ecx, 0x164
call fcn.00547772
mov dword [ebp - 0xf4], eax
mov eax, dword [ebp - 0xf4]
mov eax, dword [eax + 0x14]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0xe8], eax
cmp dword [ebp - 0xe8], 0
jbe 0x530677
push 0
lea eax, [ebp - 0xf0]
push eax
push dword [ebp - 0xe8]
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x10]
add eax, dword [ebp - 0x14]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
and dword [ebp - 0x18], 0
jmp 0x530684
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x1c]
jge 0x530835
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x110]
add ecx, 0x164
call fcn.00547772
mov dword [ebp - 0xfc], eax
push str..rsrc
push dword [ebp - 0xfc]
call fcn.00592200
pop ecx
pop ecx
test eax, eax
jne 0x530714
push 0
push 0
mov eax, dword [ebp - 0xfc]
push dword [eax + 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x100], eax
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0xfc]
push dword [eax + 0xc]
push dword [ebp - 0x100]
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x110]
mov ecx, dword [eax + 0x17c]
call fcn.00546e8a
jmp 0x530830
push 8
push dword [ebp - 0xfc]
lea eax, [ebp - 0x84]
push eax
call fcn.0058e7b0
add esp, 0xc
and byte [ebp - 0x7c], 0
mov eax, dword [ebp - 0xfc]
cmp dword [eax + 0x14], 0
jne 0x530740
jmp 0x53067d
push 0
push 0
mov eax, dword [ebp - 0xfc]
push dword [eax + 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
and dword [ebp - 0xf0], 0
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x14]
mov ecx, dword [ebp - 0xfc]
add eax, dword [ecx + 0x14]
mov dword [ebp - 0x104], eax
push 0
lea eax, [ebp - 0xf0]
push eax
mov eax, dword [ebp - 0xfc]
push dword [eax + 0x10]
push dword [ebp - 0x104]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
mov eax, dword [ebp - 0xfc]
mov ecx, dword [ebp - 0xf0]
cmp ecx, dword [eax + 0x10]
je 0x530830
cmp dword [ebp + 0x10], 0
je 0x5307fa
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 - 0x84]
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.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x10b], 0
and byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d018e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004f1f7d
mov al, byte [ebp - 0x10b]
jmp 0x5308aa
jmp 0x53067d
push 0
lea eax, [ebp - 0xf0]
push eax
mov eax, dword [ebp - 0x110]
push dword [eax + 0x20]
mov eax, dword [ebp - 0x110]
push dword [eax + 0x1c]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x6c4f60
push dword [ebp - 0xf0]
lea ecx, [ebp - 0x6c]
call fcn.004f24ac
push 0
push dword [ebp - 0x10]
call fcn.004e81eb
pop ecx
pop ecx
push 0x6f
lea ecx, [ebp - 0x6c]
call fcn.004f2035
mov byte [ebp - 0x10c], 1
and byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.004d018e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004f1f7d
mov al, byte [ebp - 0x10c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x70]
xor ecx, dword [ebp + 4]
call fcn.0058cc82
leave
ret 0xc