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

Disassembly:
sub esp, 0x4c
mov eax, dword [esp + 0x50]
push ebx
push ebp
push esi
push edi
mov edi, dword [eax + 0x20c]
lea esi, [eax + 0x210]
xor eax, eax
mov dword [esp + 0x14], edi
xor ebp, ebp
mov dword [esp + 0x58], esi
push 0x7f8
cmp dword [edi + 0x34], 1
mov dword [esp + 0x20], 0xffffffff
sete al
mov dword [esp + 0x38], 0
xor ebx, ebx
mov dword [esp + 0x48], eax
lea eax, [esi + 0x24a8]
mov dword [esp + 0x54], ebp
push ebx
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x30], 1
mov dword [esp + 0x60], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x54], ebx
call fcn.1002c120
push 0x3fc
lea eax, [esi + 0x20ac]
push ebx
push eax
mov dword [esp + 0x64], eax
call fcn.1002c120
mov eax, dword [esi + 0x2080]
add esp, 0x18
mov ecx, dword [esi + 0x2084]
mov dword [esi + 0x2088], eax
mov eax, dword [esi + 0x2cb4]
mov dword [esi + 0x2090], eax
mov eax, dword [esi + 0x2cb8]
mov dword [esi + 0x208c], ecx
mov dword [esi + 0x2094], eax
test eax, eax
je 0x100213f3
movdqu xmm0, xmmword [esi + 0x2cbc]
movdqu xmmword [esi + 0x2098], xmm0
mov eax, ecx
mov dword [esi + 0x202c], ebx
neg eax
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x2028]
cmp ecx, eax
jl 0x1002143e
cmp dword [esi + 0x2ca4], ebx
je 0x10021421
pop edi
pop esi
pop ebp
mov eax, 0xfffff9bd
pop ebx
add esp, 0x4c
ret 8
cmp ecx, eax
jne 0x1002142b
mov dword [esi + 0x2084], ebx
push dword [edi + 0x24]
push esi
call fcn.100208d0
mov ebp, eax
test ebp, ebp
js 0x10021d63
mov ecx, edi
cmp dword [esp + 0x44], ebx
je 0x10021876
cmp dword [ecx + 0x1c], ebx
je 0x10021458
cmp dword [esi + 0x20], ebx
je 0x10021876
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x4c], eax
cmp eax, 0xff
jle 0x10021475
pop edi
pop esi
pop ebp
mov eax, 0xfffffbf0
pop ebx
add esp, 0x4c
ret 8
mov edi, dword [esi + 0x2084]
xor edx, edx
mov eax, dword [ecx + 8]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], 1
mov dword [esp + 0x50], ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0x38], eax
cmp dword [esp + 0x4c], edx
jle 0x1002178f
lea ecx, [esi + 0x24ac]
mov dword [esp + 0x44], ecx
mov ecx, dword [eax + 0x10]
add ecx, dword [eax + 0xc]
mov eax, dword [esi + 0x2030]
sub eax, edx
cmp eax, ecx
jge 0x10021534
jmp 0x100214d0
mov ebx, dword [esi + 0x2030]
add ebx, 0x1000
lea eax, [ebx + ebx]
push eax
call fcn.1000ae30
mov ebp, eax
test ebp, ebp
je 0x1002182f
mov ecx, dword [esi + 0x202c]
add ecx, ecx
push ecx
push dword [esi + 0x2024]
push ebp
call fcn.1002b6f0
add esp, 0xc
push dword [esi + 0x2024]
call fcn.1000afb0
mov ecx, dword [esp + 0x38]
mov dword [esi + 0x2030], ebx
sub ebx, dword [esp + 0x24]
mov dword [esi + 0x2024], ebp
xor ebp, ebp
mov eax, dword [ecx + 0x10]
add eax, dword [ecx + 0xc]
cmp ebx, eax
jl 0x100214d0
jmp 0x10021538
mov ecx, dword [esp + 0x38]
mov ebx, dword [ecx + 0x10]
sub ebx, dword [esp + 0x18]
test ebx, ebx
jle 0x10021613
jmp 0x10021550
mov eax, dword [esi + 0x2028]
sub eax, edi
cmp eax, 1
jge 0x1002158c
cmp dword [esi + 0x2ca4], 0
jne 0x10021613
mov eax, dword [esp + 0x14]
add dword [esi + 0x1c], edi
push dword [eax + 0x24]
push esi
call fcn.100208d0
mov ebp, eax
test ebp, ebp
js 0x10021d63
mov dword [esp + 0x10], 0
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 0x24]
push dword [esp + 0x78]
call fcn.10020560
mov ebp, eax
test ebp, ebp
js 0x10021d63
cmp dword [esp + 0x20], 1
jne 0x100215d4
mov edx, dword [esp + 0x14]
cmp dword [edx + 0x14], 0
jne 0x1002172d
mov edi, dword [esp + 0x10]
inc dword [esp + 0x1c]
lea eax, [edi + 0x12]
lea eax, [esi + eax*2]
push eax
call fcn.10015040
cmp eax, 1
jne 0x100215fa
cmp dword [esp + 0x28], 0
mov ecx, 2
cmovne eax, ecx
add dword [esp + 0x18], eax
sub ebx, eax
inc dword [esi + 0x202c]
inc edi
mov dword [esp + 0x10], edi
test ebx, ebx
jg 0x10021550
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x1c]
mov dword [ecx], eax
test ebx, ebx
jns 0x10021641
mov ecx, dword [esp + 0x24]
mov edx, 0x20
mov eax, dword [esi + 0x2024]
mov word [eax + ecx*2], dx
inc ecx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x38]
add ebx, dword [eax + 0xc]
test ebx, ebx
jle 0x1002173c
mov eax, dword [esi + 0x2028]
sub eax, edi
cmp eax, 1
jge 0x10021688
cmp dword [esi + 0x2ca4], 0
jne 0x1002173a
add dword [esi + 0x1c], edi
push dword [edx + 0x24]
push esi
call fcn.100208d0
mov ebp, eax
test ebp, ebp
js 0x10021d63
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
push dword [edi + 0x24]
push dword [esp + 0x78]
call fcn.10020560
mov ebp, eax
test ebp, ebp
js 0x10021d63
cmp dword [esp + 0x20], 1
jne 0x100216c8
cmp dword [edi + 0x14], 0
jne 0x10021736
mov edi, dword [esp + 0x10]
inc dword [esp + 0x1c]
lea eax, [edi + 0x12]
lea eax, [esi + eax*2]
push eax
call fcn.10015040
mov edx, eax
cmp edx, 1
jne 0x100216f0
cmp dword [esp + 0x28], 0
mov eax, 2
cmovne edx, eax
cmp edx, ebx
jg 0x1002170b
mov ecx, dword [esi + 0x2024]
mov ax, word [esi + edi*2 + 0x24]
mov esi, dword [esp + 0x24]
mov word [ecx + esi*2], ax
mov esi, dword [esp + 0x58]
add dword [esp + 0x18], edx
sub ebx, edx
inc dword [esp + 0x24]
inc edi
inc dword [esi + 0x202c]
mov dword [esp + 0x10], edi
test ebx, ebx
jle 0x1002173c
mov edx, dword [esp + 0x14]
jmp 0x10021650
mov edi, dword [esp + 0x10]
jmp 0x10021617
mov edi, dword [esp + 0x10]
test ebx, ebx
mov edx, dword [esp + 0x24]
jns 0x10021756
mov eax, dword [esi + 0x2024]
mov ecx, 0x20
mov word [eax + edx*2], cx
inc edx
mov dword [esp + 0x24], edx
mov ebx, dword [esp + 0x44]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x50]
inc ecx
sub eax, dword [ebx]
mov dword [ebx - 4], eax
add ebx, 8
mov eax, dword [esp + 0x38]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x44], ebx
mov eax, dword [eax]
mov dword [esp + 0x38], eax
cmp ecx, dword [esp + 0x4c]
jl 0x100214b0
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
cmp dword [ecx + 0x14], 0
je 0x1002183e
test ebx, ebx
jne 0x10021d14
mov eax, dword [esi + 0x2028]
sub eax, edi
cmp eax, 1
jge 0x100217dd
cmp dword [esi + 0x2ca4], 0
jne 0x10021d14
add dword [esi + 0x1c], edi
push dword [ecx + 0x24]
push esi
call fcn.100208d0
mov ebp, eax
test ebp, ebp
js 0x10021d63
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], 0
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
push dword [ecx + 0x24]
push dword [esp + 0x78]
call fcn.10020560
mov ebp, eax
test ebp, ebp
js 0x10021d63
mov eax, dword [esp + 0x20]
cmp eax, 1
je 0x1002186d
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc edi
mov dword [esp + 0x10], edi
test eax, eax
je 0x100217a1
jmp 0x10021d14
pop edi
pop esi
pop ebp
mov eax, 0xfffffc0d
pop ebx
add esp, 0x4c
ret 8
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
push dword [ecx + 0x24]
push dword [esp + 0x78]
call fcn.10020560
mov ebp, eax
test ebp, ebp
js 0x10021d63
mov edi, dword [esp + 0x10]
jmp 0x10021d10
mov edi, dword [esi + 0x2084]
xor eax, eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x44], eax
cmp edi, dword [esi + 0x2028]
jg 0x10021d06
lea edx, [esi + 0x24a4]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x38], edx
cmp edi, dword [esi + 0x2028]
jne 0x100218f3
cmp dword [esi + 0x2ca4], 0
jne 0x100218db
push dword [ecx + 0x24]
push esi
call fcn.100208d0
mov ebp, eax
test ebp, ebp
js 0x10021d5c
add dword [esi + 0x1c], edi
xor edi, edi
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], edi
jmp 0x100218f3
test eax, eax
je 0x10021cff
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], 1
cmp eax, dword [esi + 0x2030]
jne 0x1002190f
push esi
call fcn.10021200
mov ebp, eax
test ebp, ebp
js 0x10021d5c
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x24], 0
je 0x10021a73
cmp dword [esp + 0x54], 0
jne 0x10021a73
cmp dword [esp + 0x1c], 4
jne 0x1002194d
cmp word [esi + edi*2 + 0x24], 0x22
jne 0x1002194d
dec eax
mov edx, 5
dec dword [esi + 0x202c]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
jmp 0x10021a77
movzx eax, word [esi + edi*2 + 0x24]
or edx, 0xffffffff
mov dword [esp + 0x1c], edx
cmp eax, 0x20
je 0x100219c5
cmp eax, 9
je 0x100219c5
mov eax, dword [esi + 0x20a8]
cmp eax, edx
je 0x10021984
cmp edi, eax
jl 0x10021984
mov ebx, 1
mov dword [esp + 0x34], 8
mov dword [esp + 0x20], ebx
jmp 0x100219c7
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 0x24]
push dword [esp + 0x78]
call fcn.10020560
mov ebp, eax
test ebp, ebp
jne 0x10021d5c
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
jmp 0x100219c7
xor edx, edx
movzx ecx, word [esi + edi*2 + 0x24]
cmp ecx, 0x1a
jne 0x100219ea
mov eax, dword [esi + 0x2028]
dec eax
cmp edi, eax
jl 0x100219ea
mov edx, 6
mov dword [esp + 0x1c], edx
jmp 0x10021a77
cmp ebx, 1
jne 0x100219fa
mov edx, ebx
mov dword [esp + 0x1c], edx
jmp 0x10021a77
mov eax, dword [esp + 0x14]
cmp cx, word [eax + 0x38]
jne 0x10021a17
mov eax, dword [esp + 0x18]
mov edx, 2
mov dword [esp + 0x1c], edx
mov dword [esp + 0x48], eax
jmp 0x10021a77
movzx eax, word [eax + 0x48]
cmp cx, ax
jne 0x10021a30
test ax, ax
je 0x10021a30
mov edx, 3
mov dword [esp + 0x1c], edx
jmp 0x10021a77
cmp ebp, 0xffffffff
jne 0x10021a49
cmp dword [esi + 0x2ca4], 0
je 0x10021a49
mov edx, 1
mov dword [esp + 0x1c], edx
jmp 0x10021a77
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x34], 2
jne 0x10021a63
cmp ecx, 0x5c
jne 0x10021a63
mov edx, 4
mov dword [esp + 0x1c], edx
jmp 0x10021a77
test edx, edx
mov eax, 5
cmovne edx, eax
mov dword [esp + 0x1c], edx
jmp 0x10021a77
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x34]
lea ecx, [eax*8]
sub ecx, eax
mov dword [esp + 0x3c], ecx
lea eax, [ecx + edx]
mov eax, dword [eax*4 + 0x1003d9e8]
dec eax
cmp eax, 6
ja case.0x10021a9c.2
jmp dword [eax*4 + 0x10021dd4]
cmp dword [esp + 0x18], 0
jne 0x10021ac6
mov eax, dword [esi + 0x2030]
add eax, eax
push eax
push 0xff
push dword [esi + 0x2024]
call fcn.1002c120
add esp, 0xc
test ebx, ebx
mov ebx, dword [esp + 0x18]
je 0x10021b03
cmp dword [esp + 0x28], 0
je 0x10021b03
mov ecx, dword [esi + 0x2024]
mov ax, word [esp + 0x30]
mov word [ecx + ebx*2], ax
inc ebx
inc dword [esi + 0x202c]
cmp ebx, dword [esi + 0x2030]
jne 0x10021b03
push esi
call fcn.10021200
mov ebp, eax
test ebp, ebp
js 0x10021d5c
mov ecx, dword [esi + 0x2024]
mov ax, word [esi + edi*2 + 0x24]
mov edx, dword [esp + 0x1c]
mov word [ecx + ebx*2], ax
inc ebx
inc dword [esi + 0x202c]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x18], ebx
jmp 0x10021c1b
mov eax, dword [esp + 0x4c]
mov dword [eax], 1
jmp case.0x10021a9c.2
lea eax, [edi + 1]
mov dword [esi + 0x2ca4], 1
mov dword [esi + 0x2028], eax
jmp case.0x10021a9c.2
mov dword [esi + 0x2ca4], 1
mov dword [esi + 0x2028], edi
jmp case.0x10021a9c.2
test ebp, ebp
jne case.0x10021a9c.2
mov edi, edi
test ebx, ebx
jne 0x10021c0f
cmp edi, dword [esi + 0x2028]
jne 0x10021ba6
cmp dword [esi + 0x2ca4], ebx
jne 0x10021bee
mov eax, dword [esp + 0x14]
push dword [eax + 0x24]
push esi
call fcn.100208d0
mov ebp, eax
test ebp, ebp
js 0x10021d5c
add dword [esi + 0x1c], edi
mov dword [esp + 0x10], ebx
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 0x24]
push dword [esp + 0x78]
call fcn.10020560
mov edi, dword [esp + 0x10]
mov ebp, eax
test ebp, ebp
jne 0x10021c0f
mov ebx, dword [esp + 0x20]
test ebx, ebx
jne 0x10021c0f
cmp dword [esp + 0x2c], ebx
jne 0x10021b70
inc edi
mov dword [esp + 0x10], edi
jmp 0x10021b70
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x10021cff
mov ecx, dword [esp + 0x3c]
xor eax, eax
mov edx, 1
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], edx
jmp 0x10021c1f
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x34], 0
jne 0x10021c85
cmp edx, 2
je 0x10021c3e
cmp edx, 3
je 0x10021c3e
cmp edx, 5
je 0x10021c3e
test eax, eax
je 0x10021c85
cmp edx, 1
jne 0x10021c85
cmp dword [esp + 0x40], 0xfe
ja 0x10021c6d
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x44]
mov dword [esi - 4], eax
mov eax, esi
mov esi, dword [esp + 0x44]
mov dword [eax], esi
mov esi, dword [esp + 0x48]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x58]
jmp 0x10021c71
mov eax, dword [esp + 0x38]
inc dword [esp + 0x50]
add dword [esp + 0x4c], 4
inc dword [esp + 0x40]
add eax, 8
mov dword [esp + 0x38], eax
lea eax, [ecx + edx]
mov eax, dword [eax*4 + 0x1003d908]
mov dword [esp + 0x34], eax
cmp eax, 6
jne 0x10021ca2
mov dword [esp + 0x54], 1
jmp 0x10021cd0
cmp eax, 8
je 0x10021cac
cmp eax, 7
jne 0x10021cd0
cmp dword [esp + 0x40], 0xfe
ja 0x10021ccb
mov ecx, dword [esp + 0x38]
mov eax, ebx
mov edx, dword [esp + 0x44]
sub eax, edx
mov dword [ecx - 4], eax
mov eax, dword [esp + 0x34]
mov dword [ecx], edx
cmp eax, 8
je 0x10021d06
cmp dword [esp + 0x2c], 0
je 0x10021cdf
cmp word [esi + edi*2 + 0x24], 0xa
je 0x10021ce4
inc edi
mov dword [esp + 0x10], edi
xor ebx, ebx
mov dword [esp + 0x20], ebx
cmp edi, dword [esi + 0x2028]
jg 0x10021d06
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
jmp 0x100218a8
mov ebp, 0xfffff9bd
jmp 0x10021d5c
mov eax, dword [esp + 0x50]
mov dword [esi + 0x2ca0], eax
mov ecx, dword [esp + 0x14]
lea eax, [edi + 1]
add dword [esi + 0x1c], eax
cmp edi, dword [esi + 0x2028]
jne 0x10021d46
cmp dword [esi + 0x2ca4], 0
jne 0x10021d46
push dword [ecx + 0x24]
push esi
call fcn.100208d0
mov ebp, eax
test ebp, ebp
js 0x10021d5c
mov dword [esi + 0x2084], 0
jmp 0x10021d4f
lea eax, [edi + 1]
mov dword [esi + 0x2084], eax
cmp dword [esi + 0x20], 0
jne 0x10021d5c
mov dword [esi + 0x20], 1
cmp dword [esp + 0x34], 6
je 0x10021da6
cmp ebp, 0xffffffff
je 0x10021da6
cmp dword [esp + 0x54], 0
je 0x10021d8d
cmp dword [esp + 0x64], 0
je 0x10021d8d
mov eax, dword [esi + 0x20]
inc eax
push eax
push 0x100010b4
push 0
push dword [esi + 0x2cb0]
call fcn.1001c350
test ebp, ebp
jne 0x10021d9a
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x2cac], eax
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x4c
ret 8
cmp dword [esp + 0x64], 0
je 0x10021dc4
mov ecx, dword [esi + 0x20]
inc ecx
push ecx
push 0x100010b4
push 0
push dword [esi + 0x2cb0]
call fcn.1001c350
pop edi
pop esi
pop ebp
mov eax, 0xffffec69
pop ebx
add esp, 0x4c
ret 8