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

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [0x1020f198]
push ebp
push esi
push edi
mov eax, dword [ebx + 0x3f0c]
mov dword [esp + 0x10], ebx
cmp eax, dword [ebx + 0x3f08]
je 0x10039d44
call fcn.100399e0
mov eax, dword [ebx + 0x3f08]
cmp dword [ebx + 0x3f10], eax
je 0x1003a0e6
mov dword [ebx + 0x3f10], eax
mov dword [ebx + 0xa8], 0
mov eax, dword [ebx + 0x5df4]
mov edi, dword [ebx + 0x5dfc]
lea eax, [eax + eax*4]
lea ebp, [edi + eax*4]
cmp edi, ebp
je 0x10039d9f
nop dword [eax]
cmp dword [edi + 4], 4
jne 0x10039d98
mov esi, dword [edi + 0xc]
mov ecx, esi
push edi
push ebx
call dword [0x1013f2d4]
call esi
add esp, 8
add edi, 0x14
cmp edi, ebp
jne 0x10039d80
call fcn.10039620
mov edi, dword [ebx + 0x4a34]
mov eax, dword [ebx + 0x4a2c]
lea eax, [edi + eax*4]
mov dword [esp + 0x14], eax
cmp edi, eax
je 0x10039e52
nop
mov ebx, dword [edi]
mov esi, dword [0x1020f198]
push 0
lea ecx, [ebx + 0x4c]
lea eax, [ebx + 0x7c]
mov dword [ebx + 0x74], ecx
mov dword [ebx + 0x78], eax
call fcn.1004a420
mov ecx, dword [ebx + 0x78]
push 0
call fcn.1004a420
mov byte [ebx + 0x3c], 1
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x48], 0
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov dword [ebx + 0x58], eax
mov dword [ebx + 0x5c], ecx
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x14]
mov dword [ebx + 0x60], eax
mov dword [ebx + 0x64], ecx
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x40]
mov dword [ebx + 0x68], eax
mov dword [ebx + 0x6c], ecx
mov dword [ebx + 0x70], ebx
cmp dword [ebx + 0x34], 0
je 0x10039e41
mov ecx, ebx
call fcn.10037800
mov edx, dword [ebx + 0x74]
lea ecx, [ebx + 0x3c]
push eax
call fcn.10050ba0
add esp, 4
add edi, 4
cmp edi, dword [esp + 0x14]
jne 0x10039dc0
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx + 0x4c00]
test eax, eax
je 0x10039e77
test dword [eax + 0xc], 0x2000
jne 0x10039e77
mov edi, dword [eax + 0x30c]
mov ebp, dword [ebx + 0x4c08]
mov dword [esp + 0x1c], edi
jmp 0x10039e8b
xor edi, edi
mov dword [esp + 0x1c], edi
test eax, eax
je 0x10039e89
mov ebp, dword [ebx + 0x4c08]
jmp 0x10039e8b
xor ebp, ebp
mov esi, dword [ebx + 0x3f48]
mov eax, dword [ebx + 0x3f40]
mov dword [esp + 0x20], ebp
lea eax, [esi + eax*4]
mov dword [esp + 0x14], eax
cmp esi, eax
je 0x10039eed
nop word [eax + eax]
mov ecx, dword [esi]
cmp byte [ecx + 0xae], 0
je 0x10039ee6
cmp byte [ecx + 0xb5], 0
jne 0x10039ee6
mov edx, dword [ecx + 0xc]
test edx, 0x1000000
jne 0x10039ee6
cmp ecx, edi
je 0x10039ee6
cmp ecx, ebp
je 0x10039ee6
shr edx, 0x19
and edx, 1
call fcn.10039210
mov eax, dword [esp + 0x14]
add esi, 4
cmp esi, eax
jne 0x10039eb0
xor esi, esi
nop
mov ecx, dword [esp + esi*4 + 0x1c]
test ecx, ecx
je 0x10039f18
cmp byte [ecx + 0xae], 0
je 0x10039f18
cmp byte [ecx + 0xb5], 0
jne 0x10039f18
mov edx, dword [ecx + 0xc]
shr edx, 0x19
and edx, 1
call fcn.10039210
inc esi
cmp esi, 2
jl 0x10039ef0
cmp byte [ebx + 0x44], 0
je 0x10039f4e
mov ecx, dword [ebx + 0x4d84]
cmp ecx, 0xffffffff
je 0x10039f4e
push dword [ebx + 0xe04]
movss xmm0, dword [ebx + 0x397c]
push dword [ebx + 0xe00]
sub esp, 8
call fcn.100358e0
add esp, 0x10
mov dword [ebx + 0xa4], 0
mov dword [ebx + 0xa0], 0
mov ecx, dword [ebx + 0x4a34]
mov eax, dword [ebx + 0x4a2c]
mov dword [esp + 0x14], ecx
lea eax, [ecx + eax*4]
mov dword [esp + 0x1c], eax
cmp ecx, eax
je 0x1003a0b1
mov ebp, dword [ecx]
mov dword [esp + 0x18], ebp
mov eax, dword [ebp + 0x78]
mov ecx, dword [ebp + 0x74]
mov eax, dword [eax]
mov edi, dword [ecx]
add eax, edi
push eax
call fcn.1004a420
mov esi, dword [ebp + 0x78]
mov eax, dword [esi]
test eax, eax
je 0x1003a01a
shl eax, 2
push eax
mov eax, dword [ebp + 0x74]
push dword [esi + 8]
mov eax, dword [eax + 8]
lea eax, [eax + edi*4]
push eax
call fcn.1010c860
mov ecx, dword [esi + 4]
add esp, 0xc
test ecx, ecx
jns 0x1003a014
mov eax, ecx
xor edi, edi
cdq
sub eax, edx
sar eax, 1
add eax, ecx
test eax, eax
cmovg edi, eax
cmp edi, ecx
jle 0x1003a014
lea eax, [edi*4]
push eax
call fcn.1012189d
mov ebp, eax
add esp, 4
mov eax, dword [esi + 8]
test eax, eax
je 0x1003a00a
mov ecx, dword [esi]
shl ecx, 2
push ecx
push eax
push ebp
call fcn.1010c860
add esp, 0xc
push dword [esi + 8]
call fcn.1011b2ad
add esp, 4
mov dword [esi + 8], ebp
mov ebp, dword [esp + 0x18]
mov dword [esi + 4], edi
mov dword [esi], 0
cmp dword [ebp + 0x38], 0
je 0x1003a043
push str.Foreground
mov edx, 1
mov ecx, ebp
call fcn.10037750
mov edx, dword [ebp + 0x74]
lea ecx, [ebp + 0x3c]
add esp, 4
push eax
call fcn.10050ba0
add esp, 4
mov edi, dword [ebp + 0x54]
mov eax, dword [ebp + 0x4c]
lea eax, [edi + eax*4]
mov dword [esp + 0x18], eax
cmp edi, eax
je 0x1003a08a
mov ebx, eax
mov esi, dword [edi]
mov eax, dword [esi]
test eax, eax
jle 0x1003a07f
lea ecx, [eax + eax*4]
shl ecx, 3
mov edx, dword [esi + 8]
cmp dword [ecx + edx - 0xc], 0
jne 0x1003a07f
cmp dword [ecx + edx - 8], 0
jne 0x1003a07f
dec eax
sub ecx, 0x28
mov dword [esi], eax
test eax, eax
jg 0x1003a064
add edi, 4
cmp edi, ebx
jne 0x1003a056
mov ebx, dword [esp + 0x10]
mov eax, dword [ebp + 0x48]
mov ecx, dword [esp + 0x14]
add dword [ebx + 0xa0], eax
add ecx, 4
mov eax, dword [ebp + 0x44]
add dword [ebx + 0xa4], eax
mov dword [esp + 0x14], ecx
cmp ecx, dword [esp + 0x1c]
jne 0x10039f81
mov eax, dword [ebx + 0x5df4]
mov edi, dword [ebx + 0x5dfc]
lea eax, [eax + eax*4]
lea ebp, [edi + eax*4]
cmp edi, ebp
je 0x1003a0e6
cmp dword [edi + 4], 5
jne 0x1003a0df
mov esi, dword [edi + 0xc]
mov ecx, esi
push edi
push ebx
call dword [0x1013f2d4]
call esi
add esp, 8
add edi, 0x14
cmp edi, ebp
jne 0x1003a0c7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret