Function at 0x49cdc0
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.00494c10
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
cmp eax, 2
jne 0x49cdf0
mov ebx, ecx
shr ebx, 8
jmp 0x49d2b4
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 0x49ce31
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 0x49d0cb
test dl, 1
je 0x49d0fb
mov dword [esp], edi
push 0
push 1
push 1
push 0
call dword [sym.imp.kernel32.dll_CreateEventW]
test eax, eax
je 0x49d313
mov edi, eax
movzx eax, byte [0x90320d]
xor ecx, ecx
mov edx, 0x14
call fcn.0049d570
test eax, eax
je 0x49d327
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 0x49d12f
mov ebx, eax
movzx eax, byte [0x90320d]
xor ecx, ecx
mov edx, 0x14
call fcn.0049d570
test eax, eax
je 0x49d327
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 0x49cfc0
test eax, eax
jne 0x49d179
mov eax, dword [esp + 0x18]
test eax, eax
je 0x49d01d
cmp eax, 1
jne 0x49d002
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 0x49d048
mov ebp, dword [esp + 0xc]
jmp 0x49d006
mov eax, dword [esp + 0x30]
test eax, eax
je 0x49d093
cmp eax, 2
jne 0x49cfda
mov ebp, dword [esp + 0x34]
jmp 0x49d080
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 0x49d05f
mov ebp, dword [esp + 0xc]
jmp 0x49d080
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x24]
add dword [eax + 8], ebp
test ebp, ebp
je 0x49d16a
mov ecx, edi
lea edx, [esp + 0x18]
call fcn.0049d330
movzx ecx, byte [esp + 0xc]
movzx eax, byte [esp + 0xd]
cmp cl, 4
jne 0x49d14e
test al, 1
jne 0x49cf60
jmp 0x49d16a
xor ebp, ebp
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x26
je 0x49d006
cmp eax, 0x6d
je 0x49d006
jmp 0x49d306
xor ebp, ebp
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x26
je 0x49d080
cmp eax, 0x6d
jne 0x49d306
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 0x49d0b9
mov ecx, edi
lea edx, [esp + 0x30]
call fcn.0049d330
movzx ecx, byte [esp + 0xc]
movzx eax, byte [esp + 0xd]
cmp cl, 4
jne 0x49d14e
test al, 1
jne 0x49cf60
lea ecx, [esp + 4]
lea edx, [esp + 0x18]
call fcn.0049d410
jmp 0x49d188
test dl, 1
je 0x49d1f1
lea eax, [esp + 0x60]
mov dword [esp + 0x18], edi
lea ecx, [esp + 0x30]
lea edx, [esp + 0x18]
push eax
call fcn.00494530
add esp, 4
cmp byte [esp + 0x30], 4
jne 0x49d327
push edi
jmp 0x49d120
lea eax, [esp + 0x50]
mov dword [esp + 0x18], ebp
lea ecx, [esp + 0x30]
lea edx, [esp + 0x18]
push eax
call fcn.00494530
add esp, 4
cmp byte [esp + 0x30], 4
jne 0x49d327
push ebp
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ecx, dword [esp + 0x14]
jmp 0x49d1f1
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 0x49d1b5
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 0x49d188
lea ecx, [esp + 4]
lea edx, [esp + 0x30]
call fcn.0049d410
jmp 0x49d188
call dword [sym.imp.kernel32.dll_GetLastError]
mov byte [esp + 4], 0
mov dword [esp + 8], eax
lea ecx, [esp + 0x30]
call fcn.0049d4c0
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 [0x903200]
call dword [sym.imp.kernel32.dll_HeapFree]
lea ecx, [esp + 0x18]
call fcn.0049d4c0
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 [0x903200]
call dword [sym.imp.kernel32.dll_HeapFree]
cmp byte [esp + 4], 4
mov ecx, dword [esp + 0x14]
jne 0x49d327
push 0xffffffffffffffff
push ecx
mov edi, ecx
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
test eax, eax
mov dword [esp + 0x5c], esi
je 0x49d24c
call dword [sym.imp.kernel32.dll_GetLastError]
cmp dword [esp + 0x60], 0
mov edi, eax
je 0x49d225
push dword [esp + 0x64]
push 0
push dword [0x903200]
call dword [sym.imp.kernel32.dll_HeapFree]
cmp dword [esp + 0x50], 0
je 0x49d23e
push dword [esp + 0x54]
push 0
push dword [0x903200]
call dword [sym.imp.kernel32.dll_HeapFree]
mov ebp, 0x80000000
mov dword [esp], 0
jmp 0x49d295
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push edi
call dword [sym.imp.kernel32.dll_GetExitCodeProcess]
test eax, eax
je 0x49d204
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 0x49d2ca
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 0x49d2fb
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 0x49d184
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