Function at 0x490300
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x88
mov esi, ecx
lea ecx, [esp + 0x30]
call fcn.00488130
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
cmp eax, 2
jne 0x490330
mov ebx, ecx
shr ebx, 8
jmp 0x4907f4
mov dword [esp + 0x70], edi
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
mov edi, dword [esp + 0x4c]
test eax, eax
mov dword [esp + 0x14], ecx
je 0x490371
push dword [esp + 0x3c]
mov dword [esp + 4], ebx
mov ebx, edi
mov edi, ebp
mov ebp, esi
mov esi, edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, esi
mov esi, ebp
mov ebp, edi
mov edi, ebx
mov ebx, dword [esp]
mov ecx, dword [esp + 0x14]
test bl, 1
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 1
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 1
mov dword [esp + 0x58], 0
mov dword [esp + 0x68], 0
je 0x49060b
test dl, 1
je 0x49063b
mov dword [esp], edi
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
je 0x490853
mov edi, eax
movzx eax, byte [0x77618d]
xor ecx, ecx
mov edx, 0x14
call fcn.00490be0
test eax, eax
je 0x490867
xorps xmm0, xmm0
movsd qword [eax + 8], xmm0
movsd qword [eax], xmm0
mov dword [eax + 0x10], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], edi
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
je 0x49066f
mov ebx, eax
movzx eax, byte [0x77618d]
xor ecx, ecx
mov edx, 0x14
call fcn.00490be0
test eax, eax
je 0x490867
mov ecx, dword [esp]
xorps xmm0, xmm0
lea edx, [esp + 0x60]
movsd qword [eax + 8], xmm0
movsd qword [eax], xmm0
mov dword [eax + 0x10], ebx
mov dword [esp + 0x74], edi
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x78], ebx
lea edi, [esp + 0xc]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
nop word [eax + eax]
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x7c]
push eax
push 2
call ebx
cmp eax, 1
je 0x490500
test eax, eax
jne 0x4906b9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x49055d
cmp eax, 1
jne 0x490542
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xc], 0
push 1
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x490588
mov ebp, dword [esp + 0xc]
jmp 0x490546
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4905d3
cmp eax, 2
jne 0x49051a
mov ebp, dword [esp + 0x34]
jmp 0x4905c0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xc], 0
push 1
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x49059f
mov ebp, dword [esp + 0xc]
jmp 0x4905c0
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x24]
add dword [eax + 8], ebp
test ebp, ebp
je 0x4906aa
mov ecx, edi
lea edx, [esp + 0x18]
call fcn.00490870
movzx ecx, byte [esp + 0xc]
movzx eax, byte [esp + 0xd]
cmp cl, 4
jne 0x49068e
test al, 1
jne 0x4904a0
jmp 0x4906aa
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x490546
cmp eax, 0x6d
je 0x490546
jmp 0x490846
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x4905c0
cmp eax, 0x6d
jne 0x490846
nop word cs:[eax + eax]
nop
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x3c]
add dword [eax + 8], ebp
test ebp, ebp
je 0x4905f9
mov ecx, edi
lea edx, [esp + 0x30]
call fcn.00490870
movzx ecx, byte [esp + 0xc]
movzx eax, byte [esp + 0xd]
cmp cl, 4
jne 0x49068e
test al, 1
jne 0x4904a0
lea ecx, [esp + 4]
lea edx, [esp + 0x18]
call fcn.00490950
jmp 0x4906c8
test dl, 1
je 0x490731
lea eax, [esp + 0x60]
mov dword [esp + 0x18], edi
lea ecx, [esp + 0x30]
lea edx, [esp + 0x18]
push eax
call fcn.00487a50
add esp, 4
cmp byte [esp + 0x30], 4
jne 0x490867
push edi
jmp 0x490660
lea eax, [esp + 0x50]
mov dword [esp + 0x18], ebp
lea ecx, [esp + 0x30]
lea edx, [esp + 0x18]
push eax
call fcn.00487a50
add esp, 4
cmp byte [esp + 0x30], 4
jne 0x490867
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x14]
jmp 0x490731
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push dword [esp]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 4], 0
mov dword [esp + 8], edi
jmp 0x4906f5
movzx edx, word [esp + 0x12]
mov edi, dword [esp + 0xe]
mov word [esp + 0xa], dx
mov dword [esp + 6], edi
mov byte [esp + 4], cl
mov byte [esp + 5], al
jmp 0x4906c8
lea ecx, [esp + 4]
lea edx, [esp + 0x30]
call fcn.00490950
jmp 0x4906c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [esp + 4], 0
mov dword [esp + 8], eax
lea ecx, [esp + 0x30]
call fcn.00490a00
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x40]
call edi
push dword [esp + 0x44]
call edi
push dword [esp + 0x38]
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea ecx, [esp + 0x18]
call fcn.00490a00
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x28]
call edi
push dword [esp + 0x2c]
call edi
push dword [esp + 0x20]
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp byte [esp + 4], 4
mov ecx, dword [esp + 0x14]
jne 0x490867
push 0xffffffffffffffff
push ecx
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
mov dword [esp + 0x5c], esi
je 0x49078c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x60], 0
mov edi, eax
je 0x490765
push dword [esp + 0x64]
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x50], 0
je 0x49077e
push dword [esp + 0x54]
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebp, 0x80000000
mov dword [esp], 0
jmp 0x4907d5
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x490744
mov ebx, dword [esp + 0x54]
mov eax, dword [esp + 0x18]
movsd xmm0, qword [esp + 0x60]
mov ecx, dword [esp + 0x68]
mov ebp, dword [esp + 0x50]
mov edi, dword [esp + 0x58]
mov dword [esp], ebx
shr ebx, 8
mov dword [esp + 0x6c], eax
movsd qword [esp + 0x7c], xmm0
mov dword [esp + 0x84], ecx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x14]
call esi
push dword [esp + 0x70]
call esi
mov eax, ebp
neg eax
jno 0x49080a
mov esi, dword [esp + 0x5c]
mov ecx, dword [esp]
shl ebx, 8
movzx eax, cl
or eax, ebx
mov dword [esi + 4], eax
mov dword [esi + 8], edi
mov dword [esi], 0x80000000
jmp 0x49083b
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x5c]
movzx eax, byte [esp]
movsd xmm0, qword [esp + 0x7c]
shl ebx, 8
mov dword [edx + 0x14], ecx
mov ecx, dword [esp + 0x6c]
or eax, ebx
movsd qword [edx + 0xc], xmm0
mov dword [edx], ebp
mov dword [edx + 4], eax
mov dword [edx + 8], edi
mov dword [edx + 0x18], ecx
add esp, 0x88
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 4], 0
jmp 0x4906c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call esi
push dword [esp]
call esi
ud2