Function at 0x10039260
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 0x1003930b
xor edi, edi
jmp 0x100399c0
push 1
push 0x82
lea eax, [esp + 0x8c]
push eax
push dword [esi + 0xc]
push ebp
call fcn.1003c5f0
mov edi, eax
test edi, edi
js 0x10039994
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.1002cb90
mov edi, eax
test edi, edi
js 0x10039994
push 0
push 0
push dword [esp + 0x5c]
lea eax, [esp + 0x90]
push ebp
mov dword [esi + 0x20], eax
call fcn.1003c7f0
mov edi, eax
test edi, edi
jne 0x100397bc
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.1003cb80
mov edi, eax
test edi, edi
jne 0x100397b8
test byte [esp + 0x18c], 1
je 0x100397a0
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.1003cb80
mov edi, eax
test edi, edi
jne 0x100397b8
mov eax, dword [esp + 0x10]
mov ecx, 0x40
shr eax, 1
cmp eax, ecx
cmovb ecx, eax
add ecx, ecx
cmp ecx, 0x200
jae 0x100399dd
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 0x1003943f
lea ebx, [edi + 1]
jmp 0x1003949b
lea eax, [esp + 0x18c]
push 0x10002a40
push eax
call fcn.10115740
add esp, 8
test eax, eax
jne 0x1003945d
lea ebx, [eax + 2]
jmp 0x1003949b
lea eax, [esp + 0x18c]
push 0x10002a80
push eax
call fcn.10115740
add esp, 8
test eax, eax
jne 0x1003947b
lea ebx, [eax + 4]
jmp 0x1003949b
lea eax, [esp + 0x18c]
push 0x10002a94
push eax
call fcn.10115740
add esp, 8
test eax, eax
jne 0x100397a0
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.1003cb80
mov edi, eax
test edi, edi
jne 0x100397b8
mov eax, dword [esp + 0x10]
mov ecx, 0x40
shr eax, 1
cmp eax, ecx
cmovb ecx, eax
add ecx, ecx
cmp ecx, 0x200
jae 0x100399dd
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 0x1003961d
push edi
push 0x18
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x198]
push eax
push dword [esi + 0xc]
push ebp
call fcn.1003c4a0
mov edi, eax
cmp edi, 0xfffffa1d
je 0x100397a0
test edi, edi
js 0x100397b8
cmp dword [esi], 0
jne 0x10039565
push esi
call fcn.10039150
mov edi, eax
test edi, edi
js 0x10039994
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 0x10039994
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.1003cb80
mov edi, eax
test edi, edi
jne 0x100397b8
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.0x10039685.3
jmp dword [eax*4 + 0x100399e4]
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 0x100396ab
mov dword [esi + 0x2c], ebx
jmp 0x100396e2
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.1003cb80
mov edi, eax
test edi, edi
js 0x10039994
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.10039a00
mov edi, eax
test edi, edi
js 0x10039994
mov eax, dword [ebx + 0x1c]
mov ebx, dword [esp + 0x18]
or dword [ebx], eax
jmp case.0x10039685.3
mov eax, dword [esp + 0x10]
cmp eax, 4
jne 0x10039722
mov eax, dword [edx + 8]
cmp dword [eax], ecx
jne 0x1003973d
jmp case.0x10039685.3
cmp eax, 2
jne 0x10039731
mov eax, dword [edx + 8]
cmp word [eax], cx
jne 0x1003973d
jmp case.0x10039685.3
cmp eax, 1
jne case.0x10039685.3
mov eax, dword [edx + 8]
cmp byte [eax], cl
je case.0x10039685.3
mov ebx, dword [esp + 0x14]
or dword [ebx + 0x1c], 0x4000
mov ebx, dword [esp + 0x18]
or dword [ebx], 0x4001
jmp case.0x10039685.3
mov eax, dword [esp + 0x10]
cmp eax, 4
jne 0x10039766
mov eax, dword [edx + 8]
cmp dword [eax], ecx
je 0x10039781
jmp case.0x10039685.3
cmp eax, 2
jne 0x10039775
mov eax, dword [edx + 8]
cmp word [eax], cx
je 0x10039781
jmp case.0x10039685.3
cmp eax, 1
jne case.0x10039685.3
mov eax, dword [edx + 8]
cmp byte [eax], cl
jne case.0x10039685.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.1003c7f0
mov edi, eax
test edi, edi
je 0x10039391
mov ebx, dword [esp + 0x20]
push dword [esp + 0x54]
push ebp
call fcn.1003bde0
test edi, edi
js 0x100397d0
mov edi, eax
test eax, eax
jns 0x100397dc
cmp edi, 0xfffff9bd
jne 0x1003998a
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.100381f0
mov edi, eax
cmp edi, 0xfffff1f0
jne 0x1003980b
mov ecx, dword [esp + 0x30]
xor edi, edi
jmp 0x10039982
test edi, edi
js 0x10039994
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 0x10039994
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 0x100398a9
add ebx, 2
cmp word [ebx], 0
je 0x100398b8
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 0x10039890
sub ecx, dword [esp + 0x28]
sar ecx, 1
lea ebx, [ebx + ecx*2]
add ebx, 2
jmp 0x100398b8
or dword [ebp + 0x20], 0x4000
mov dword [esp + 0x2c], 0
mov dword [esi + 0x24], 0
test edx, edx
je 0x1003996c
mov eax, dword [esp + 0x34]
mov esi, ebx
dec edx
mov dword [ebp], eax
mov dword [esp + 0x28], edx
lea ecx, [esi + 2]
jmp 0x100398e0
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x100398e0
push 1
push ebp
sub esi, ecx
sar esi, 1
push esi
push ebx
push dword [esp + 0x3c]
push dword [esp + 0x5c]
call fcn.10039a00
mov edi, eax
test edi, edi
js 0x10039990
cmp dword [esp + 0x14], 0
jne 0x10039920
test byte [ebp + 0x20], 2
mov dword [esp + 0x14], 0
je 0x10039928
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 0x1003995c
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10039947
sub ecx, edx
sar ecx, 1
lea ebx, [ebx + ecx*2]
add ebx, 2
mov edx, dword [esp + 0x28]
test edx, edx
jne 0x100398c7
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 eax
mov dword [ecx + 0xc], eax
test edi, edi
jns 0x100399b2
jmp 0x10039994
mov esi, dword [esp + 0x48]
mov eax, dword [esi]
test eax, eax
je 0x100399a0
push eax
call fcn.1003a0c0
mov dword [esi], 0
cmp edi, 0xfffff1ee
je 0x10039304
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
mov word [esi - 0x6973effd], ss
add edx, dword [eax]
xchg esi, eax
xchg edi, eax
add edx, dword [eax]
adc byte [edi - 0x68abeffd], dl
add edx, dword [eax]
int3