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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x88
cmp edx, 2
jbe 0x10039919
lea eax, [esp + 0x40]
push 2
push 0x101b2855
push edx
push ecx
push eax
call fcn.10182f70
add esp, 0x14
cmp dword [esp + 0x40], 0
je 0x10039a4a
mov eax, dword [esp + 0x64]
mov esi, dword [esp + 0x70]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
mov edi, dword [esp + 0x7c]
cmp eax, 0xffffffff
mov dword [esp + 4], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], esi
je 0x10039a99
mov ebx, dword [esp + 0x5c]
xor eax, eax
lea ecx, [ebx + edi - 1]
cmp ecx, edx
jae 0x10039ca3
lea eax, [edi - 1]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x1c], eax
mov eax, edi
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 8]
neg eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
jmp 0x10039946
movzx eax, word [ecx]
cmp eax, 0x2840
sete al
jmp 0x10039ca3
add ebx, edi
mov dword [esp + 4], 0
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
lea ecx, [ebx + eax]
cmp ecx, edx
jae 0x10039c44
movzx ecx, byte [esi + ecx]
xor eax, eax
mov esi, 1
shld eax, esi, cl
shl esi, cl
test cl, 0x20
mov ecx, 0
cmovne eax, esi
cmovne esi, ecx
and eax, dword [esp + 0x2c]
and esi, dword [esp + 0x30]
or esi, eax
je 0x10039929
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov dword [esp + 0x14], ebx
cmp ecx, eax
mov esi, eax
cmova esi, ecx
lea eax, [ebx + esi]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x20], esi
sub edi, esi
lea ebx, [ebx + esi]
mov esi, 0
cmovb edi, esi
nop dword [eax + eax]
sub edi, 1
jb 0x100399da
cmp eax, edx
jae 0x10039cab
movzx ecx, byte [ebx]
mov edx, dword [esp + 0x18]
inc ebx
lea esi, [eax + 1]
cmp cl, byte [edx + eax]
mov edx, dword [esp + 0xc]
mov eax, esi
je 0x100399a0
add esi, dword [esp + 0x38]
mov edi, dword [esp + 0x10]
mov dword [esp + 4], 0
mov ebx, esi
jmp 0x10039933
mov eax, dword [esp + 8]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
nop word cs:[eax + eax]
cmp dword [esp + 4], eax
mov ecx, dword [esp + 0x14]
jae 0x10039ca1
dec eax
cmp eax, edi
jae 0x10039cbe
mov edx, dword [esp + 0xc]
add ecx, eax
cmp ecx, edx
jae 0x10039ccf
mov edx, dword [esp + 0x24]
movzx ebx, byte [edx + eax]
cmp bl, byte [esi + ecx]
je 0x100399f0
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0xc]
add ebx, dword [esp + 0x1c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
lea ecx, [ebx + eax]
cmp ecx, edx
jb 0x10039946
jmp 0x10039c44
cmp byte [esp + 0x4e], 0
jne 0x10039c44
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x70]
movzx ebx, byte [esp + 0x4c]
test ecx, ecx
mov eax, edx
je 0x10039bcf
mov eax, edx
sub eax, ecx
jbe 0x10039bc9
cmp byte [edi + ecx], 0xc0
jge 0x10039bcf
mov ebx, edi
push 0x101b267c
push edx
push ecx
push edx
push ebx
call fcn.101af790
add esp, 0x14
ud2
mov ebx, dword [esp + 0x5c]
lea ecx, [ebx + edi - 1]
cmp ecx, edx
jae 0x10039c44
lea eax, [edi - 1]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 8], eax
cmp eax, edi
mov eax, edi
cmova eax, dword [esp + 8]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 8]
dec eax
cmp eax, edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
jae 0x10039cf2
mov eax, dword [esp + 0x58]
mov dword [esp + 0x20], eax
jmp 0x10039b0f
mov edi, dword [esp + 0x10]
add ebx, edi
mov eax, dword [esp + 0x28]
lea ecx, [ebx + eax]
xor eax, eax
cmp ecx, edx
jae 0x10039ca3
movzx ecx, byte [esi + ecx]
xor eax, eax
mov edi, 1
shld eax, edi, cl
shl edi, cl
test cl, 0x20
mov ecx, 0
cmovne eax, edi
cmovne edi, ecx
and eax, dword [esp + 0x2c]
and edi, dword [esp + 0x30]
or edi, eax
je 0x10039af8
mov ecx, ebx
mov dword [esp + 4], ebx
lea edi, [esi + ebx]
mov ebx, dword [esp + 8]
neg ecx
nop dword [eax + eax]
cmp dword [esp + 0x14], ebx
je 0x10039b7b
mov eax, dword [esp + 4]
add eax, ebx
cmp eax, edx
jae 0x10039da2
mov eax, dword [esp + 0x24]
dec ecx
movzx eax, byte [eax + ebx]
cmp al, byte [edi + ebx]
lea ebx, [ebx + 1]
je 0x10039b50
neg ecx
mov ebx, ecx
jmp 0x10039afe
mov eax, dword [esp + 4]
lea ecx, [eax - 1]
lea edi, [esi + eax - 1]
mov eax, dword [esp + 8]
mov ebx, eax
nop dword [eax]
sub ebx, 1
jb 0x10039ca1
lea esi, [ecx + eax]
cmp esi, edx
jae 0x10039ce0
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
movzx edx, byte [edx + eax - 1]
cmp dl, byte [edi + eax]
mov edx, dword [esp + 0xc]
mov eax, ebx
je 0x10039b90
mov ebx, dword [esp + 4]
add ebx, dword [esp + 0x20]
jmp 0x10039afe
jne 0x10039a84
test eax, eax
je 0x10039c1e
mov bh, byte [edi + ecx]
movzx esi, bh
test bh, bh
jns 0x10039c36
movzx eax, byte [edi + ecx + 1]
and esi, 0x1f
and eax, 0x3f
cmp bh, 0xe0
jb 0x10039c26
mov dword [esp + 0xc], edi
movzx edi, byte [edi + ecx + 2]
shl eax, 6
and edi, 0x3f
or edi, eax
cmp bh, 0xf0
jb 0x10039c2d
mov eax, dword [esp + 0xc]
and esi, 7
shl edi, 6
shl esi, 0x12
movzx eax, byte [eax + ecx + 3]
and eax, 0x3f
or eax, edi
or esi, eax
jmp 0x10039c32
mov al, 1
test bl, bl
jne 0x10039ca3
jmp 0x10039c44
shl esi, 6
or esi, eax
jmp 0x10039c36
shl esi, 0xc
or esi, edi
mov edi, dword [esp + 0xc]
mov al, 1
test bl, bl
jne 0x10039ca3
cmp esi, 0x110000
jne 0x10039c48
xor eax, eax
jmp 0x10039ca3
mov ebx, edi
mov edi, 1
cmp esi, 0x80
jb 0x10039c72
mov edi, 2
cmp esi, 0x800
jb 0x10039c72
cmp esi, 0x10000
mov edi, 4
sbb edi, 0
add ecx, edi
je 0x10039c89
mov eax, edx
mov esi, ebx
sub eax, ecx
jbe 0x10039c8f
cmp byte [esi + ecx], 0xc0
jge 0x10039c95
jmp 0x10039a86
mov eax, edx
mov esi, ebx
jmp 0x10039c95
jne 0x10039a86
test eax, eax
je 0x10039ca1
movzx eax, byte [esi + ecx]
test al, al
js 0x10039cb8
mov al, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x20]
jmp 0x10039daa
cmp al, 0xe0
mov al, 1
jmp 0x10039ca3
push 0x101b2620
push edi
push eax
call fcn.101af280
add esp, 0xc
ud2
push 0x101b2630
push edx
push ecx
call fcn.101af280
add esp, 0xc
ud2
mov ecx, dword [esp + 4]
lea eax, [ecx + eax - 1]
push 0x101b2630
jmp 0x10039db4
mov eax, dword [esp + 8]
add eax, esi
mov dword [esp + 0x3c], eax
movzx ecx, byte [esi + ecx]
mov eax, esi
mov edx, 1
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 8]
mov dword [esp + 4], ebx
xor eax, eax
shld eax, edx, cl
shl edx, cl
test cl, 0x20
mov ecx, 0
cmovne eax, edx
cmovne edx, ecx
mov ecx, dword [esp + 0x24]
and eax, dword [esp + 0x2c]
and edx, dword [esp + 0x30]
mov dword [esp + 0x1c], ecx
mov ecx, ebx
or edx, eax
mov edx, dword [esp + 0xc]
je 0x10039d7c
cmp esi, edi
mov dword [esp + 0x38], edi
je 0x10039dc0
lea eax, [esi + ecx]
cmp eax, edx
jae 0x10039da2
mov edi, dword [esp + 0x1c]
movzx eax, byte [edi + esi]
inc edi
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x38]
mov byte [esp + 0x34], al
mov eax, dword [esp + 0x3c]
movzx ebx, byte [esp + 0x34]
dec edi
cmp bl, byte [eax + ecx]
lea eax, [ecx + 1]
mov ecx, eax
je 0x10039d42
jmp 0x10039d84
mov eax, dword [esp + 4]
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
mov ebx, eax
add ecx, eax
mov eax, 0
cmp ecx, edx
jb 0x10039cfc
jmp 0x10039ca3
mov eax, dword [esp + 4]
add eax, dword [esp + 8]
cmp edx, eax
cmova eax, edx
push 0x101b2610
push edx
push eax
call fcn.101af280
add esp, 0xc
ud2
test esi, esi
mov esi, dword [esp + 0x10]
mov al, 1
je 0x10039ca3
push 0x101b2620
push esi
push dword [esp + 0x28]
call fcn.101af280
add esp, 0xc
ud2