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

Disassembly:
mov eax, dword [esp + 0x20]
sub esp, 0x44
push ebx
push ebp
push esi
test eax, eax
je 0x10031d69
cmp eax, 0x10
jb 0x100320cd
mov ebp, dword [esp + 0x6c]
cmp eax, ebp
jae 0x100320cd
mov ebx, dword [esp + 0x54]
jmp 0x10031dad
mov ebx, dword [esp + 0x54]
push 0
lea esi, [ebx + 0x10]
push esi
call fcn.100502a0
add esp, 8
test eax, eax
je 0x100320cd
push 3
push esi
call fcn.1004f860
add esp, 8
test eax, eax
js 0x100320cd
push 2
push esi
call fcn.1004ffe0
mov ebp, dword [esp + 0x74]
add esp, 8
cmp eax, ebp
jae 0x100320cd
cmp ebp, 0x59
jb 0x100320cd
lea eax, [esp + 0x20]
push edi
push eax
call fcn.10031ba0
lea eax, [esp + 0x34]
push eax
call fcn.10031ba0
lea eax, [esp + 0x44]
push eax
call fcn.10031ba0
lea eax, [esp + 0x54]
push eax
call fcn.10031ba0
mov esi, dword [esp + 0x7c]
lea eax, [ebp + 1]
mov edi, dword [esp + 0x78]
mov ecx, ebp
shr eax, 1
add esp, 0x10
shr ecx, 1
mov dword [esp + 0x14], ecx
lea ecx, [ebx + 4]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x10], eax
lea ebx, [ecx + 0x10]
lea ebp, [ecx + 0x1c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebp
push esi
push edi
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push 1
push eax
push ebx
call fcn.100326a0
push 1
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.10050090
add esp, 0x28
cmp dword [esp + 0x74], 0
jne 0x10031ea0
mov ebp, dword [esp + 0x58]
add ebp, 0x10
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x4c]
push ebp
push eax
call fcn.1004f950
lea eax, [esp + 0x54]
push 1
push eax
call fcn.1004f860
add esp, 0x14
test eax, eax
je 0x10031e9c
test esi, esi
je 0x10031e74
push 0x63
push edi
call esi
add esp, 8
push esi
push edi
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push 1
push dword [esp + 0x24]
push ebx
call fcn.100326a0
push 1
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.10050090
add esp, 0x28
jmp 0x10031e45
mov ebp, dword [esp + 0x18]
test esi, esi
je 0x10031eac
push 0xa
push edi
call esi
add esp, 8
push esi
push edi
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push 1
push dword [esp + 0x28]
push ebp
call fcn.100326a0
push 1
lea eax, [esp + 0x50]
push ebp
push eax
call fcn.10050090
add esp, 0x28
cmp dword [esp + 0x74], 0
jne 0x10031f3b
mov ebx, dword [esp + 0x58]
add ebx, 0x10
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x4c]
push ebx
push eax
call fcn.1004f950
lea eax, [esp + 0x54]
push 1
push eax
call fcn.1004f860
add esp, 0x14
test eax, eax
je 0x10031f37
test esi, esi
je 0x10031f0f
push 0x63
push edi
call esi
add esp, 8
push esi
push edi
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push 1
push dword [esp + 0x28]
push ebp
call fcn.100326a0
push 1
lea eax, [esp + 0x50]
push ebp
push eax
call fcn.10050090
add esp, 0x28
jmp 0x10031ee0
mov ebx, dword [esp + 0x1c]
push ebp
push ebx
push dword [esp + 0x28]
call fcn.1004f600
add esp, 0xc
test esi, esi
je 0x10031f55
push 0xa
push edi
call esi
add esp, 8
mov eax, dword [esp + 0x5c]
push ebx
add eax, 0x40
push ebp
push eax
call fcn.1004fd90
add esp, 0xc
test eax, eax
jne 0x10031f88
mov eax, dword [esp + 0x10]
test esi, esi
je 0x10031e14
push 0x3f
push edi
call esi
mov eax, dword [esp + 0x18]
add esp, 8
jmp 0x10031e14
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x44]
push eax
call fcn.1004f600
mov ebx, dword [esp + 0x64]
add esp, 0xc
mov ebp, dword [esp + 0x5c]
add ebx, 0x10
mov eax, dword [esp + 0x74]
add ebp, 4
test eax, eax
je 0x1003204f
push eax
push dword [esp + 0x68]
push dword [esp + 0x68]
push ebx
call fcn.100321e0
push 0
push ebx
call fcn.1004fec0
mov eax, dword [esp + 0x8c]
dec eax
push eax
push ebx
call fcn.1004fec0
lea eax, [esp + 0x5c]
push eax
push ebx
push ebp
call fcn.1004fd90
add esp, 0x2c
test eax, eax
jne 0x1003205e
test esi, esi
je 0x10031ffe
push 0x65
push edi
call esi
add esp, 8
push dword [esp + 0x74]
push dword [esp + 0x68]
push dword [esp + 0x68]
push ebx
call fcn.100321e0
push 0
push ebx
call fcn.1004fec0
mov eax, dword [esp + 0x8c]
dec eax
push eax
push ebx
call fcn.1004fec0
lea eax, [esp + 0x5c]
push eax
push ebx
push ebp
call fcn.1004fd90
add esp, 0x2c
test eax, eax
je 0x10031ff2
mov ebp, dword [esp + 0x5c]
add ebp, 4
test esi, esi
je 0x1003205e
push 0xa
push edi
call esi
add esp, 8
jmp 0x1003205e
lea eax, [esp + 0x3c]
push eax
push ebx
push ebp
call fcn.1004fd90
add esp, 0xc
mov ebx, dword [esp + 0x5c]
lea eax, [esp + 0x24]
push eax
push ebp
lea eax, [ebx + 0x28]
push eax
call fcn.1004f8a0
lea eax, [esp + 0x3c]
push eax
lea eax, [ebx + 0x34]
push ebp
push eax
call fcn.1004f8a0
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x70]
add eax, 7
shr eax, 3
mov dword [ebx], eax
mov dword [ecx], eax
lea eax, [esp + 0x3c]
push eax
call fcn.10031bc0
lea eax, [esp + 0x4c]
push eax
call fcn.10031bc0
lea eax, [esp + 0x5c]
push eax
call fcn.10031bc0
lea eax, [esp + 0x6c]
push eax
call fcn.10031bc0
add esp, 0x28
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret