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

Disassembly:
sub esp, 0x380
mov eax, dword [0x1013567c]
xor eax, esp
mov dword [esp + 0x37c], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x390]
mov dword [esp + 0x20], 0
mov dword [esp + 0x3c], 0
push edi
mov ecx, dword [esi + 0x1c]
mov ebx, dword [esi + 8]
mov ebp, dword [esi + 4]
mov dword [esi], 0
mov dword [ecx + 4], 0
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x48], esi
mov dword [esp + 0x3c], 0
mov dword [esp + 0x1c], 0
mov dword [eax + 8], 0
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x44], 0xffffffff
mov dword [esp + 0x30], ecx
mov dword [eax + 0xc], 0
xor eax, eax
mov word [esp + 0x108], ax
cmp dword [ecx], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x2c], 0
jae 0x100392eb
xor edi, edi
jmp 0x100399a0
push 1
push 0x82
lea eax, [esp + 0x8c]
push eax
push dword [esi + 0xc]
push ebp
call fcn.1003c5d0
mov edi, eax
test edi, edi
js 0x10039974
push 3
push 0x80
push 0
lea eax, [esp + 0x1c]
push eax
push 0x1c
lea eax, [esp + 0x64]
push eax
push 0
push 0
lea eax, [esp + 0xa4]
push eax
push 0x10002410
push ebx
push ebp
call fcn.1002cb60
mov edi, eax
test edi, edi
js 0x10039974
push 0
push 0
push dword [esp + 0x5c]
lea eax, [esp + 0x90]
push ebp
mov dword [esi + 0x20], eax
call fcn.1003c7d0
mov edi, eax
test edi, edi
jne 0x1003979c
mov ecx, dword [esp + 0x30]
add ecx, 8
mov dword [esp + 0x38], ecx
push 0
push 0
lea eax, [esp + 0x18]
push eax
push 0x200
lea eax, [esp + 0x19c]
push eax
push dword [esp + 0x74]
push dword [esp + 0x6c]
push ebp
call fcn.1003cb60
mov edi, eax
test edi, edi
jne 0x10039798
test byte [esp + 0x18c], 1
je 0x10039780
push eax
push eax
lea eax, [esp + 0x18]
push eax
push 0x200
lea eax, [esp + 0x19c]
push eax
push dword [esp + 0x70]
push dword [esp + 0x6c]
push ebp
call fcn.1003cb60
mov edi, eax
test edi, edi
jne 0x10039798
mov eax, dword [esp + 0x10]
mov ecx, 0x40
shr eax, 1
cmp eax, ecx
cmovb ecx, eax
add ecx, ecx
cmp ecx, 0x200
jae 0x100399bd
xor eax, eax
mov word [esp + ecx + 0x18c], ax
lea eax, [esp + 0x18c]
push 0x10002a24
push eax
call fcn.10115740
add esp, 8
test eax, eax
jne 0x1003941f
lea ebx, [edi + 1]
jmp 0x1003947b
lea eax, [esp + 0x18c]
push 0x10002a40
push eax
call fcn.10115740
add esp, 8
test eax, eax
jne 0x1003943d
lea ebx, [eax + 2]
jmp 0x1003947b
lea eax, [esp + 0x18c]
push 0x10002a80
push eax
call fcn.10115740
add esp, 8
test eax, eax
jne 0x1003945b
lea ebx, [eax + 4]
jmp 0x1003947b
lea eax, [esp + 0x18c]
push 0x10002a94
push eax
call fcn.10115740
add esp, 8
test eax, eax
jne 0x10039780
lea ebx, [eax + 5]
push 0
push 0
lea eax, [esp + 0x18]
push eax
push 0x200
lea eax, [esp + 0x19c]
push eax
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push ebp
call fcn.1003cb60
mov edi, eax
test edi, edi
jne 0x10039798
mov eax, dword [esp + 0x10]
mov ecx, 0x40
shr eax, 1
cmp eax, ecx
cmovb ecx, eax
add ecx, ecx
cmp ecx, 0x200
jae 0x100399bd
xor eax, eax
mov word [esp + ecx + 0x18c], ax
lea eax, [esp + 0x108]
push eax
lea eax, [esp + 0x190]
push eax
call fcn.10115740
add esp, 8
test eax, eax
je 0x100395fd
push edi
push 0x18
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x198]
push eax
push dword [esi + 0xc]
push ebp
call fcn.1003c480
mov edi, eax
cmp edi, 0xfffffa1d
je 0x10039780
test edi, edi
js 0x10039798
cmp dword [esi], 0
jne 0x10039545
push esi
call fcn.10039130
mov edi, eax
test edi, edi
js 0x10039974
mov eax, dword [esi]
mov eax, dword [eax + 8]
mov dword [esp + 0x3c], eax
add eax, 0x18
mov dword [esp + 0x1c], eax
mov edi, dword [esp + 0x38]
lea eax, [esp + 0x18c]
inc dword [esp + 0x44]
mov ecx, 0x200
add edi, 0xc
cmp dword [esp + 0x10], ecx
mov dword [esp + 0x38], edi
cmovb ecx, dword [esp + 0x10]
add ecx, 2
push ecx
push eax
lea eax, [esp + 0x110]
push eax
call fcn.101175c0
lea eax, [edi - 4]
xorps xmm0, xmm0
movq qword [eax], xmm0
add esp, 0xc
mov dword [eax + 8], 0
mov dword [esp + 0x18], eax
lea eax, [esp + 0x108]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x70]
mov dword [edi + 4], eax
lea eax, [esp + 0x24]
push eax
push 0
push 0x34
push dword [esp + 0x48]
call fcn.100c9f55
mov edi, eax
test edi, edi
js 0x10039974
push 0x34
push 0
push dword [esp + 0x2c]
call fcn.10117460
mov ecx, dword [esp + 0x44]
add esp, 0xc
mov eax, dword [esp + 0x24]
mov dword [ecx], eax
mov eax, dword [esp + 0x24]
mov dword [esi], eax
mov ecx, dword [ecx]
mov eax, dword [esp + 0x3c]
add ecx, 8
mov dword [esp + 0x14], ecx
mov dword [ecx], eax
mov eax, dword [esp + 0x70]
mov dword [ecx + 0x24], eax
mov eax, dword [esp + 0x74]
mov dword [ecx + 0x28], eax
push 0
push 0
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x28]
push 0xffdc
push dword [eax + 8]
push dword [esp + 0x78]
push dword [esp + 0x6c]
push ebp
call fcn.1003cb60
mov edi, eax
test edi, edi
jne 0x10039798
mov edx, dword [esp + 0x1c]
mov ecx, 0xffdc
cmp dword [esp + 0x10], ecx
cmovb ecx, dword [esp + 0x10]
mov dword [esp + 0x10], ecx
mov eax, dword [edx + 8]
mov byte [ecx + eax + 1], 0
mov ecx, dword [edx + 8]
mov eax, dword [esp + 0x10]
mov byte [eax + ecx], 0
xor ecx, ecx
lea eax, [ebx - 1]
mov dword [esp + 0x40], ecx
cmp eax, 4
ja case.0x10039665.3
jmp dword [eax*4 + 0x100399c4]
mov eax, dword [edx + 8]
mov dword [esp + 0x28], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x10]
shr eax, 1
mov dword [esp + 0x34], eax
cmp ebx, 1
jne 0x1003968b
mov dword [esi + 0x2c], ebx
jmp 0x100396c2
push 0
push 0
lea eax, [esp + 0x18]
mov dword [esi + 0x2c], 2
push eax
push 4
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x74]
push dword [esp + 0x6c]
push ebp
call fcn.1003cb60
mov edi, eax
test edi, edi
js 0x10039974
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x14]
and ecx, 8
push ecx
push ebx
push eax
push dword [esp + 0x34]
push 0
push esi
call fcn.100399e0
mov edi, eax
test edi, edi
js 0x10039974
mov eax, dword [ebx + 0x1c]
mov ebx, dword [esp + 0x18]
or dword [ebx], eax
jmp case.0x10039665.3
mov eax, dword [esp + 0x10]
cmp eax, 4
jne 0x10039702
mov eax, dword [edx + 8]
cmp dword [eax], ecx
jne 0x1003971d
jmp case.0x10039665.3
cmp eax, 2
jne 0x10039711
mov eax, dword [edx + 8]
cmp word [eax], cx
jne 0x1003971d
jmp case.0x10039665.3
cmp eax, 1
jne case.0x10039665.3
mov eax, dword [edx + 8]
cmp byte [eax], cl
je case.0x10039665.3
mov ebx, dword [esp + 0x14]
or dword [ebx + 0x1c], 0x4000
mov ebx, dword [esp + 0x18]
or dword [ebx], 0x4001
jmp case.0x10039665.3
mov eax, dword [esp + 0x10]
cmp eax, 4
jne 0x10039746
mov eax, dword [edx + 8]
cmp dword [eax], ecx
je 0x10039761
jmp case.0x10039665.3
cmp eax, 2
jne 0x10039755
mov eax, dword [edx + 8]
cmp word [eax], cx
je 0x10039761
jmp case.0x10039665.3
cmp eax, 1
jne case.0x10039665.3
mov eax, dword [edx + 8]
cmp byte [eax], cl
jne case.0x10039665.3
mov ebx, dword [esp + 0x14]
or dword [ebx + 0x1c], 0x8000
mov ebx, dword [esp + 0x18]
or dword [ebx], 0x8001
mov eax, dword [esp + 0x24]
mov dword [eax], 1
push 0
push 1
push dword [esp + 0x5c]
push ebp
call fcn.1003c7d0
mov edi, eax
test edi, edi
je 0x10039371
mov ebx, dword [esp + 0x20]
push dword [esp + 0x54]
push ebp
call fcn.1003bdc0
test edi, edi
js 0x100397b0
mov edi, eax
test eax, eax
jns 0x100397bc
cmp edi, 0xfffff9bd
jne 0x1003996a
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x20]
push eax
push esi
lea eax, [esp + 0x90]
push eax
push ebx
push ebp
call fcn.100381d0
mov edi, eax
cmp edi, 0xfffff1f0
jne 0x100397eb
mov ecx, dword [esp + 0x30]
xor edi, edi
jmp 0x10039962
test edi, edi
js 0x10039974
mov eax, dword [esi]
mov dword [esp + 0x14], 0
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x34], ecx
imul ebx, eax, 0x2c
lea eax, [esp + 0x18]
push eax
push 0
add ebx, 0x34
push ebx
push ecx
call fcn.100c9f55
mov edi, eax
test edi, edi
js 0x10039974
push ebx
push 0
push dword [esp + 0x20]
call fcn.10117460
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x4c]
mov dword [esi], eax
mov dword [esi + 0x2c], 3
mov dword [eax], edx
mov ebp, dword [esp + 0x18]
add ebp, 8
cmp word [ebx], 0
jne 0x10039889
add ebx, 2
cmp word [ebx], 0
je 0x10039898
mov ecx, ebx
mov dword [esp + 0x2c], ebx
lea eax, [ecx + 2]
mov dword [esp + 0x28], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10039870
sub ecx, dword [esp + 0x28]
sar ecx, 1
lea ebx, [ebx + ecx*2]
add ebx, 2
jmp 0x10039898
or dword [ebp + 0x20], 0x4000
mov dword [esp + 0x2c], 0
mov dword [esi + 0x24], 0
test edx, edx
je 0x1003994c
mov eax, dword [esp + 0x34]
mov esi, ebx
dec edx
mov dword [ebp], eax
mov dword [esp + 0x28], edx
lea ecx, [esi + 2]
jmp 0x100398c0
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x100398c0
push 1
push ebp
sub esi, ecx
sar esi, 1
push esi
push ebx
push dword [esp + 0x3c]
push dword [esp + 0x5c]
call fcn.100399e0
mov edi, eax
test edi, edi
js 0x10039970
cmp dword [esp + 0x14], 0
jne 0x10039900
test byte [ebp + 0x20], 2
mov dword [esp + 0x14], 0
je 0x10039908
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x18]
lea ebx, [ebx + esi*2]
add ebx, 2
add ebp, 0x2c
mov dword [esp + 0x2c], ebx
inc dword [eax + 4]
cmp word [ebx], 0
je 0x1003993c
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10039927
sub ecx, edx
sar ecx, 1
lea ebx, [ebx + ecx*2]
add ebx, 2
mov edx, dword [esp + 0x28]
test edx, edx
jne 0x100398a7
mov esi, dword [esp + 0x48]
mov ecx, dword [esp + 0x30]
mov eax, dword [esi]
mov dword [ecx + 8], eax
xor eax, eax
cmp dword [esp + 0x14], eax
setne al
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x44]
inc esp
inc eax
mov dword [ecx + 0xc], eax
test edi, edi
jns 0x10039992
jmp 0x10039974
mov esi, dword [esp + 0x48]
mov eax, dword [esi]
test eax, eax
je 0x10039980
push eax
call fcn.1003a0a0
mov dword [esi], 0
cmp edi, 0xfffff1ee
je 0x100392e4
cmp edi, 0xfffff401
mov eax, 0xfffffc0d
cmove edi, eax
mov ecx, dword [esp + 0x38c]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1011720d
add esp, 0x380
ret 4
call fcn.10116ea2
mov edi, edi
insb byte es:[edi], dx
xchg esi, eax
add edx, dword [eax]
insb byte es:[edi], dx
xchg esi, eax
add edx, dword [eax]
jbe 0x10039965
add edx, dword [eax]
invalid