Function at 0x4da650
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5a999b
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
mov eax, dword [esp + 0xf4]
mov ebp, dword [esp + 0xf0]
xor edi, edi
push edi
push 0x80
push 3
push edi
push 3
push 0xc0000000
push eax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4da6c6
call fcn.004129d0
jmp 0x4da6c9
mov dword [ebp + 0x28], eax
lea eax, [ebp + 0x28]
mov dword [esp + 0x28], eax
mov eax, dword [eax]
cmp eax, edi
je 0x4da72e
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], edi
lea esi, [esp + 0x34]
mov dword [esp + 0xe8], edi
call fcn.004d0300
cmp eax, edi
mov dword [esp + 0x18], eax
jge 0x4da735
mov eax, dword [esp + 0x34]
xor esi, esi
cmp eax, edi
je 0x4da712
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x4da712
call fcn.004129d0
mov esi, eax
mov eax, dword [esp + 0x3c]
cmp eax, edi
je 0x4da72e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4da72e
cmp esi, edi
jl 0x4da72e
call fcn.004129d0
xor eax, eax
jmp 0x4dab57
mov esi, dword [esp + 0x34]
cmp dword [esi], 0x51554432
mov dword [esp + 0x1c], edi
jne 0x4daab4
cmp word [esi + 4], 3
jne 0x4daab4
mov eax, dword [esi + 0x3c]
mov ebx, dword [esp + 0x38]
add eax, 0x40
cmp eax, ebx
ja 0x4daab4
mov eax, dword [ebp + 8]
mov ecx, 0x10
lea edi, [esp + 0x5c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 0x14]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x64], ecx
mov edx, dword [eax + 0x18]
mov dword [esp + 0x68], edx
mov ecx, dword [eax + 0x1c]
xor edi, edi
mov dword [esp + 0x6c], ecx
mov edx, dword [eax + 0x20]
mov ecx, dword [esi]
push edi
lea eax, [esp + 0x34]
push eax
push edi
push ecx
mov dword [esp + 0x80], edx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4da7bb
call fcn.004129d0
mov ecx, dword [esi]
push edi
lea edx, [esp + 0x18]
push edx
push 0x40
lea eax, [esp + 0x68]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4da7da
call fcn.004129d0
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 0x3c]
add eax, 0x40
cmp byte [ebp + 0x30], 0
mov dword [esp + 0x1c], eax
jne 0x4daabc
cmp dword [esp + 0x1c], ebx
jae 0x4daabc
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x34]
lea ecx, [edi + 4]
cmp ecx, ebx
lea esi, [eax + edi]
ja 0x4daab4
movzx eax, word [esi + 2]
cmp ax, 4
jbe 0x4daab4
movzx edx, ax
lea eax, [edx + edi]
cmp eax, ebx
ja 0x4daab4
movzx eax, word [esi]
cmp ax, 0x7747
jne 0x4da9a8
mov bl, byte [esi + 0xf]
movzx ecx, byte [esi + 0xe]
movzx eax, bl
add ecx, eax
mov dword [esp + 0x14], eax
lea eax, [ecx + ecx + 0x10]
cmp edx, eax
jb 0x4daab4
push 0x7e
lea ecx, [esp + 0x62]
push 0
push ecx
mov word [esp + 0x68], 0
call fcn.00580260
movzx edi, byte [esi + 0xe]
mov ecx, dword [esp + 0x20]
add esp, 0xc
cmp bl, 0x3e
lea eax, [esi + edi*2 + 0x10]
lea ebp, [esi + 0x10]
jb 0x4da888
mov ecx, 0x3e
push ecx
push eax
lea edx, [esp + 0x64]
push edx
call fcn.0057a8a1
add esp, 0xc
call fcn.004dc450
test eax, eax
je 0x4da97b
push 0
lea ecx, [esp + 0x60]
push ecx
push edi
push eax
mov eax, ebp
call fcn.004d95d0
test eax, eax
je 0x4da97b
mov ebx, dword [esp + 0x20]
sub esp, 8
mov eax, esp
lea edx, [esp + 0x1c]
mov dword [esp + 0x34], esp
mov dword [eax], edi
mov dword [eax + 4], ebp
mov eax, dword [ebx + 8]
push edx
mov dword [esp + 0x20], 0
call fcn.004dfcb0
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4daa9a
sub esp, 8
mov eax, esp
mov dword [esp + 0x34], esp
lea edx, [esp + 0x1c]
push edx
mov dword [eax], edi
mov dword [eax + 4], ebp
mov eax, dword [ebx + 8]
push ecx
mov dword [esp + 0x24], 0
call fcn.004dfdd0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4daa9a
mov edi, dword [ebx + 8]
movzx edx, byte [esi + 0xc]
mov ebx, 1
push ebx
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esi + 4]
push eax
movzx eax, byte [esi + 0xd]
push edx
movzx edx, byte [esi + 0xf]
push eax
push ecx
push edx
lea eax, [esp + 0x78]
push eax
mov dword [esp + 0x34], 0
call fcn.004dff00
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4daaa4
cmp dword [ecx + 8], 0
jbe 0x4da974
test byte [ecx + 0xe], 0x80
jne 0x4da974
cmp eax, 2
jne 0x4da974
add dword [esp + 0x24], ebx
mov edx, dword [esp + 0x1c]
mov dword [ecx + 4], edx
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x38]
movzx eax, word [esi + 2]
add edi, eax
cmp edi, ebx
mov dword [esp + 0x1c], edi
jae 0x4daaaa
cmp byte [ebp + 0x30], 0
je 0x4da7f2
jmp 0x4daabc
cmp ax, 0x44f7
jne 0x4da987
movzx eax, byte [esi + 0x13]
lea ecx, [eax + eax + 0x14]
cmp edx, ecx
jb 0x4daab4
mov ecx, dword [esi + 0xc]
cmp ecx, edi
jae 0x4daab4
mov eax, dword [esp + 0x34]
lea ebp, [ecx + 4]
add eax, ecx
cmp ebp, ebx
ja 0x4daab4
add edx, ecx
cmp edx, ebx
ja 0x4daab4
cmp word [eax], 0x7747
jne 0x4daab4
mov bl, byte [eax + 0xf]
movzx ebp, byte [eax + 0xe]
movzx edx, bl
add edx, ebp
movzx ebp, word [eax + 2]
lea edx, [edx + edx + 0x10]
cmp ebp, edx
jb 0x4daab4
add edx, ecx
cmp edx, dword [esp + 0x38]
ja 0x4daab4
movzx ecx, byte [eax + 0xe]
mov ebp, dword [esp + 0x20]
lea edx, [eax + ecx*2 + 0x10]
add eax, 0x10
mov dword [esp + 0x58], eax
lea eax, [esp + 0x14]
push eax
push ebx
mov dword [esp + 0x5c], ecx
mov ecx, dword [ebp + 8]
push edx
lea eax, [esp + 0x60]
mov dword [esp + 0x20], 0
call fcn.004da220
test eax, eax
je 0x4da983
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4da983
push 1
lea edx, [esp + 0x18]
push edx
movzx edx, byte [esi + 0x10]
push edx
movzx edx, byte [esi + 0x11]
push edx
mov edx, dword [esi + 4]
push edx
mov edx, dword [ebp + 8]
push eax
mov al, byte [esi + 0x13]
push ecx
lea ecx, [esi + 0x14]
mov dword [esp + 0x30], 0
call fcn.004d9fd0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4daa9a
mov dword [eax + 0x10], edi
jmp 0x4da983
mov dword [esp + 0x18], 1
jmp 0x4daabc
mov dword [esp + 0x18], ebx
jmp 0x4daabc
mov dword [esp + 0x18], 0
jmp 0x4daabc
mov dword [esp + 0x18], 0x8007000b
lea esi, [esp + 0x34]
call fcn.004d04e0
cmp dword [esp + 0x18], 0
jge 0x4dab1b
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x28]
push 0
push edi
call fcn.00497690
test edi, edi
jne 0x4dab1b
push 0x3c
lea ecx, [esp + 0x64]
push edi
push ecx
call fcn.00580260
add esp, 0xc
push edi
push edi
push esi
xor edx, edx
mov dword [esp + 0x68], 0x51554432
mov word [esp + 0x6c], 3
mov word [esp + 0x6e], di
call fcn.00433bd0
push esi
lea ecx, [edi + 0x40]
lea edx, [esp + 0x60]
call fcn.00423680
mov eax, dword [esp + 0x34]
xor esi, esi
test eax, eax
je 0x4dab37
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x4dab37
call fcn.004129d0
mov esi, eax
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4dab53
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4dab53
test esi, esi
jl 0x4dab53
call fcn.004129d0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.005787fd
add esp, 0xd8
ret 8