Function at 0x10059170
Capabilities:
Link many functions at runtime
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x6c]
push edi
mov ebx, eax
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x74]
push eax
lea ebp, [esi + 0x5c]
push ebp
call fcn.1005ab90
mov ecx, dword [esp + 0x78]
lea eax, [esi + 0x74]
push ecx
push eax
call fcn.1005ab90
push ebx
lea eax, [esi + 0x8c]
call fcn.100035a0
lea edi, [esp + 0x14]
call fcn.100036f0
mov edx, edi
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.100606e0
mov ebx, dword [eax]
mov eax, 1
add esp, 8
test byte [0x100c7cd0], al
jne 0x100591f6
or dword [0x100c7cd0], eax
mov esi, 0x100c7c48
call fcn.100469f0
push 0x100a35e0
call fcn.1008416d
mov esi, dword [esp + 0x74]
add esp, 4
push 0x100ade0c
mov eax, 0x100ade1c
mov ecx, 0x100c7c48
call fcn.10047bb0
mov eax, dword [esp + 0x18]
mov ebx, dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, 0x100bc65c
je 0x10059239
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x10059239
mov edx, dword [esp + 0x18]
add edx, 0xfffffff4
push edx
call fcn.1008441c
add esp, 4
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xc]
cmp ecx, 0x100bc65c
je 0x1005925b
lea edi, [eax - 0xc]
push edi
call ebx
test eax, eax
jg 0x1005925b
push edi
call fcn.1008441c
add esp, 4
mov eax, dword [esp + 0x78]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
mov edx, dword [0x100bc66c]
mov dword [esp + 0x18], edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, dword [esp + 0x78]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push 0x100ade34
lea ecx, [esp + 0x24]
call fcn.10001df0
mov eax, 1
add esp, 0xc
test byte [0x100c7cd0], al
jne 0x100592da
or dword [0x100c7cd0], eax
mov esi, 0x100c7c48
call fcn.100469f0
push 0x100a35e0
call fcn.1008416d
mov esi, dword [esp + 0x74]
add esp, 4
mov ebx, dword [esp + 0x18]
push 0x100ade60
mov eax, 0x100ade1c
mov ecx, 0x100c7c48
call fcn.10047bb0
mov ecx, dword [esi + 0x84]
sub ecx, dword [esi + 0x80]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x1005947e
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x1005947e
mov eax, dword [esi + 0x58]
xor edi, edi
cmp eax, edi
je 0x1005937d
mov edx, dword [eax]
mov edx, dword [edx + 0x108]
lea ecx, [esp + 0x70]
push ecx
push 1
push 0x817
push eax
mov dword [esp + 0x80], edi
call edx
mov eax, dword [esp + 0x70]
cmp eax, edi
je 0x1005937d
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
push 0x10000000
push edi
push eax
call edx
mov eax, dword [esp + 0x70]
cmp eax, edi
je 0x1005937d
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esi + 0x58]
cmp eax, edi
je 0x100593c8
mov ecx, dword [eax]
lea edx, [esp + 0x70]
push edx
push 1
push 0x816
push eax
mov eax, dword [ecx + 0x108]
mov dword [esp + 0x80], edi
call eax
mov eax, dword [esp + 0x70]
cmp eax, edi
je 0x100593c8
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
push edi
push 0x10000000
push eax
call edx
mov eax, dword [esp + 0x70]
cmp eax, edi
je 0x100593c8
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, 2
lea edi, [esp + 0x70]
cmp dword [esp + 0x7c], eax
jne 0x100593e6
mov dword [esp + 0x14], 1
mov ebx, 0xa0
jmp 0x100593ef
mov dword [esp + 0x14], eax
mov ebx, 0x9f
call fcn.100036f0
push 0
push 0
lea eax, [esp + 0x78]
mov ecx, dword [eax]
mov eax, dword [esi + 0x58]
push 0
push 0x830
call fcn.1003f450
mov ebx, dword [esp + 0x24]
add esp, 0x10
test bl, 2
je 0x10059442
mov eax, dword [esp + 0x70]
lea ecx, [eax - 0xc]
and ebx, 0xfffffffd
cmp ecx, 0x100bc65c
je 0x10059442
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x10059442
push esi
call fcn.1008441c
add esp, 4
test bl, 1
je 0x1005a34e
mov eax, dword [esp + 0x70]
lea edx, [eax - 0xc]
cmp edx, 0x100bc65c
je 0x1005a34e
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x1005a34e
push esi
call fcn.1008441c
add esp, 4
jmp 0x1005a34e
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x1005960d
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x2aaaaaab
imul ecx
mov eax, dword [esi + 0x58]
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 3
sbb edx, edx
inc edx
push edx
push 0x81f
call fcn.1003e890
add esp, 8
mov dword [esp + 0x1c], 0x81c
mov dword [esp + 0x20], 0x81d
mov dword [esp + 0x24], 0x81e
xor edi, edi
mov eax, dword [esi + 0x58]
mov ecx, dword [esp + edi*4 + 0x1c]
test eax, eax
je 0x10059531
mov edx, dword [eax]
lea ebx, [esp + 0x74]
push ebx
push 1
push ecx
push eax
mov eax, dword [edx + 0x108]
mov dword [esp + 0x84], 0
call eax
mov eax, dword [esp + 0x74]
test eax, eax
je 0x10059531
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
push 0x10000000
push 0
push eax
call edx
mov eax, dword [esp + 0x74]
test eax, eax
je 0x10059531
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
inc edi
cmp edi, 3
jb 0x100594e1
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
xor edi, edi
add eax, edx
je 0x1005960d
mov dword [esp + 0x78], edi
cmp dword [esp + 0x78], 0x18
jae 0x1005960d
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x1005959f
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059583
mov ebx, 0x9c
jmp 0x100595a8
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x1005959f
mov ebx, 0x9c
jmp 0x100595a8
push 0x9c
call eax
mov ebx, eax
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp edi, ecx
jb 0x100595c7
call fcn.100848cc
mov eax, dword [esp + edi*4 + 0x1c]
mov edx, dword [ebp + 0xc]
mov ecx, dword [esp + 0x78]
mov ecx, dword [ecx + edx]
push ebx
push 1
push 1
push eax
mov eax, dword [esi + 0x58]
call fcn.1003f450
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
add dword [esp + 0x88], 0xc
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add esp, 0x10
cmp edi, eax
jb 0x10059559
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov ebx, dword [esi + 0x58]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edi, ecx
neg edi
sbb edi, edi
neg edi
test ebx, ebx
je 0x10059690
mov edx, dword [ebx]
mov ecx, dword [edx + 0x108]
lea eax, [esp + 0x78]
push eax
push 1
push 0x81b
push ebx
mov dword [esp + 0x88], 0
call ecx
mov eax, dword [esp + 0x78]
test eax, eax
je 0x10059690
test edi, edi
je 0x10059671
mov edx, dword [eax]
push 0
push 0x10000000
push eax
mov eax, dword [edx + 0x5c]
call eax
jmp 0x10059680
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
push 0x10000000
push 0
push eax
call edx
mov eax, dword [esp + 0x78]
test eax, eax
je 0x10059690
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov ebx, dword [esi + 0x58]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edi, eax
neg edi
sbb edi, edi
inc edi
test ebx, ebx
je 0x1005970a
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x108]
lea edx, [esp + 0x78]
push edx
push 1
push 0x82b
push ebx
mov dword [esp + 0x88], 0
call eax
mov eax, dword [esp + 0x78]
test eax, eax
je 0x1005970a
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
test edi, edi
je 0x100596f0
push 0
push 0x10000000
jmp 0x100596f7
push 0x10000000
push 0
push eax
call edx
mov eax, dword [esp + 0x78]
test eax, eax
je 0x1005970a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esi + 0x84]
sub ecx, dword [esi + 0x80]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x1005a11f
mov ecx, dword [esi + 0x84]
sub ecx, dword [esi + 0x80]
mov edi, dword [esi + 0x58]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 2
sbb ebp, ebp
xor ebx, ebx
inc ebp
cmp edi, ebx
je 0x100597af
mov edx, dword [edi]
mov ecx, dword [edx + 0x108]
lea eax, [esp + 0x78]
push eax
push 1
push 0x827
push edi
mov dword [esp + 0x88], ebx
call ecx
mov eax, dword [esp + 0x78]
cmp eax, ebx
je 0x100597af
cmp ebp, ebx
je 0x10059791
mov edx, dword [eax]
push ebx
push 0x10000000
push eax
mov eax, dword [edx + 0x5c]
call eax
jmp 0x1005979f
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
push 0x10000000
push ebx
push eax
call edx
mov eax, dword [esp + 0x78]
cmp eax, ebx
je 0x100597af
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x1c], 0x825
mov dword [esp + 0x20], 0x826
xor edi, edi
mov eax, dword [esi + 0x58]
mov ecx, dword [esp + edi*4 + 0x1c]
cmp eax, ebx
je 0x1005980c
mov edx, dword [eax]
lea ebp, [esp + 0x78]
push ebp
push 1
push ecx
push eax
mov eax, dword [edx + 0x108]
mov dword [esp + 0x88], ebx
call eax
mov eax, dword [esp + 0x78]
cmp eax, ebx
je 0x1005980c
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
push 0x10000000
push ebx
push eax
call edx
mov eax, dword [esp + 0x78]
cmp eax, ebx
je 0x1005980c
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
inc edi
cmp edi, 2
jb 0x100597c1
mov esi, dword [esi + 0x58]
push ecx
mov eax, esp
mov dword [esp + 0x7c], ebx
mov dword [eax], esi
cmp esi, ebx
je 0x1005982a
mov eax, dword [esi]
mov ecx, dword [eax + 4]
push esi
call ecx
lea esi, [esp + 0x7c]
call fcn.100278a0
xor ebx, ebx
cmp eax, ebx
jge 0x10059846
cmp eax, 0x80004002
je 0x10059846
push eax
call fcn.100830f0
mov edi, dword [esp + 0x78]
cmp edi, ebx
jne 0x10059852
xor esi, esi
jmp 0x1005987c
mov edx, dword [edi]
mov ecx, dword [edx + 0x108]
lea eax, [esp + 0x74]
push eax
push 1
push 0x825
push edi
mov dword [esp + 0x84], ebx
call ecx
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov esi, dword [esp + 0x74]
push edi
call eax
mov dword [esp + 0x78], ebx
cmp esi, ebx
je 0x100598d4
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
push esi
call edx
mov eax, dword [esi]
mov edx, dword [eax]
lea ecx, [esp + 0x7c]
push ecx
push 0x100a7be0
push esi
call edx
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
mov edi, eax
xor eax, eax
cmp edi, ebx
setl al
push esi
dec eax
and eax, dword [esp + 0x80]
mov dword [esp + 0x7c], eax
call edx
cmp edi, ebx
jge 0x100598cc
cmp edi, 0x80004002
je 0x100598cc
push edi
call fcn.100830f0
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
mov eax, dword [0x100c7a60]
cmp eax, ebx
jne 0x1005991a
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
mov ebp, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, ebx
jne 0x100598f9
mov ebx, 0x9e
jmp 0x10059929
push 0x100a9e44
push eax
call ebp
mov dword [0x100c7a60], eax
cmp eax, ebx
jne 0x10059911
mov ebx, 0x9e
jmp 0x10059932
push 0x9e
call eax
jmp 0x10059927
push 0x9e
call eax
mov ebp, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov ebx, eax
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x1005995c
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059946
lea edi, [eax + 0x7e]
jmp 0x10059962
push 0x100a9e44
push eax
call ebp
mov dword [0x100c7a60], eax
test eax, eax
jne 0x1005995c
lea edi, [eax + 0x7e]
jmp 0x1005996b
push 0x7e
call eax
mov edi, eax
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x10059999
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059981
mov esi, 0x8a
jmp 0x100599a2
push 0x100a9e44
push eax
call ebp
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059999
mov esi, 0x8a
jmp 0x100599ab
push 0x8a
call eax
mov esi, eax
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x100599d9
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x100599c1
mov eax, 0x16
jmp 0x100599dd
push 0x100a9e44
push eax
call ebp
mov dword [0x100c7a60], eax
test eax, eax
jne 0x100599d9
mov eax, 0x16
jmp 0x100599dd
push 0x16
call eax
cmp dword [esp + 0x78], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], ebx
jne 0x100599fe
push 0x80004003
call fcn.100830f0
mov eax, dword [esp + 0x78]
mov edx, dword [eax]
mov edx, dword [edx + 0x8c]
lea ecx, [esp + 0x74]
push ecx
push eax
mov dword [esp + 0x7c], 0
call edx
mov eax, dword [0x100c7a60]
mov ebx, dword [esp + 0x74]
test eax, eax
jne 0x10059a51
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059a3b
lea esi, [eax + 0x68]
jmp 0x10059a57
push 0x100a9e44
push eax
call ebp
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059a51
lea esi, [eax + 0x68]
jmp 0x10059a57
push 0x68
call eax
mov esi, eax
mov ebp, dword [esp + 0x70]
mov ecx, dword [ebp + 0x84]
sub ecx, dword [ebp + 0x80]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x10059a7e
call fcn.100848cc
mov edi, dword [ebp + 0x80]
test ebx, ebx
je 0x10059abe
test esi, esi
jl 0x10059ae5
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x28]
lea edx, [esp + 0x14]
push edx
push ebx
call eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10059ab0
push eax
push esi
push edi
call fcn.10061610
add esp, 0xc
mov esi, eax
jmp 0x10059ab2
xor esi, esi
mov ecx, dword [ebx]
mov edx, dword [ecx + 8]
push ebx
call edx
test esi, esi
jne 0x10059b15
mov esi, dword [esp + 0x44]
mov eax, dword [0x100c7a60]
sub esi, dword [esp + 0x3c]
test eax, eax
jne 0x10059b0b
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059aef
mov eax, 5
jmp 0x10059b0f
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
push ebx
call ecx
jmp 0x10059abe
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059b0b
mov eax, 5
jmp 0x10059b0f
push 5
call eax
add eax, esi
add dword [esp + 0x44], eax
mov eax, dword [esp + 0x78]
mov edx, dword [eax]
mov edx, dword [edx + 0x44]
push 1
lea ecx, [esp + 0x3c]
push ecx
push eax
call edx
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x10059b5f
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059b45
lea esi, [eax + 0x68]
jmp 0x10059b65
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059b5f
lea esi, [eax + 0x68]
jmp 0x10059b65
push 0x68
call eax
mov esi, eax
mov ecx, dword [ebp + 0x84]
sub ecx, dword [ebp + 0x80]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x10059b88
call fcn.100848cc
mov ecx, dword [ebp + 0x80]
mov ecx, dword [ecx]
mov eax, dword [ebp + 0x58]
push esi
push 0
push 1
push 0x825
call fcn.1003f450
mov eax, dword [ebp + 0x58]
add esp, 0xc
mov ecx, esp
mov dword [esp + 0x78], 0
mov dword [ecx], eax
test eax, eax
je 0x10059bc0
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x78]
call fcn.100278a0
test eax, eax
jge 0x10059bda
cmp eax, 0x80004002
je 0x10059bda
push eax
call fcn.100830f0
mov edi, dword [esp + 0x74]
test edi, edi
jne 0x10059be6
xor esi, esi
jmp 0x10059c14
mov ecx, dword [edi]
mov eax, dword [ecx + 0x108]
lea edx, [esp + 0x74]
push edx
push 1
push 0x826
push edi
mov dword [esp + 0x84], 0
call eax
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
mov esi, dword [esp + 0x74]
push edi
call edx
test esi, esi
je 0x10059c67
mov eax, dword [esi]
mov ecx, dword [eax + 4]
push esi
call ecx
mov edx, dword [esi]
mov ecx, dword [edx]
lea eax, [esp + 0x14]
push eax
push 0x100a7be0
push esi
call ecx
xor edx, edx
mov edi, eax
mov eax, dword [esi]
mov ecx, dword [eax + 8]
test edi, edi
setl dl
push esi
dec edx
and edx, dword [esp + 0x18]
mov ebp, edx
call ecx
test edi, edi
jge 0x10059c5b
cmp edi, 0x80004002
je 0x10059c5b
push edi
call fcn.100830f0
mov edx, dword [esi]
mov eax, dword [edx + 8]
push esi
call eax
test ebp, ebp
jne 0x10059c71
push 0x80004003
call fcn.100830f0
mov ecx, dword [ebp]
mov eax, dword [ecx + 0x40]
lea edx, [esp + 0x58]
push edx
push ebp
call eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.USER32.DLL_CopyRect]
mov eax, dword [esp + 0x70]
mov ecx, dword [eax + 0x84]
sub ecx, dword [eax + 0x80]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jbe 0x10059e85
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x44]
add eax, ecx
mov dword [esp + 0x34], eax
lea edx, [esp + 0x74]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp]
mov eax, dword [ecx + 0x8c]
push edx
push ebp
mov dword [esp + 0x7c], 0
call eax
mov eax, dword [0x100c7a60]
mov ebx, dword [esp + 0x74]
test eax, eax
jne 0x10059d22
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059d08
lea edi, [eax + 0x68]
jmp 0x10059d28
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059d22
lea edi, [eax + 0x68]
jmp 0x10059d28
push 0x68
call eax
mov edi, eax
mov eax, dword [esp + 0x70]
mov ecx, dword [eax + 0x84]
sub ecx, dword [eax + 0x80]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 1
ja 0x10059d52
call fcn.100848cc
mov edx, dword [esp + 0x70]
mov esi, dword [edx + 0x80]
add esi, 0xc
test ebx, ebx
je 0x10059d99
test edi, edi
jl 0x10059dc0
mov eax, dword [ebx]
mov edx, dword [eax + 0x28]
lea ecx, [esp + 0x1c]
push ecx
push ebx
call edx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10059d8b
push eax
push edi
push esi
call fcn.10061610
add esp, 0xc
mov esi, eax
jmp 0x10059d8d
xor esi, esi
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
push ebx
call ecx
test esi, esi
jne 0x10059df0
mov esi, dword [esp + 0x34]
mov eax, dword [0x100c7a60]
sub esi, dword [esp + 0x2c]
test eax, eax
jne 0x10059de6
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059dca
mov eax, 5
jmp 0x10059dea
mov edx, dword [ebx]
mov eax, dword [edx + 8]
push ebx
call eax
jmp 0x10059d99
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059de6
mov eax, 5
jmp 0x10059dea
push 5
call eax
add eax, esi
add dword [esp + 0x34], eax
mov ecx, dword [ebp]
mov eax, dword [ecx + 0x44]
push 1
lea edx, [esp + 0x2c]
push edx
push ebp
call eax
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x10059e37
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059e1d
lea esi, [eax + 0x68]
jmp 0x10059e3d
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059e37
lea esi, [eax + 0x68]
jmp 0x10059e3d
push 0x68
call eax
mov esi, eax
mov edi, dword [esp + 0x70]
mov ecx, dword [edi + 0x84]
sub ecx, dword [edi + 0x80]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 1
ja 0x10059e67
call fcn.100848cc
mov edx, dword [edi + 0x80]
mov ecx, dword [edx + 0xc]
mov eax, dword [edi + 0x58]
push esi
push 0
push 1
push 0x826
call fcn.1003f450
add esp, 0x10
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x10059ec0
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059ea4
mov ebx, 0xc9
jmp 0x10059ec9
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059ec0
mov ebx, 0xc9
jmp 0x10059ed2
push 0xc9
call eax
mov ebx, eax
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x10059f00
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059ee6
lea edi, [eax + 0x50]
jmp 0x10059f06
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059f00
lea edi, [eax + 0x50]
jmp 0x10059f0f
push 0x50
call eax
mov edi, eax
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x10059f41
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059f25
mov esi, 0xb7
jmp 0x10059f4a
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059f41
mov esi, 0xb7
jmp 0x10059f53
push 0xb7
call eax
mov esi, eax
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x10059f85
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x10059f69
mov eax, 0x16
jmp 0x10059f89
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x10059f85
mov eax, 0x16
jmp 0x10059f89
push 0x16
call eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x70]
mov eax, dword [eax + 0x58]
push ecx
mov ecx, esp
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x78], 0
mov dword [ecx], eax
test eax, eax
je 0x10059fb9
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
lea esi, [esp + 0x78]
call fcn.100278a0
test eax, eax
jge 0x10059fd3
cmp eax, 0x80004002
je 0x10059fd3
push eax
call fcn.100830f0
mov edi, dword [esp + 0x74]
test edi, edi
jne 0x10059fdf
xor esi, esi
jmp 0x1005a00d
mov eax, dword [edi]
mov edx, dword [eax + 0x108]
lea ecx, [esp + 0x74]
push ecx
push 1
push 0x827
push edi
mov dword [esp + 0x84], 0
call edx
mov eax, dword [edi]
mov ecx, dword [eax + 8]
mov esi, dword [esp + 0x74]
push edi
call ecx
test esi, esi
je 0x1005a0ff
mov edx, dword [esi]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esi]
mov eax, dword [ecx]
lea edx, [esp + 0x1c]
push edx
push 0x100a7be0
push esi
call eax
mov ecx, dword [esi]
mov edx, dword [ecx + 8]
xor ebx, ebx
mov edi, eax
test edi, edi
setl bl
push esi
dec ebx
and ebx, dword [esp + 0x20]
call edx
test edi, edi
jge 0x1005a056
cmp edi, 0x80004002
je 0x1005a056
push edi
call fcn.100830f0
mov eax, dword [esi]
mov ecx, dword [eax + 8]
push esi
call ecx
test ebx, ebx
je 0x1005a0ff
mov edx, dword [ebx]
mov eax, dword [edx + 0x64]
push 0x10000000
push ebx
call eax
neg eax
sbb eax, eax
add eax, 1
je 0x1005a0f7
mov ecx, dword [ebp]
mov edx, dword [ecx + 0x64]
push 0x10000000
push ebp
call edx
neg eax
sbb eax, eax
add eax, 1
je 0x1005a0e8
mov eax, dword [0x100c7a60]
test eax, eax
jne 0x1005a0ce
push 0x100a6b44
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
test eax, eax
jne 0x1005a0b2
mov eax, 5
jmp 0x1005a0d2
push 0x100a9e44
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x100c7a60], eax
test eax, eax
jne 0x1005a0ce
mov eax, 5
jmp 0x1005a0d2
push 5
call eax
sub eax, dword [esp + 0x4c]
add eax, dword [esp + 0x34]
push eax
push 0
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.DLL_OffsetRect]
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x44]
push 1
lea edx, [esp + 0x4c]
push edx
push ebx
call eax
mov ecx, dword [ebx]
mov edx, dword [ecx + 8]
push ebx
call edx
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov eax, dword [esp + 0x78]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov esi, dword [esp + 0x70]
xor ebp, ebp
jmp 0x1005a1c3
cmp dword [esp + 0x7c], 2
lea edi, [esp + 0x70]
jne 0x1005a139
mov dword [esp + 0x14], 4
mov ebx, 0x9d
jmp 0x1005a146
mov dword [esp + 0x14], 8
mov ebx, 0x9e
call fcn.100036f0
xor ebp, ebp
push ebp
push ebp
lea eax, [esp + 0x78]
mov ecx, dword [eax]
mov eax, dword [esi + 0x58]
push ebp
push 0x82a
call fcn.1003f450
mov ebx, dword [esp + 0x24]
add esp, 0x10
test bl, 8
je 0x1005a198
mov eax, dword [esp + 0x70]
lea ecx, [eax - 0xc]
and ebx, 0xfffffff7
cmp ecx, 0x100bc65c
je 0x1005a198
lea edi, [eax - 0xc]
push edi
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x1005a198
push edi
call fcn.1008441c
add esp, 4
test bl, 4
je 0x1005a1c3
mov eax, dword [esp + 0x70]
lea edx, [eax - 0xc]
cmp edx, 0x100bc65c
je 0x1005a1c3
lea edi, [eax - 0xc]
push edi
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x1005a1c3
push edi
call fcn.1008441c
add esp, 4
mov ecx, dword [esi + 0x84]
sub ecx, dword [esi + 0x80]
mov ebx, dword [esi + 0x58]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edi, eax
neg edi
sbb edi, edi
neg edi
cmp ebx, ebp
je 0x1005a23e
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x108]
lea edx, [esp + 0x70]
push edx
push 1
push 0x824
push ebx
mov dword [esp + 0x80], ebp
call eax
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x1005a23e
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
cmp edi, ebp
je 0x1005a225
push ebp
push 0x10000000
jmp 0x1005a22b
push 0x10000000
push ebp
push eax
call edx
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x1005a23e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esi + 0x84]
sub ecx, dword [esi + 0x80]
mov ebx, dword [esi + 0x58]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edi, eax
neg edi
sbb edi, edi
inc edi
cmp ebx, ebp
je 0x1005a2b8
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x108]
lea edx, [esp + 0x70]
push edx
push 1
push 0x829
push ebx
mov dword [esp + 0x80], ebp
call eax
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x1005a2b8
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
cmp edi, ebp
je 0x1005a29f
push ebp
push 0x10000000
jmp 0x1005a2a5
push 0x10000000
push ebp
push eax
call edx
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x1005a2b8
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esi + 0x58]
cmp eax, ebp
je 0x1005a303
mov ecx, dword [eax]
lea edx, [esp + 0x70]
push edx
push 1
push 0x817
push eax
mov eax, dword [ecx + 0x108]
mov dword [esp + 0x80], ebp
call eax
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x1005a303
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
push ebp
push 0x10000000
push eax
call edx
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x1005a303
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov esi, dword [esi + 0x58]
cmp esi, ebp
je 0x1005a34e
mov eax, dword [esi]
mov edx, dword [eax + 0x108]
lea ecx, [esp + 0x70]
push ecx
push 1
push 0x816
push esi
mov dword [esp + 0x80], ebp
call edx
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x1005a34e
mov ecx, dword [eax]
mov edx, dword [ecx + 0x5c]
push 0x10000000
push ebp
push eax
call edx
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x1005a34e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x100bc65c
je 0x1005a374
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x1005a374
push esi
call fcn.1008441c
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0x10