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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [esp + 0x10], 0
test esi, esi
je 0x1005168f
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
mov ebx, dword [ebp + 8]
mov edi, dword [ebx + 0x2c]
mov dword [ebx + 0x5c], eax
mov edx, dword [esi]
mov eax, dword [edx + 0x68]
add ebx, 0x2c
push 0
push esi
add edi, 0x38
call eax
mov edx, dword [edi]
dec eax
neg eax
sbb eax, eax
neg eax
push eax
mov ecx, ebx
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x9c]
lea ecx, [esp + 0x20]
push ecx
push 1
push esi
mov dword [esp + 0x2c], 0
call edx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10051111
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push eax
call edx
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xd8], eax
mov ebx, 0x83
lea edi, [esp + 0x24]
call fcn.100036f0
mov ebx, dword [ebp + 8]
lea eax, [ebx + 0xec]
call fcn.10003840
mov eax, dword [esp + 0x24]
lea edx, [eax - 0xc]
cmp edx, 0x100bc65c
je 0x10051153
lea edi, [eax - 0xc]
push edi
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x10051153
push edi
call fcn.1008441c
add esp, 4
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
push eax
call edx
mov ecx, 1
mov dword [ebx + 0xd0], eax
call fcn.10055a30
xor edi, edi
cmp eax, edi
je 0x10051181
lea ecx, [esp + 0x64]
mov dword [eax], ecx
mov dword [esp + 0x64], eax
jmp 0x10051185
mov dword [esp + 0x64], edi
call fcn.10052790
mov ecx, 1
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], edi
call fcn.10055a30
cmp eax, edi
je 0x100511ac
lea edx, [esp + 0x48]
mov dword [eax], edx
mov dword [esp + 0x48], eax
jmp 0x100511b0
mov dword [esp + 0x48], edi
call fcn.10052790
mov dword [esp + 0x5c], eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x78]
push esi
mov dword [esp + 0x64], edi
call ecx
cmp eax, edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x24], edi
jle 0x100515a7
jmp 0x100511da
mov esi, dword [ebp + 0xc]
mov eax, dword [esp + 0x24]
mov edx, dword [esi]
mov ecx, dword [edx + 0x7c]
push eax
push esi
call ecx
mov esi, eax
mov edx, dword [esi]
mov eax, dword [edx + 0x68]
push esi
call eax
cmp eax, 1
je 0x100514a3
mov ecx, dword [esi]
mov edx, dword [ecx + 0x34]
push esi
call edx
mov ebx, eax
lea edi, [esp + 0x34]
call fcn.100036f0
mov ecx, dword [esp + 0x34]
mov edx, dword [esi]
xor eax, eax
cmp dword [ecx - 8], eax
push esi
setne al
mov dword [esp + 0x2c], 0x40
inc eax
mov dword [esp + 0x34], eax
mov eax, dword [edx + 0x40]
call eax
mov ebx, eax
lea edi, [esp + 0x1c]
call fcn.100036f0
mov ecx, dword [esp + 0x1c]
cmp dword [ecx - 8], 0
jne 0x10051265
mov edx, dword [esi]
mov eax, dword [edx + 0x88]
push esi
call eax
push eax
mov eax, edi
call fcn.100035a0
mov ecx, dword [esi]
mov edx, dword [ecx + 0x80]
push esi
call edx
mov dword [esp + 0x28], eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x28]
push esi
call ecx
mov ebx, eax
lea edi, [esp + 0x18]
call fcn.100036f0
mov edx, dword [esp + 0x18]
cmp dword [edx - 8], 0
jne 0x10051292
mov eax, dword [esi]
mov ecx, dword [eax + 0x1c]
push esi
call ecx
push eax
mov eax, edi
call fcn.100035a0
push 0x100c5a78
push 0x20
call fcn.10085206
mov edi, eax
add esp, 8
mov dword [esp + 0x14], edi
test edi, edi
je 0x10051343
mov edx, dword [ebp + 8]
cmp dword [edx + 0xd8], 0
je 0x100512c1
lea eax, [esp + 0x1c]
jmp 0x100512d8
or dword [esp + 0x10], 1
mov ebx, 0x100a7638
lea edi, [esp + 0x2c]
call fcn.100036f0
mov edi, dword [esp + 0x14]
mov ecx, dword [esi]
mov eax, dword [eax]
mov edx, dword [ecx + 0x34]
push esi
mov dword [esp + 0x44], eax
call edx
mov dword [esp + 0x3c], eax
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
mov ebx, dword [esp + 0x18]
mov dword [edi], eax
add edi, 4
call fcn.100036f0
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x3c]
add edi, 8
call fcn.100036f0
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x40]
add edi, 0xc
call fcn.100036f0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
mov ecx, 1
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov ecx, dword [esp + 0x28]
mov dword [eax + 0x10], edx
mov dword [eax + 0x1c], ecx
mov dword [esp + 0x14], eax
jmp 0x1005134b
mov dword [esp + 0x14], 0
test byte [esp + 0x10], 1
je 0x10051384
mov eax, dword [esp + 0x2c]
and dword [esp + 0x10], 0xfffffffe
lea edx, [eax - 0xc]
cmp edx, 0x100bc65c
je 0x10051384
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x10051384
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff4
push eax
call fcn.1008441c
add esp, 4
cmp dword [esp + 0x30], 2
lea ecx, [esp + 0x14]
push ecx
jne 0x100513c7
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0xc8]
mov edx, dword [edi + 4]
add eax, 0xb4
push edx
push edi
call fcn.10052900
mov edx, dword [ebp + 8]
mov ecx, 1
add edx, 0xb4
mov ebx, eax
call fcn.100529b0
mov dword [edi + 4], ebx
mov eax, dword [ebx + 4]
mov dword [eax], ebx
jmp 0x100513ef
mov eax, dword [esp + 0x7c]
mov edx, dword [eax + 4]
lea ebx, [eax + 4]
push edx
push eax
call fcn.10052900
mov ecx, 1
lea edx, [esp + 0x64]
mov edi, eax
call fcn.100529b0
mov dword [ebx], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
push esi
call edx
mov ebx, dword [ebp + 8]
mov esi, dword [ebx + 0xac]
mov ecx, dword [esi + 4]
mov dword [esp + 0x40], eax
add ebx, 0x98
lea eax, [esp + 0x40]
push eax
push ecx
push esi
call fcn.10052900
mov ecx, ebx
mov edi, eax
call fcn.10052870
mov eax, dword [esp + 0x18]
mov dword [esi + 4], edi
mov edx, dword [edi + 4]
lea ecx, [eax - 0xc]
mov dword [edx], edi
mov edi, dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
cmp ecx, 0x100bc65c
je 0x10051452
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x10051452
push esi
call fcn.1008441c
add esp, 4
mov eax, dword [esp + 0x1c]
lea edx, [eax - 0xc]
cmp edx, 0x100bc65c
je 0x10051474
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x10051474
push esi
call fcn.1008441c
add esp, 4
mov eax, dword [esp + 0x34]
lea ecx, [eax - 0xc]
cmp ecx, 0x100bc65c
je 0x10051591
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x10051591
push esi
call fcn.1008441c
add esp, 4
jmp 0x10051591
push 0x100c5a78
push 0x20
call fcn.10085206
add esp, 8
mov dword [esp + 0x40], eax
test eax, eax
je 0x1005152a
or dword [esp + 0x10], 2
mov ebx, 0x70
lea edi, [esp + 0x38]
call fcn.100036f0
mov edx, dword [esi]
mov eax, dword [edx + 0x34]
push esi
call eax
mov ecx, dword [esi]
mov edx, dword [ecx + 0x1c]
push esi
mov dword [esp + 0x40], eax
call edx
mov ebx, eax
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
mov esi, dword [esp + 0x40]
lea edi, [esi + 4]
mov dword [esi], eax
call fcn.100036f0
mov ebx, dword [esp + 0x3c]
lea edi, [esi + 8]
call fcn.100036f0
mov ebx, dword [esp + 0x38]
lea edi, [esi + 0xc]
call fcn.100036f0
mov ecx, 1
xor eax, eax
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], eax
mov dword [esp + 0x30], esi
jmp 0x10051536
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x30], 0
test byte [esp + 0x10], 2
je 0x10051564
and dword [esp + 0x10], 0xfffffffd
lea edx, [ebx - 0xc]
cmp edx, 0x100bc65c
je 0x10051564
add ebx, 0xfffffff4
push ebx
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x10051564
push ebx
call fcn.1008441c
add esp, 4
mov eax, dword [esp + 0x5c]
mov edx, dword [eax + 4]
lea edi, [eax + 4]
lea ecx, [esp + 0x30]
push ecx
push edx
push eax
call fcn.10052900
mov ecx, 1
lea edx, [esp + 0x48]
mov esi, eax
call fcn.100529b0
mov dword [edi], esi
mov eax, dword [esi + 4]
mov dword [eax], esi
mov eax, dword [esp + 0x24]
inc eax
cmp eax, dword [esp + 0x44]
mov dword [esp + 0x24], eax
jl 0x100511d7
mov ebx, dword [ebp + 8]
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x64]
mov edx, dword [eax]
mov esi, dword [ebx + 0xc8]
push eax
push ecx
push edx
lea edi, [ebx + 0xb4]
mov ebx, dword [edi]
push ecx
push esi
push ebx
push edi
lea eax, [esp + 0x80]
call fcn.10052580
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x48]
mov edx, dword [eax]
mov esi, dword [edi + 0x14]
mov ebx, dword [edi]
push eax
push ecx
push edx
push ecx
push esi
push ebx
push edi
lea eax, [esp + 0x64]
call fcn.10052580
mov esi, dword [ebp + 8]
call fcn.10052190
mov ecx, dword [esp + 0x5c]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [esp + 0x5c]
mov dword [ecx + 4], ecx
mov ecx, dword [esp + 0x5c]
xor edi, edi
mov dword [esp + 0x60], edi
cmp eax, ecx
je 0x1005162b
mov esi, dword [eax]
push eax
call fcn.10083db0
mov ecx, dword [esp + 0x60]
add esp, 4
mov eax, esi
cmp esi, ecx
jne 0x10051616
push ecx
call fcn.10083db0
mov ecx, dword [esp + 0x4c]
add esp, 4
push ecx
mov dword [esp + 0x60], edi
call fcn.10083db0
mov ecx, dword [esp + 0x7c]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [esp + 0x7c]
mov dword [ecx + 4], ecx
mov ecx, dword [esp + 0x7c]
add esp, 4
mov dword [esp + 0x7c], edi
cmp eax, ecx
je 0x10051675
mov esi, dword [eax]
push eax
call fcn.10083db0
mov ecx, dword [esp + 0x7c]
add esp, 4
mov eax, esi
cmp esi, ecx
jne 0x10051660
push ecx
call fcn.10083db0
mov edx, dword [esp + 0x68]
add esp, 4
push edx
mov dword [esp + 0x7c], edi
call fcn.10083db0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8