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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xf8
mov eax, dword [ebp + 8]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov edx, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x20]
mov edi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x30], eax
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], edi
mov dword [esp + 0x64], edx
mov dword [esp + 0x60], ecx
mov dword [esp + 0xbc], esi
mov dword [esp + 0xc0], eax
mov ecx, dword [0x47cfa4]
mov dword [esp + 0x6c], ecx
mov ecx, dword [0x47cfa8]
mov dword [esp + 0x70], ecx
mov dword [esp], eax
mov dword [esp + 4], 0xffffffff
call fcn.00457260
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0xc4], ecx
mov dword [esp], eax
call fcn.0040ff90
mov dword [esp + 0x44], eax
mov dword [esp + 0xe8], 0
xor eax, eax
mov dword [esp], 0
call fcn.0040f340
mov dword [esp + 0x48], eax
mov dword [esp + 0x74], 0
mov dword [esp + 0xe4], 0
xor eax, eax
mov dword [esp], 0
call fcn.0040f340
mov ebx, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0xec], esi
mov dword [esp + 0xf0], eax
lea eax, [esp + 0x58]
mov dword [esp], eax
call fcn.004323a0
mov dword [esp], eax
call fcn.00431f40
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0xdc], 0
xor eax, eax
mov dword [esp], 0
call fcn.0040f2e0
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], eax
call fcn.00432ff0
mov dword [esp + 0x40], eax
mov dword [esp + 0xe0], 0
xor eax, eax
mov dword [esp], 0
call fcn.0040f290
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov edi, eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x50], edi
mov edi, dword [esp + 0x74]
mov dword [esp + 0x4c], edi
lea edi, [esp + 0x6c]
mov dword [esp], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
call dword [sym.imp.ntdll.dll_NtWriteFile]
sub esp, 0x24
mov dword [esp + 0x54], eax
mov dword [esp + 0xc8], eax
cmp eax, 0x103
je 0x410218
mov eax, dword [esp + 0x54]
mov dword [esp + 0x78], eax
jmp 0x410248
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call fcn.0040ff90
mov dword [esp], eax
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
lea eax, [esp + 0x6c]
mov dword [esp], eax
call fcn.004050d0
mov dword [esp + 0x78], eax
cmp dword [esp + 0x78], 0x103
jne 0x410271
lea eax, [esp + 0x7d]
mov dword [esp], eax
call fcn.00420610
mov al, byte [esp + 0x7d]
and al, 1
movzx eax, al
cmp eax, 1
je 0x410295
jmp 0x410322
lea eax, [esp + 0x78]
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call fcn.0041b390
test al, 1
jne 0x410371
jmp 0x410327
mov eax, dword [esp + 0x7e]
mov dword [esp + 0xb7], eax
mov al, byte [esp + 0x82]
mov byte [esp + 0xbb], al
mov eax, dword [esp + 0xb7]
mov dword [esp + 0x83], eax
mov al, byte [esp + 0xbb]
mov byte [esp + 0x87], al
lea edx, [esp + 0x90]
lea ecx, [0x47cff8]
lea eax, [esp + 0xa8]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0046b6a0
lea edx, [esp + 0x88]
lea ecx, [esp + 0x83]
lea eax, [esp + 0x90]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0041d330
lea eax, [esp + 0x88]
mov dword [esp], eax
call fcn.00411ef0
call fcn.00403fc0
mov eax, dword [esp + 0x78]
mov dword [esp + 0xd0], eax
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
sub esp, 4
mov dword [esp + 0xd4], eax
lea ecx, [esp + 0xac]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040d0d0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0xac]
mov dword [eax], ecx
mov ecx, dword [esp + 0xb0]
mov dword [eax + 4], ecx
jmp 0x41038a
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0xd8], ecx
mov ecx, dword [esp + 0x70]
mov dword [eax + 4], ecx
mov byte [eax], 4
mov eax, dword [esp + 0x28]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret