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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10180720
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x101c6444]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x1c], esi
xor ebx, ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
lea eax, [esi + 8]
mov dword [esp + 0x44], eax
add eax, 4
push eax
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x44], 0x101975f4
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x28]
mov eax, dword [eax]
add esi, 0x24
mov ebp, eax
mov eax, dword [esi + 4]
mov edi, esi
mov byte [esp + 0x88], 1
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x3c], eax
jmp 0x10059720
cmp edi, ebx
je 0x10059728
cmp edi, esi
je 0x1005972d
call fcn.1015828d
cmp ebp, dword [esp + 0x3c]
je 0x100598e2
cmp edi, ebx
jne 0x10059740
call fcn.1015828d
cmp ebp, dword [edi + 4]
jne 0x1005974a
call fcn.1015828d
lea ecx, [esp + 0x60]
lea edi, [ebp + 0x10]
push ecx
lea ecx, [edi + 0x18]
call fcn.100dcb80
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x88], 2
jb 0x1005976d
mov eax, dword [eax + 4]
jmp 0x10059770
add eax, 4
push eax
call fcn.1002d140
add esp, 4
test al, al
sete bl
cmp dword [esp + 0x78], 0x10
mov byte [esp + 0x88], 1
jb 0x1005979a
mov edx, dword [esp + 0x64]
push edx
call fcn.10157f3b
add esp, 4
test bl, bl
mov ebx, dword [esp + 0x24]
je 0x100597eb
cmp ebp, dword [ebx + 4]
jne 0x100597ac
call fcn.1015828d
lea eax, [esp + 0x60]
push eax
lea ecx, [edi + 0x18]
call fcn.1005c850
mov ecx, dword [esp + 0x1c]
push eax
add ecx, 0x30
mov byte [esp + 0x8c], 3
call fcn.10059560
cmp dword [esp + 0x78], 0x10
mov byte [esp + 0x88], 1
jb 0x100598b6
mov ecx, dword [esp + 0x64]
push ecx
jmp 0x100598ae
xor eax, eax
cmp ebp, dword [ebx + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
jne 0x100597ff
call fcn.1015828d
lea edx, [esp + 0x60]
push edx
lea ecx, [edi + 0x18]
call fcn.100dcb80
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x88], 4
jb 0x1005981f
mov eax, dword [eax + 4]
jmp 0x10059822
add eax, 4
lea ecx, [esp + 0x14]
push ecx
push eax
call fcn.1002be90
add esp, 8
cmp dword [esp + 0x78], 0x10
mov byte [esp + 0x88], 1
jb 0x1005984c
mov edx, dword [esp + 0x64]
push edx
call fcn.10157f3b
add esp, 4
cmp ebp, dword [ebx + 4]
jne 0x10059856
call fcn.1015828d
lea ecx, [edi + 0x18]
call fcn.1005c660
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jne 0x1005986e
mov eax, dword [esp + 0x18]
cmp eax, edx
je 0x100598ca
cmp ebp, dword [ebx + 4]
jne 0x10059878
call fcn.1015828d
lea ecx, [esp + 0x60]
push ecx
lea ecx, [edi + 0x18]
call fcn.1005c850
mov ecx, dword [esp + 0x1c]
push eax
add ecx, 0x30
mov byte [esp + 0x8c], 5
call fcn.10059560
cmp dword [esp + 0x78], 0x10
mov byte [esp + 0x88], 1
jb 0x100598b6
mov edx, dword [esp + 0x64]
push edx
call fcn.10157f3b
add esp, 4
cmp ebp, dword [ebx + 4]
jne 0x100598c0
call fcn.1015828d
push edi
lea ecx, [esp + 0x54]
call fcn.10058800
lea ecx, [esp + 0x24]
call fcn.10053bd0
mov ebp, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
xor ebx, ebx
jmp 0x10059720
mov edi, dword [esp + 0x54]
cmp edi, ebx
mov ecx, dword [esp + 0x58]
jne 0x100598f4
mov dword [esp + 0x1c], ebx
jmp 0x1005990d
mov edx, ecx
sub edx, edi
mov eax, 0x66666667
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x1c], 0
jle 0x100599c8
mov dword [esp + 0x14], 0
jmp 0x1005992a
mov ecx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
test edi, edi
je 0x10059945
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x1005994e
call fcn.1015828d
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x14]
add edi, eax
push edi
mov ecx, esi
call fcn.10054410
test esi, esi
mov ebp, eax
jne 0x10059967
call fcn.1015828d
push edi
mov ecx, esi
call fcn.10054210
test esi, esi
mov edi, eax
jne 0x1005997a
call fcn.1015828d
mov eax, esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edi
test eax, eax
je 0x1005998c
cmp eax, esi
je 0x10059991
call fcn.1015828d
cmp dword [esp + 0x30], ebp
je 0x100599a6
lea ecx, [esp + 0x2c]
call fcn.10053bd0
mov eax, dword [esp + 0x2c]
jmp 0x10059984
push ebp
push esi
push edi
push esi
lea ecx, [esp + 0x58]
push ecx
mov ecx, esi
call fcn.10055840
add dword [esp + 0x14], 0x14
add ebx, 1
cmp ebx, dword [esp + 0x1c]
jl 0x10059922
mov edx, dword [esi + 4]
mov ebp, dword [edx]
xor ebx, ebx
mov edi, esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebp
lea ecx, [ecx]
test edi, edi
je 0x100599e8
cmp edi, esi
je 0x100599ed
call fcn.1015828d
cmp ebp, dword [esp + 0x3c]
je 0x10059a27
test edi, edi
jne 0x100599fc
call fcn.1015828d
cmp ebp, dword [edi + 4]
jne 0x10059a06
call fcn.1015828d
lea ecx, [ebp + 0x28]
call fcn.100dc790
add ebx, eax
adc dword [esp + 0x30], edx
lea ecx, [esp + 0x24]
call fcn.10053bd0
mov ebp, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
jmp 0x100599e0
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x54]
test eax, eax
je 0x10059a43
push eax
call fcn.10157f3b
add esp, 4
mov edx, dword [esp + 0x30]
mov eax, ebx
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret