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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
sub esp, 0x34
test eax, eax
je 0x1005b68b
and dword [eax], 0
push ebx
push esi
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x24]
mov ebx, dword [esi + 0x10]
mov ecx, dword [esi + 0x20]
cmp edx, eax
jb 0x1005b6ad
ja 0x1005b6a6
cmp ebx, ecx
jb 0x1005b6ad
xor eax, eax
jmp 0x1005b9ea
sub ecx, ebx
sbb eax, edx
xor edx, edx
cmp edx, eax
jb 0x1005b6c1
ja 0x1005b6be
cmp dword [ebp + 0x10], ecx
jbe 0x1005b6c1
mov dword [ebp + 0x10], ecx
cmp dword [ebp + 0x10], edx
je 0x1005b6a6
push edi
mov ebx, dword [esi + 0x38]
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 0x14]
mov ecx, ebx
call fcn.100b1970
mov edi, eax
xor eax, eax
inc eax
mov ecx, ebx
shl eax, cl
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edx
lea ebx, [eax - 1]
and ebx, dword [esi + 0x10]
mov dword [ebp - 4], eax
sub eax, ebx
cmp dword [ebp + 0x10], eax
jbe 0x1005b6f9
mov dword [ebp + 0x10], eax
cmp edi, dword [esi + 0x58]
jne 0x1005b707
cmp edx, dword [esi + 0x5c]
je 0x1005b93b
mov edi, dword [esi + 0x3c]
mov eax, dword [ebp - 0x1c]
mov ecx, edi
call fcn.100b1970
mov ecx, dword [esi + 0x4c]
mov dword [ebp - 0x30], edx
xor edx, edx
cmp dword [ebp - 0x30], edx
ja 0x1005b9c4
jb 0x1005b72f
cmp eax, ecx
jae 0x1005b9c4
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx + eax*4]
cmp dword [eax + 4], 0
je 0x1005b9c4
xor edx, edx
inc edx
mov ecx, edi
shl edx, cl
mov ecx, dword [eax]
dec edx
and edx, dword [ebp - 0x1c]
mov eax, dword [ecx + edx*8]
mov edx, dword [ecx + edx*8 + 4]
bswap edx
bswap eax
mov ecx, edx
or ecx, eax
je 0x1005b9c4
mov ecx, dword [esi + 0x40]
mov edi, dword [esi + 0x44]
and ecx, edx
and edi, eax
or ecx, edi
je 0x1005b95b
cmp dword [esi + 0xa4], 1
jbe 0x1005b951
push 0x46
pop edi
sub edi, dword [esi + 0x38]
and eax, 0x3fffffff
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
mov eax, edx
mov edx, dword [ebp - 8]
mov ecx, edi
call fcn.100b1970
mov ebx, eax
xor eax, eax
inc ebx
inc eax
xor edx, edx
mov ecx, edi
shl ebx, 9
call fcn.100b1ad0
mov ecx, dword [esi + 0x70]
add eax, 0xffffffff
adc edx, 0xffffffff
and dword [ebp - 0xc], eax
and dword [ebp - 8], edx
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov edx, dword [esi + 0x74]
and edi, 0xfffffe00
mov dword [ebp - 0x10], eax
mov eax, edi
sub eax, ecx
mov ecx, dword [ebp - 0x10]
sbb ecx, edx
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x10], edx
jb 0x1005b82b
ja 0x1005b7e8
cmp edi, dword [esi + 0x70]
jb 0x1005b82b
xor ecx, ecx
cmp dword [ebp - 0x20], ecx
ja 0x1005b82b
jb 0x1005b7f6
cmp eax, dword [esi + 0x78]
jae 0x1005b82b
mov ecx, eax
or ecx, dword [ebp - 0x20]
je 0x1005b81e
mov edx, dword [esi + 0x78]
mov ecx, dword [esi + 0x68]
sub edx, eax
push edx
add eax, ecx
push eax
push ecx
mov dword [esi + 0x78], edx
call fcn.100b1250
mov eax, dword [ebp - 0x10]
add esp, 0xc
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], eax
mov eax, dword [esi + 0x78]
add edi, eax
mov eax, dword [ebp - 0x10]
adc eax, 0
jmp 0x1005b838
mov eax, dword [ebp - 0x10]
and dword [esi + 0x78], 0
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], eax
cmp edi, dword [esi + 0x18]
jne 0x1005b842
cmp eax, dword [esi + 0x1c]
je 0x1005b853
push eax
push edi
mov ecx, esi
call fcn.10064b79
test eax, eax
jne 0x1005b9e9
cmp dword [esi + 0x6c], ebx
jb 0x1005b951
mov eax, dword [esi + 0x78]
mov edx, dword [esi + 0x68]
lea ecx, [ebp + 8]
mov edi, ebx
sub edi, eax
push ecx
mov ecx, dword [esi + 0x28]
add edx, eax
mov dword [ebp + 8], edi
call fcn.10021a0d
test eax, eax
jne 0x1005b9e9
mov eax, dword [ebp + 8]
add dword [esi + 0x18], eax
adc dword [esi + 0x1c], 0
cmp eax, edi
jne 0x1005b951
add dword [esi + 0x78], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [esi + 0x68]
and eax, 0x1ff
push 0
sub ebx, eax
add ecx, eax
push ebx
push ecx
mov ecx, dword [esi + 0x88]
call fcn.10021593
mov edi, dword [ebp - 4]
or dword [esi + 0x58], 0xffffffff
or dword [esi + 0x5c], 0xffffffff
cmp dword [esi + 0x64], edi
jb 0x1005b951
mov eax, dword [esi + 0x90]
mov ecx, dword [esi + 0x60]
mov dword [eax + 8], ecx
xor edx, edx
mov dword [eax + 0x10], edx
mov dword [eax + 0xc], edi
mov ecx, dword [esi + 0x94]
mov eax, dword [esi + 0x98]
push edx
mov dword [ebp - 0x28], edx
lea edx, [ebp - 0x2c]
push edx
push 0
push ecx
push dword [esi + 0x8c]
mov dword [ebp - 0x2c], edi
mov ebx, dword [eax]
push eax
call dword [ebx + 0xc]
test eax, eax
jne 0x1005b9e9
mov eax, dword [esi + 0x98]
cmp dword [eax + 0xc98], 0xffffffff
jne 0x1005b933
mov eax, dword [esi + 0x90]
cmp dword [eax + 0x10], edi
jne 0x1005b933
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x58], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x5c], eax
jmp 0x1005b6c7
xor eax, eax
inc eax
jmp 0x1005b9e9
push dword [ebp + 0x10]
mov eax, dword [esi + 0x60]
add eax, ebx
push eax
push dword [ebp + 0xc]
call fcn.100b0db0
jmp 0x1005b9d1
mov eax, 0x80004005
jmp 0x1005b9e9
mov ecx, edx
and ecx, 0x1ff
cmp ecx, 1
je 0x1005b9c4
mov ecx, dword [esi + 0x40]
mov edi, dword [esi + 0x44]
add ecx, 0xffffffff
adc edi, 0xffffffff
and edi, eax
and ecx, edx
xor eax, eax
add ecx, ebx
adc edi, eax
cmp ecx, dword [esi + 0x18]
jne 0x1005b988
cmp edi, dword [esi + 0x1c]
je 0x1005b995
push edi
push ecx
mov ecx, esi
call fcn.10064b79
test eax, eax
jne 0x1005b9e9
mov eax, dword [esi + 0x28]
mov ecx, dword [eax]
lea edx, [ebp + 0x10]
push edx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call dword [ecx + 0xc]
mov edx, dword [ebp + 0x10]
xor ecx, ecx
add dword [esi + 0x18], edx
adc dword [esi + 0x1c], ecx
add dword [esi + 0x10], edx
adc dword [esi + 0x14], ecx
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1005b9e9
mov dword [ecx], edx
jmp 0x1005b9e9
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
call fcn.100b18c0
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
add esp, 0xc
add dword [esi + 0x10], eax
adc dword [esi + 0x14], 0
test ecx, ecx
je 0x1005b9e7
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10