Function at 0x49fea0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4f9733
mov eax, dword fs:[0]
push eax
sub esp, 0xec
mov eax, dword [0x5e4ce0]
xor eax, esp
mov dword [esp + 0xe8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e4ce0]
xor eax, esp
push eax
lea eax, [esp + 0x100]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x110]
mov ebx, dword [esp + 0x118]
mov edi, dword [esp + 0x114]
mov esi, ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebx
call fcn.0049fd40
mov eax, dword [esi + 4]
push eax
push edi
lea ecx, [esp + 0x34]
call fcn.0046fac0
xor edi, edi
lea ecx, [esp + 0x8c]
mov dword [esp + 0x108], edi
call fcn.004537d0
push ebp
lea ecx, [esp + 0x90]
mov byte [esp + 0x10c], 1
call fcn.00453a60
push ebx
lea ecx, [esp + 0x90]
push ecx
push 0x29
call fcn.004565a0
mov ebp, eax
add esp, 0xc
cmp ebp, 0xffffffff
je 0x49ffbd
push edi
lea edx, [esp + 0x18]
push edx
lea ecx, [esi + 0x24]
push 0x40
mov dword [esp + 0x20], edi
call fcn.00458f60
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push ebp
call edi
mov eax, dword [esp + 0x14]
push 0x5e7229
push eax
lea ecx, [esp + 0x34]
call fcn.0046fee0
cmp dword [esp + 0x14], 0x40
je 0x49ffec
test ebx, ebx
je 0x49ffb2
mov edx, dword [ebx]
mov eax, dword [edx + 0x10]
push str.Failed_to_write_DOS_header
mov ecx, ebx
call eax
mov edx, dword [ebx]
mov ecx, ebx
mov eax, dword [esp + 0x18]
mov edx, dword [edx + 0x28]
push eax
push str.filename
call edx
push 0
push ebp
call fcn.004661e0
add esp, 8
lea ecx, [esp + 0x8c]
mov byte [esp + 0x108], 0
call fcn.00453880
lea ecx, [esp + 0x2c]
mov dword [esp + 0x108], 0xffffffff
call fcn.0046fb60
xor al, al
jmp 0x4a0370
mov ebx, dword [esi + 0x10]
lea ecx, [esi + 0x24]
add ebx, 0x40
call fcn.00458f60
mov eax, dword [eax + 0x3c]
push 0
lea ecx, [esp + 0x18]
push ecx
sub eax, 0x40
push eax
push ebx
push ebp
call edi
mov edx, dword [esp + 0x14]
push 0x5e7229
push edx
lea ecx, [esp + 0x34]
call fcn.0046fee0
push 0
lea eax, [esp + 0x18]
push eax
lea ebx, [esi + 0x68]
push 4
mov ecx, ebx
mov dword [esp + 0x20], 0
call fcn.00458f60
push eax
push ebp
call edi
mov ecx, dword [esp + 0x14]
push 0x5e7229
push ecx
lea ecx, [esp + 0x34]
call fcn.0046fee0
cmp dword [esp + 0x14], 4
je 0x4a007b
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x49ffb2
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_write_Signature
mov ecx, esi
call eax
mov edx, dword [esi]
mov ecx, esi
jmp 0x49ffa3
push 0
lea eax, [esp + 0x18]
push eax
push 0x14
mov ecx, ebx
mov dword [esp + 0x20], 0
call fcn.00458f60
add eax, 4
push eax
push ebp
call edi
mov ecx, dword [esp + 0x14]
push 0x5e7229
push ecx
lea ecx, [esp + 0x34]
call fcn.0046fee0
cmp dword [esp + 0x14], 0x14
je 0x4a00d7
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x49ffb2
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_write_file_header
mov ecx, esi
call eax
mov edx, dword [esi]
mov ecx, esi
jmp 0x49ffa3
push 0
lea eax, [esp + 0x18]
push eax
mov ecx, ebx
mov dword [esp + 0x1c], 0
call fcn.00458f60
movzx ecx, word [eax + 0x14]
push ecx
mov ecx, ebx
call fcn.00458f60
add eax, 0x18
push eax
push ebp
call edi
mov edx, dword [esp + 0x14]
push 0x5e7229
push edx
lea ecx, [esp + 0x34]
call fcn.0046fee0
mov ecx, ebx
call fcn.00458f60
movzx eax, word [eax + 0x14]
cmp dword [esp + 0x14], eax
je 0x4a0147
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x49ffb2
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_write_optional_header
mov ecx, esi
call eax
mov edx, dword [esi]
mov ecx, esi
jmp 0x49ffa3
lea ecx, [esi + 0x164]
call fcn.00455af0
xor ebx, ebx
test eax, eax
mov dword [esp + 0x28], eax
jle 0x4a01a4
push 0
lea eax, [esp + 0x18]
push eax
push 0x28
push ebx
lea ecx, [esi + 0x164]
mov dword [esp + 0x24], 0
call fcn.004bb620
push eax
push ebp
call edi
mov ecx, dword [esp + 0x14]
push 0x5e7229
push ecx
lea ecx, [esp + 0x34]
call fcn.0046fee0
cmp dword [esp + 0x14], 0x28
jne 0x4a0256
add ebx, 1
cmp ebx, dword [esp + 0x28]
jl 0x4a015c
push 1
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [esi + 0x164]
mov ebx, eax
call fcn.004bb620
mov eax, dword [eax + 0x14]
sub eax, ebx
je 0x4a01eb
mov edx, dword [esi + 0x10]
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
add edx, ebx
push edx
push ebp
call edi
mov eax, dword [esp + 0x14]
push 0x5e7229
push eax
lea ecx, [esp + 0x34]
call fcn.0046fee0
cmp dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
jle 0x4a030b
mov edi, edi
mov ecx, dword [esp + 0x24]
push ecx
lea ecx, [esi + 0x164]
call fcn.004bb620
mov ebx, eax
mov edi, str..rsrc
mov esi, ebx
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4a0279
mov eax, dword [ebx + 0x14]
push edx
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x18]
mov eax, dword [edx + 0x38]
mov ecx, dword [ecx + 0x17c]
lea edx, [esp + 0x2c]
push edx
mov edx, dword [ebx + 0xc]
push edx
push eax
push ebp
call fcn.004bae30
jmp 0x4a02ec
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x49ffb2
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_write_section_header
mov ecx, esi
call eax
mov edx, dword [esi]
mov ecx, esi
jmp 0x49ffa3
mov eax, dword [ebx]
mov dword [esp + 0xe8], eax
mov ecx, dword [ebx + 4]
mov dword [esp + 0xec], ecx
mov byte [esp + 0xf0], 0
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4a02ec
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x14]
push 0
mov dword [esp + 0x18], 0
mov edx, dword [ebx + 0x10]
add eax, dword [ebx + 0x14]
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
push 0x5e7229
push eax
lea ecx, [esp + 0x34]
call fcn.0046fee0
mov ecx, dword [esp + 0x14]
cmp ecx, dword [ebx + 0x10]
jne 0x4a039a
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
add eax, 1
cmp eax, dword [esp + 0x28]
mov dword [esp + 0x24], eax
jl 0x4a0200
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x1c]
push 0
lea eax, [esp + 0x18]
push eax
push ecx
push edx
push ebp
call edi
mov eax, dword [esp + 0x14]
push 0x5e7229
push eax
lea ecx, [esp + 0x34]
call fcn.0046fee0
push 0
push ebp
call fcn.004661e0
add esp, 8
push 0x6f
lea ecx, [esp + 0x30]
call fcn.0046fff0
lea ecx, [esp + 0x8c]
mov byte [esp + 0x108], 0
call fcn.00453880
lea ecx, [esp + 0x2c]
mov dword [esp + 0x108], 0xffffffff
call fcn.0046fb60
mov al, 1
mov ecx, dword [esp + 0x100]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xe8]
xor ecx, esp
call fcn.004d99c4
add esp, 0xf8
ret 0xc
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x49ffb2
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_write_section_data
mov ecx, esi
call eax
mov edx, dword [esi]
mov edx, dword [edx + 0x28]
lea eax, [esp + 0xe8]
push eax
push str.section_name
mov ecx, esi
call edx
mov ecx, dword [esp + 0x18]
mov eax, dword [esi]
mov edx, dword [eax + 0x28]
push ecx
mov ecx, esi
jmp 0x49ffab