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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
mov esi, edx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x70]
test ecx, ecx
mov dword [esp + 0x58], ecx
jle 0x1002c7b7
mov dword [esp + 0x24], esi
mov eax, ecx
and eax, 3
mov edx, ecx
xor ecx, ecx
cmp edx, 4
jb 0x1002c27e
mov edx, dword [esp + 0x70]
and edx, 0xfffffffc
mov ecx, dword [esp + 0x24]
lea esi, [ecx + 0x3c]
xor ecx, ecx
nop
mov dword [esi - 0x30], ecx
lea edi, [ecx + 1]
mov dword [esi - 0x20], edi
lea edi, [ecx + 2]
mov dword [esi - 0x10], edi
lea edi, [ecx + 3]
mov dword [esi], edi
add ecx, 4
add esi, 0x40
cmp ecx, edx
jne 0x1002c260
test eax, eax
je 0x1002c2ab
mov edx, ecx
shl edx, 4
mov esi, dword [esp + 0x24]
add edx, esi
add edx, 0xc
shl eax, 4
xor esi, esi
nop word cs:[eax + eax]
mov dword [edx + esi], ecx
inc ecx
add esi, 0x10
cmp eax, esi
jne 0x1002c2a0
push 0x1002f4d0
push 0x10
mov edi, dword [esp + 0x78]
push edi
mov esi, dword [esp + 0x30]
push esi
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
mov eax, edi
add esp, 0x10
test edi, edi
jle 0x1002c7d0
mov ecx, dword [esp + 4]
lea edx, [ecx + 0x18]
mov dword [esp + 0x48], edx
xor edx, edx
jmp 0x1002c2f1
mov dword [esi + ebx + 8], 0
inc edx
cmp edx, eax
je 0x1002c7e4
mov ebx, edx
shl ebx, 4
movzx edi, word [esi + ebx + 4]
mov dword [esp + 0x50], edi
test edi, edi
je 0x1002c2e0
movzx ebp, word [esi + ebx + 6]
mov edi, ebp
mov dword [esp + 0x44], ebp
test ebp, ebp
je 0x1002c2e0
mov dword [esp + 0x4c], edx
mov edi, dword [ecx]
mov eax, dword [esp + 4]
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0x50]
lea esi, [eax + ecx]
dec esi
mov eax, esi
cdq
idiv ecx
mov ecx, dword [esp + 4]
sub esi, edx
mov eax, dword [ecx + 0x18]
movzx edx, word [eax]
lea ebp, [esi + edx]
cmp ebp, edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x54], edx
jle 0x1002c37f
mov edi, dword [ecx + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 0x2c], 0x40000000
mov dword [esp + 0xc], 0x40000000
mov dword [esp], 0
cmp edi, 1
je 0x1002c540
jmp 0x1002c6d0
mov dword [esp], edi
mov edi, dword [ecx + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 0x2c], 0x40000000
mov dword [esp + 0x30], edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], 0x40000000
mov eax, ebp
mov dword [esp + 0x40], edi
jmp 0x1002c40a
mov eax, dword [esp + 0xc]
cmp ebx, eax
cmovl eax, ebx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
cmovl eax, dword [esp + 0x18]
mov dword [esp + 8], eax
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov edx, eax
mov eax, dword [eax + 4]
add edx, 4
mov dword [esp + 0x18], edx
movzx edx, word [eax]
mov dword [esp + 0x30], edx
add edx, esi
mov dword [esp + 0x1c], eax
mov eax, edx
cmp edx, dword [esp]
jg 0x1002c512
mov ebx, 0
mov dword [esp + 0x14], 0
test esi, esi
jle 0x1002c4c0
mov dword [esp + 0x14], 0
mov edi, dword [esp + 0x30]
xor edx, edx
xor ecx, ecx
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x3c], eax
jmp 0x1002c480
mov ebp, dword [ebp + 4]
mov dword [esp + 0x34], ebp
movzx ebx, word [ebp]
mov dword [esp + 0x20], ebx
sub ebx, edi
lea edi, [ebx + edx]
mov eax, dword [esp + 0x10]
mov ebp, eax
sub ebp, edx
cmp edi, eax
mov eax, dword [esp + 0x3c]
cmovle ebp, ebx
imul esi, ebp
mov ebx, ecx
add dword [esp + 0x14], esi
add edx, ebp
mov esi, dword [esp + 0x20]
mov edi, esi
mov ecx, ebx
cmp eax, esi
mov ebp, dword [esp + 0x34]
jle 0x1002c4c0
movzx ebx, word [ebp + 2]
mov esi, ecx
sub esi, ebx
jge 0x1002c440
mov esi, ebx
sub esi, ecx
imul esi, edx
mov ebp, dword [ebp + 4]
movzx ecx, word [ebp]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x30]
cmp edi, ecx
mov dword [esp + 0x34], ebp
jae 0x1002c4b0
mov ebp, dword [esp + 0x20]
sub ebp, ecx
jmp 0x1002c46a
mov ebp, dword [esp + 0x20]
sub ebp, edi
jmp 0x1002c46a
mov edi, dword [esp + 0x40]
test edi, edi
je 0x1002c3c0
mov eax, dword [esp + 0x44]
add eax, ebx
mov ecx, dword [esp + 4]
cmp eax, dword [ecx + 4]
jg 0x1002c3de
cmp ebx, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
jl 0x1002c4fd
jne 0x1002c3e2
cmp edx, dword [esp + 0x2c]
jge 0x1002c3e2
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 0x2c], edx
jmp 0x1002c3e2
mov eax, dword [esp + 8]
test eax, eax
je 0x1002c524
mov eax, dword [eax]
movzx eax, word [eax]
mov dword [esp], eax
jmp 0x1002c533
mov dword [esp + 8], 0
mov dword [esp], 0
mov ebx, dword [esp + 0x28]
cmp edi, 1
jne 0x1002c6d0
mov edi, dword [esp + 0x38]
cmp esi, dword [esp + 0x54]
jle 0x1002c55a
nop word [eax + eax]
mov edi, dword [edi + 4]
movzx eax, word [edi]
cmp esi, eax
jg 0x1002c550
mov eax, dword [ecx + 4]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x48]
jmp 0x1002c58b
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov edi, dword [edi + 4]
test edi, edi
je 0x1002c6d0
mov dword [esp + 0x1c], edi
movzx ebx, word [edi]
mov dword [esp + 0x34], ebx
sub ebx, esi
mov ecx, dword [esp + 0x38]
nop dword [eax]
mov esi, ecx
mov edi, eax
lea eax, [ecx + 4]
mov ecx, dword [ecx + 4]
movzx edx, word [ecx]
cmp ebx, edx
jge 0x1002c5a0
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x38], esi
movzx ebx, word [esi]
xor eax, eax
mov edi, 0
cmp word [esp + 0x34], bx
jbe 0x1002c670
xor edi, edi
xor ecx, ecx
xor esi, esi
mov edx, dword [esp + 0x38]
jmp 0x1002c625
mov edx, dword [edx + 4]
mov dword [esp + 0x20], edx
movzx eax, word [edx]
mov dword [esp + 0x30], eax
sub eax, ebx
lea ebx, [eax + ecx]
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x10]
mov edx, edi
sub edx, ecx
cmp ebx, edi
mov edi, dword [esp + 0x14]
cmovle edx, eax
imul ebp, edx
mov eax, esi
mov esi, dword [esp + 0x30]
add edi, ebp
add ecx, edx
mov ebx, esi
mov edx, esi
mov esi, eax
cmp edx, dword [esp + 0x34]
mov edx, dword [esp + 0x20]
jae 0x1002c670
movzx eax, word [edx + 2]
mov ebp, esi
sub ebp, eax
jge 0x1002c5e0
mov dword [esp + 0x14], eax
mov ebp, eax
sub ebp, esi
imul ebp, ecx
mov edx, dword [edx + 4]
movzx esi, word [edx]
mov eax, dword [esp + 0x3c]
cmp ebx, eax
mov dword [esp + 0x20], edx
mov edx, esi
jge 0x1002c660
sub edx, eax
mov eax, dword [esp + 0x14]
jmp 0x1002c611
sub edx, ebx
mov eax, dword [esp + 0x14]
jmp 0x1002c611
mov ecx, eax
mov eax, dword [esp + 0x44]
add eax, ecx
cmp eax, dword [esp + 0x40]
jge 0x1002c570
cmp ecx, dword [esp + 0xc]
jg 0x1002c570
mov edx, ecx
mov ebp, edi
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
jl 0x1002c6bb
cmp ebp, dword [esp + 0x2c]
jl 0x1002c6bb
jne 0x1002c580
cmp ecx, dword [esp]
jge 0x1002c580
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp], ecx
mov dword [esp + 0x2c], ebp
jmp 0x1002c580
cmp dword [esp + 8], 0
je 0x1002c770
mov ecx, dword [esp + 0x44]
add ecx, dword [esp + 0xc]
mov eax, dword [esp + 4]
cmp ecx, dword [eax + 4]
jg 0x1002c770
mov esi, ecx
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x1002c770
mov ebx, dword [esp]
mov eax, ebx
mov word [ecx], bx
mov word [ecx + 2], si
mov edx, dword [ecx + 4]
mov esi, dword [esp + 4]
mov dword [esi + 0x1c], edx
mov edi, dword [esp + 8]
mov edx, dword [edi]
movzx esi, word [edx]
cmp ebx, esi
jle 0x1002c72a
mov esi, dword [edx + 4]
add edx, 4
mov edi, edx
mov edx, esi
mov dword [edi], ecx
mov ebx, dword [edx + 4]
mov esi, dword [esp]
add esi, dword [esp + 0x50]
mov dword [esp], esi
test ebx, ebx
je 0x1002c78d
lea edi, [edx + 4]
mov esi, ebx
movzx ebx, word [ebx]
cmp dword [esp], ebx
jl 0x1002c78d
mov ebp, dword [esp + 4]
mov ebx, dword [ebp + 0x1c]
mov dword [edi], ebx
mov dword [ebp + 0x1c], edx
lea edi, [esi + 4]
mov ebx, dword [esi + 4]
mov edx, esi
test ebx, ebx
jne 0x1002c740
jmp 0x1002c78f
mov esi, dword [esp + 0x24]
mov dword [esi + ebx + 8], 0xffffffff
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 4]
mov edx, dword [esp + 0x4c]
jmp 0x1002c2e8
mov esi, edx
mov dword [ecx + 4], esi
movzx ecx, word [esi]
mov edx, dword [esp]
cmp edx, ecx
jle 0x1002c79f
mov word [esi], dx
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov word [esi + ecx + 8], ax
mov eax, dword [esp + 0xc]
mov word [esi + ecx + 0xa], ax
jmp 0x1002c77c
push 0x1002f4d0
push 0x10
push ecx
push esi
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
mov eax, dword [esp + 0x80]
add esp, 0x10
push 0x1002f510
push 0x10
push eax
push esi
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
add esp, 0x6c
jmp 0x1002c836
push 0x1002f510
push 0x10
push eax
push esi
mov esi, eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
mov ecx, dword [esp + 0x34]
add esp, 0x10
test esi, esi
jle 0x1002c833
add ecx, 0xc
jmp 0x1002c828
cmp word [ecx - 2], 0xffff
sete al
xor al, 1
movzx eax, al
mov dword [ecx], eax
add ecx, 0x10
dec dword [esp + 0x58]
je 0x1002c833
cmp word [ecx - 4], 0xffff
je 0x1002c810
xor eax, eax
jmp 0x1002c818
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret