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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, edx
mov edx, ecx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x1c], edx
cmp esi, 0xa
jb 0x10022050
mov ecx, dword [ebp + 0x10]
lea eax, [edx + edi]
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 8]
lea ebx, [ecx + 4]
mov dword [esp + 0xc], ebx
movzx ebx, word [eax]
mov dword [esp + 0x84], ebx
movzx ebx, word [eax + 2]
mov dword [esp + 0x10], ebx
movzx ebx, word [eax + 4]
sub esi, ebx
mov dword [esp + 0x2c], ebx
movzx ebx, word [eax]
add eax, 6
sub esi, dword [esp + 0x10]
mov dword [esp + 0x24], eax
sub esi, ebx
add ebx, eax
sub esi, 6
mov eax, dword [esp + 0x10]
add eax, ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], eax
lea ebx, [ecx + 4]
lea eax, [edi + 3]
shr eax, 2
add edx, eax
mov dword [esp + 0x88], edx
mov dword [esp + 0x14], edx
lea edi, [edx + eax]
add eax, edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x18], edi
mov edi, eax
mov eax, dword [ecx]
shr eax, 0x10
movzx eax, al
mov dword [esp + 0x20], edi
mov dword [esp + 0x34], eax
cmp esi, dword [ebp + 0xc]
ja 0x10022050
push dword [esp + 0x84]
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x58]
call fcn.10020800
add esp, 4
cmp eax, 0xffffff88
ja 0x10022055
push dword [esp + 0x10]
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x68]
call fcn.10020800
add esp, 4
cmp eax, 0xffffff88
ja 0x10022055
push dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x78]
call fcn.10020800
add esp, 4
cmp eax, 0xffffff88
ja 0x10022055
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x44]
mov edx, dword [esp + 0x30]
push esi
lea edx, [edx + eax]
call fcn.10020800
add esp, 4
cmp eax, 0xffffff88
ja 0x10022055
lea ecx, [esp + 0x44]
call fcn.10018960
lea ecx, [esp + 0x74]
mov esi, eax
call fcn.10018960
lea ecx, [esp + 0x64]
or esi, eax
call fcn.10018960
lea ecx, [esp + 0x54]
or esi, eax
call fcn.10018960
or esi, eax
jne 0x10021f44
mov eax, dword [esp + 0x40]
add eax, 0xfffffff9
mov dword [esp + 0x24], eax
cmp edi, eax
jae 0x10021f44
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x58]
neg esi
mov eax, dword [esp + 0x54]
and ecx, 0x1f
shl eax, cl
and esi, 0x1f
mov edi, dword [esp + 0x1c]
mov ecx, esi
shr eax, cl
mov edx, dword [esp + 0x20]
mov dword [esp + 0x10], esi
lea ecx, [ebx + eax*4]
movzx eax, word [ecx]
mov word [edi], ax
movzx eax, byte [ecx + 3]
movzx ebx, byte [ecx + 2]
add edi, eax
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x64]
and ecx, 0x1f
shl eax, cl
mov ecx, esi
shr eax, cl
mov ecx, dword [esp + 0xc]
lea ecx, [ecx + eax*4]
mov dword [esp + 0x1c], edi
movzx eax, word [ecx]
mov edi, dword [esp + 0x14]
add ebx, dword [esp + 0x58]
mov word [edi], ax
movzx eax, byte [ecx + 3]
movzx edi, byte [ecx + 2]
add dword [esp + 0x14], eax
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x74]
and ecx, 0x1f
shl eax, cl
mov ecx, esi
mov esi, dword [esp + 0x18]
shr eax, cl
mov ecx, dword [esp + 0xc]
lea ecx, [ecx + eax*4]
add edi, dword [esp + 0x68]
movzx eax, word [ecx]
mov word [esi], ax
movzx eax, byte [ecx + 3]
movzx esi, byte [ecx + 2]
add dword [esp + 0x18], eax
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x10]
shr eax, cl
mov ecx, dword [esp + 0xc]
add esi, dword [esp + 0x78]
lea ecx, [ecx + eax*4]
movzx eax, word [ecx]
mov word [edx], ax
movzx eax, byte [ecx + 2]
mov edx, dword [esp + 0x48]
add edx, eax
movzx eax, byte [ecx + 3]
add dword [esp + 0x20], eax
mov ecx, ebx
mov eax, dword [esp + 0x54]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x10]
shr eax, cl
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x28], eax
movzx eax, word [ecx + eax*4]
mov ecx, dword [esp + 0x1c]
mov word [ecx], ax
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0xc]
movzx eax, byte [eax + ecx*4 + 2]
add eax, ebx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xc]
mov ebx, dword [esp + 0x64]
movzx eax, byte [eax + ecx*4 + 3]
mov ecx, edi
add dword [esp + 0x1c], eax
and ecx, 0x1f
shl ebx, cl
mov ecx, dword [esp + 0x10]
shr ebx, cl
mov ecx, dword [esp + 0xc]
movzx eax, word [ecx + ebx*4]
mov ecx, dword [esp + 0x14]
mov word [ecx], ax
mov ecx, dword [esp + 0xc]
movzx eax, byte [ecx + ebx*4 + 2]
add eax, edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x68], eax
movzx eax, byte [ecx + ebx*4 + 3]
mov ecx, esi
mov ebx, dword [esp + 0x74]
and ecx, 0x1f
add dword [esp + 0x14], eax
shl ebx, cl
mov ecx, dword [esp + 0x10]
shr ebx, cl
mov ecx, dword [esp + 0xc]
movzx eax, word [ecx + ebx*4]
mov word [edi], ax
movzx eax, byte [ecx + ebx*4 + 2]
mov edi, dword [esp + 0x20]
add eax, esi
mov esi, ecx
mov dword [esp + 0x78], eax
mov ecx, edx
and ecx, 0x1f
movzx eax, byte [esi + ebx*4 + 3]
mov ebx, dword [esp + 0x44]
add dword [esp + 0x18], eax
shl ebx, cl
mov ecx, dword [esp + 0x10]
shr ebx, cl
lea ecx, [esp + 0x44]
movzx eax, word [esi + ebx*4]
mov word [edi], ax
movzx eax, byte [esi + ebx*4 + 2]
add eax, edx
mov dword [esp + 0x48], eax
movzx eax, byte [esi + ebx*4 + 3]
add edi, eax
mov dword [esp + 0x20], edi
call fcn.10018960
lea ecx, [esp + 0x74]
mov esi, eax
call fcn.10018960
lea ecx, [esp + 0x64]
or esi, eax
call fcn.10018960
lea ecx, [esp + 0x54]
or esi, eax
call fcn.10018960
mov ebx, dword [esp + 0xc]
or esi, eax
mov eax, dword [esp + 0x24]
je 0x10021d47
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x88]
cmp ecx, eax
ja 0x10022050
mov edx, dword [esp + 0x38]
cmp dword [esp + 0x14], edx
ja 0x10022050
mov edx, dword [esp + 0x3c]
cmp dword [esp + 0x18], edx
ja 0x10022050
mov esi, dword [esp + 0x34]
lea edx, [esp + 0x54]
push esi
push ebx
push eax
call fcn.1001a6d0
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x70]
add esp, 0xc
push esi
push ebx
push dword [esp + 0x40]
call fcn.1001a6d0
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x80]
add esp, 0xc
push esi
push ebx
push dword [esp + 0x44]
call fcn.1001a6d0
add esp, 0xc
lea edx, [esp + 0x44]
mov ecx, edi
push esi
push ebx
push dword [esp + 0x48]
call fcn.1001a6d0
mov eax, dword [esp + 0x68]
add esp, 0xc
cmp eax, dword [esp + 0x60]
jne 0x10021fe1
cmp dword [esp + 0x58], 0x20
jne 0x10021fe1
mov ecx, 1
jmp 0x10021fe3
xor ecx, ecx
mov eax, dword [esp + 0x6c]
cmp eax, dword [esp + 0x70]
jne 0x10021ffb
cmp dword [esp + 0x68], 0x20
jne 0x10021ffb
mov edx, 1
jmp 0x10021ffd
xor edx, edx
mov eax, dword [esp + 0x7c]
cmp eax, dword [esp + 0x80]
jne 0x10022018
cmp dword [esp + 0x78], 0x20
jne 0x10022018
mov esi, 1
jmp 0x1002201a
xor esi, esi
mov eax, dword [esp + 0x4c]
cmp eax, dword [esp + 0x50]
jne 0x10022032
cmp dword [esp + 0x48], 0x20
jne 0x10022032
mov eax, 1
jmp 0x10022034
xor eax, eax
and eax, esi
and eax, edx
test ecx, eax
mov eax, dword [esp + 0x8c]
mov ecx, 0xffffffec
cmove eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffec
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret