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

Disassembly:
sub esp, 0x78
push ebx
push ebp
xor ebp, ebp
cmp dword [esp + 0x88], ebp
push esi
push edi
je 0x4a97e8
cmp dword [esp + 0x94], ebp
jne 0x4a97e8
mov eax, 0xf
mov dword [esp + 0x4c], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x84], eax
push 0x619850
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], vtable.CUDTException.0
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 3
mov dword [esp + 0x50], ebp
mov byte [esp + 0x40], 0
mov dword [esp + 0x6c], ebp
mov byte [esp + 0x5c], 0
mov dword [esp + 0x88], ebp
mov byte [esp + 0x78], 0
mov dword [esp + 0x38], ebp
call fcn.004fa80b
mov ecx, dword [esp + 0x8c]
push ecx
call fcn.004a9e40
mov esi, eax
cmp esi, ebp
jne 0x4a9858
mov eax, 0xf
push 0x619850
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], vtable.CUDTException.0
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 4
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], ebp
mov byte [esp + 0x40], 0
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ebp
mov byte [esp + 0x5c], 0
mov dword [esp + 0x8c], eax
mov dword [esp + 0x88], ebp
mov byte [esp + 0x78], 0
mov dword [esp + 0x38], ebp
call fcn.004fa80b
cmp dword [esi], 3
je 0x4a98ba
mov eax, 0xf
mov dword [esp + 0x4c], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x84], eax
push 0x619850
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], vtable.CUDTException.0
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 6
mov dword [esp + 0x50], ebp
mov byte [esp + 0x40], 0
mov dword [esp + 0x6c], ebp
mov byte [esp + 0x5c], 0
mov dword [esp + 0x88], ebp
mov byte [esp + 0x78], 0
mov dword [esp + 0x38], ebp
call fcn.004fa80b
mov ecx, dword [esi + 0x2c]
cmp byte [ecx + 0x38], 0
je 0x4a9920
mov eax, 0xf
push 0x619850
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], vtable.CUDTException.0
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 7
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], ebp
mov byte [esp + 0x40], 0
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ebp
mov byte [esp + 0x5c], 0
mov dword [esp + 0x8c], eax
mov dword [esp + 0x88], ebp
mov byte [esp + 0x78], 0
mov dword [esp + 0x38], ebp
call fcn.004fa80b
or edi, 0xffffffff
xor bl, bl
mov eax, dword [esi + 0x3c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x30]
cmp dword [eax + 8], ebp
jbe 0x4a997c
mov ecx, dword [eax + 4]
mov edi, dword [ecx]
cmp edi, ecx
jne 0x4a9947
call fcn.004f446a
mov eax, dword [esi + 0x34]
mov ecx, dword [eax + 4]
mov edi, dword [edi + 0xc]
push ecx
push eax
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x20], edi
call fcn.004acc20
mov eax, dword [esi + 0x30]
mov edx, dword [eax + 4]
mov ecx, dword [edx]
push ecx
push eax
lea ecx, [esp + 0x24]
push ecx
push eax
call fcn.00454280
jmp 0x4a9985
mov edx, dword [esi + 0x2c]
cmp byte [edx + 0x19], 0
jne 0x4a9987
mov bl, 1
mov eax, dword [esi + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor ecx, ecx
cmp dword [esi], 3
sete cl
xor edx, edx
test bl, bl
sete dl
test edx, ecx
je 0x4a99b0
mov eax, dword [esi + 0x38]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [esi], 3
jne 0x4a99bf
test bl, bl
je 0x4a9925
jmp 0x4a99c9
mov ecx, dword [esi + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp edi, 0xffffffff
jne 0x4a9a52
mov edx, dword [esi + 0x2c]
cmp byte [edx + 0x19], 0
mov eax, 0xf
mov dword [esp + 0x24], vtable.CUDTException.0
mov dword [esp + 0x48], ebp
mov byte [esp + 0x38], 0
mov dword [esp + 0x64], ebp
mov byte [esp + 0x54], 0
mov dword [esp + 0x80], ebp
mov byte [esp + 0x70], 0
mov dword [esp + 0x30], ebp
push 0x619850
mov dword [esp + 0x50], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x88], eax
jne 0x4a9a38
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x30], 6
mov dword [esp + 0x34], 2
call fcn.004fa80b
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 6
call fcn.004fa80b
push edi
call fcn.004a9e40
mov edx, dword [eax + 0x10]
mov eax, dword [esp + 0x94]
sub edx, 2
neg edx
sbb edx, edx
and edx, 0xc
add edx, 0x10
mov dword [eax], edx
mov eax, edx
push eax
push edi
call fcn.004a9e40
mov ecx, dword [eax + 0x18]
mov edx, dword [esp + 0x94]
push ecx
push edx
call fcn.004ffc50
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret 0xc