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

Disassembly:
sub esp, 0xc
mov dword [esp], ecx
mov dword [ecx], 0x1007d384
mov eax, dword [esp]
mov ecx, dword [eax + 0x58]
push ebx
xor ebx, ebx
cmp ecx, ebx
push edi
je 0x1004c870
push ecx
call fcn.1005e0e0
mov eax, dword [esp + 0xc]
mov dword [eax + 0x58], ebx
mov eax, dword [esp + 0xc]
add esp, 4
cmp dword [eax + 0x184], ebx
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
je 0x1004c8b3
mov ecx, dword [eax + 0x68]
add ecx, 0x24
push ecx
call esi
mov edx, dword [esp + 0xc]
mov ecx, dword [edx + 0x184]
cmp ecx, ebx
je 0x1004c8a2
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 0x68]
add edx, 0x24
push edx
call edi
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x6c]
cmp ecx, ebx
je 0x1004c8c4
mov eax, dword [ecx]
push ebx
call dword [eax + 8]
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x118], ebx
je 0x1004c8d8
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0xc]
add eax, 0xc
push eax
call esi
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 0x68]
add edx, 0x3c
push edx
call esi
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov eax, dword [esp + 0xc]
mov dword [eax + 4], eax
mov eax, dword [esp + 0xc]
mov dword [eax + 8], eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x68]
add ecx, 0x3c
push ecx
call edi
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 0xf8]
add ecx, 0xf4
xor eax, eax
cmp edx, ecx
je 0x1004c950
mov eax, edx
mov edx, dword [eax + 4]
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov edx, dword [eax + 8]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov dword [eax + 4], eax
mov dword [eax + 8], eax
cmp eax, ebx
je 0x1004c9c4
mov ecx, dword [eax + 0x14]
cmp ecx, ebx
jne 0x1004c97e
cmp byte [eax + 0x18], bl
je 0x1004c974
mov edx, dword [eax + 0x1c]
cmp edx, ebx
jne 0x1004c96b
xor ecx, ecx
jmp 0x1004c977
movzx ecx, word [eax + 0x20]
add ecx, dword [edx + 0x14]
jmp 0x1004c977
mov ecx, dword [eax + 0x1c]
cmp ecx, ebx
mov dword [eax + 0x14], ecx
je 0x1004c981
mov byte [ecx + 4], bl
mov edx, dword [esp + 0xc]
mov ecx, dword [edx + 0x74]
push 1
push eax
call fcn.10049e30
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 0xf8]
add ecx, 0xf4
xor eax, eax
cmp edx, ecx
je 0x1004c9c0
mov eax, edx
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov dword [eax + 4], eax
mov dword [eax + 8], eax
cmp eax, ebx
jne 0x1004c954
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x120]
cmp eax, ebx
je 0x1004ca14
mov ecx, dword [eax + 0x14]
cmp ecx, ebx
jne 0x1004c9fc
cmp byte [eax + 0x18], bl
je 0x1004c9f2
mov edx, dword [eax + 0x1c]
cmp edx, ebx
jne 0x1004c9e9
xor ecx, ecx
jmp 0x1004c9f5
movzx ecx, word [eax + 0x20]
add ecx, dword [edx + 0x14]
jmp 0x1004c9f5
mov ecx, dword [eax + 0x1c]
cmp ecx, ebx
mov dword [eax + 0x14], ecx
je 0x1004c9ff
mov byte [ecx + 4], bl
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x120]
push 1
push ecx
mov ecx, dword [eax + 0x74]
call fcn.10049e30
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x124]
cmp eax, ebx
je 0x1004ca64
mov ecx, dword [eax + 0x14]
cmp ecx, ebx
jne 0x1004ca4c
cmp byte [eax + 0x18], bl
je 0x1004ca42
mov edx, dword [eax + 0x1c]
cmp edx, ebx
jne 0x1004ca39
xor ecx, ecx
jmp 0x1004ca45
movzx ecx, word [eax + 0x20]
add ecx, dword [edx + 0x14]
jmp 0x1004ca45
mov ecx, dword [eax + 0x1c]
cmp ecx, ebx
mov dword [eax + 0x14], ecx
je 0x1004ca4f
mov byte [ecx + 4], bl
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x124]
push 1
push ecx
mov ecx, dword [eax + 0x74]
call fcn.10049e30
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x11c]
cmp eax, ebx
je 0x1004cab4
mov ecx, dword [eax + 0x14]
cmp ecx, ebx
jne 0x1004ca9c
cmp byte [eax + 0x18], bl
je 0x1004ca92
mov edx, dword [eax + 0x1c]
cmp edx, ebx
jne 0x1004ca89
xor ecx, ecx
jmp 0x1004ca95
movzx ecx, word [eax + 0x20]
add ecx, dword [edx + 0x14]
jmp 0x1004ca95
mov ecx, dword [eax + 0x1c]
cmp ecx, ebx
mov dword [eax + 0x14], ecx
je 0x1004ca9f
mov byte [ecx + 4], bl
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x11c]
push 1
push ecx
mov ecx, dword [eax + 0x74]
call fcn.10049e30
mov eax, dword [esp + 0xc]
mov edx, dword [eax + 0x6c]
cmp dword [edx + 0x4c], ebx
je 0x1004cac9
push eax
call fcn.1003f550
add esp, 4
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x6c]
cmp ecx, ebx
je 0x1004cae1
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [esp + 0xc]
mov dword [eax + 0x6c], ebx
mov ecx, dword [esp + 0xc]
add ecx, 0xc
push ecx
call edi
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x60]
cmp eax, ebx
je 0x1004caff
push eax
call fcn.1005e0e0
add esp, 4
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0xf0]
cmp eax, ebx
je 0x1004cb16
push eax
call fcn.1005e0e0
add esp, 4
mov ecx, dword [esp + 0xc]
mov ecx, dword [ecx + 0x17c]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [esp + 0xc]
mov esi, dword [eax + 0x180]
cmp esi, ebx
mov edi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
je 0x1004cb5f
cmp dword [esi + 4], ebx
je 0x1004cb45
mov ecx, esi
call fcn.10040020
mov ecx, dword [esi + 8]
cmp ecx, ebx
lea eax, [esi + 8]
je 0x1004cb52
push eax
call edi
push esi
call fcn.1005e0e0
mov eax, dword [esp + 0x10]
add esp, 4
test byte [eax + 0x110], 0x10
je 0x1004cc2a
mov eax, dword [eax + 0x188]
add eax, 0x3c
push eax
call fcn.10053e20
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x188]
add edx, 4
push edx
call fcn.10054cd0
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x188]
mov eax, dword [ecx + 0x84]
add esp, 8
cmp eax, ebx
je 0x1004cbed
mov ecx, dword [eax + 0x14]
cmp ecx, ebx
jne 0x1004cbcf
cmp byte [eax + 0x18], bl
je 0x1004cbc5
mov edx, dword [eax + 0x1c]
cmp edx, ebx
jne 0x1004cbbc
xor ecx, ecx
jmp 0x1004cbc8
movzx ecx, word [eax + 0x20]
add ecx, dword [edx + 0x14]
jmp 0x1004cbc8
mov ecx, dword [eax + 0x1c]
cmp ecx, ebx
mov dword [eax + 0x14], ecx
je 0x1004cbd2
mov byte [ecx + 4], bl
mov eax, dword [esp + 0xc]
mov edx, dword [eax + 0x188]
mov ecx, dword [edx + 0x84]
push 1
push ecx
mov ecx, dword [eax + 0x74]
call fcn.10049e30
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x188]
mov ecx, dword [eax + 0x78]
push ecx
call fcn.1005e0e0
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x188]
mov ecx, dword [eax + 0x74]
push ecx
call fcn.1005e0e0
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x188]
push eax
call fcn.1005e0e0
mov eax, dword [esp + 0x18]
add esp, 0xc
mov ecx, dword [eax + 0x64]
lea edx, [ecx + 4]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], 0xffffffff
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
lock xadd dword [edx], eax
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10], 1
jne 0x1004cc5d
cmp ecx, ebx
je 0x1004cc5d
mov eax, dword [ecx]
push 1
call dword [eax]
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0x14c]
add esi, 0x13c
cmp eax, ebx
mov dword [esi], 0x1007c5a4
je 0x1004cc83
push eax
call fcn.1005e0e0
add esp, 4
mov dword [esi + 0x10], ebx
mov ecx, esi
call fcn.10060ec0
mov ecx, dword [esp + 0xc]
add ecx, 0xf4
call fcn.10060ec0
mov ecx, dword [esp + 0xc]
add ecx, 0x78
call fcn.1004a260
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x3c]
add eax, 0x3c
cmp ecx, ebx
pop esi
je 0x1004ccb7
push eax
call edi
mov eax, dword [esp + 8]
mov ecx, dword [eax + 0x24]
add eax, 0x24
cmp ecx, ebx
je 0x1004ccc8
push eax
call edi
mov eax, dword [esp + 8]
mov ecx, dword [eax + 0xc]
add eax, 0xc
cmp ecx, ebx
je 0x1004ccd9
push eax
call edi
mov ecx, dword [esp + 8]
pop edi
pop ebx
add esp, 0xc
jmp fcn.10060ec0