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

Disassembly:
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x64]
movzx eax, word [edi + 0x14]
xor ebp, ebp
mov esi, ecx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
cmp ax, 2
jb 0x662089d1
mov ecx, 0x10b
cmp word [edi + 0x18], cx
jne 0x662089d1
mov ecx, dword [edi + 0x74]
jmp 0x662089d7
mov ecx, dword [edi + 0x84]
cmp ecx, ebp
jbe 0x66208b08
cmp ax, 2
jb 0x662089f3
mov edx, 0x10b
lea eax, [edi + 0x78]
cmp word [edi + 0x18], dx
je 0x662089f9
lea eax, [edi + 0x88]
cmp eax, ebp
je 0x66208b08
mov ecx, dword [eax]
cmp ecx, ebp
je 0x66208b08
mov ebx, dword [eax + 4]
lea eax, [esp + 0x20]
push eax
push ecx
push edi
mov ecx, esi
mov dword [esp + 0x24], ebx
call fcn.662081a0
cmp eax, ebp
jl 0x66208c0c
mov edx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x28]
push 0x28
lea ecx, [esp + 0x40]
push ecx
push ebp
push edx
mov ecx, esi
call fcn.662073e0
test eax, eax
jl 0x66208c0c
mov eax, dword [esp + 0x68]
mov ecx, eax
sub ecx, dword [esp + 0x48]
movzx edx, cx
mov dword [esp + 0x10], edx
cmp eax, 0xffff
jbe 0x66208b66
mov ecx, dword [esp + 0x58]
lea eax, [esp + 0x28]
push eax
push ecx
push edi
mov ecx, esi
call fcn.662081a0
test eax, eax
jl 0x66208c0c
xor ebx, ebx
cmp dword [esp + 0x50], ebx
jbe 0x66208b08
xor ebp, ebp
lea ecx, [ecx]
push 0
xor ecx, ecx
mov eax, ebp
add eax, dword [esp + 0x2c]
push 4
adc ecx, dword [esp + 0x34]
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
mov ecx, esi
call fcn.662073e0
test eax, eax
jl 0x66208c0c
mov eax, dword [esp + 0x14]
test eax, eax
je 0x66208afe
lea edx, [esp + 0x30]
push edx
push eax
push edi
mov ecx, esi
call fcn.662081a0
test eax, eax
jl 0x66208c0c
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x64]
push eax
mov eax, dword [esp + 0x34]
push ecx
push edx
push eax
mov ecx, esi
call fcn.662076c0
test eax, eax
jl 0x66208c0c
cmp byte [esp + 0x64], 0
jne 0x66208b17
inc ebx
add ebp, 4
cmp ebx, dword [esp + 0x50]
jb 0x66208a90
pop edi
pop esi
pop ebp
mov eax, 0xc000007a
pop ebx
add esp, 0x50
ret 0x10
cmp ebx, dword [esp + 0x50]
jae 0x66208b08
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x30]
push ecx
push edx
push edi
mov ecx, esi
call fcn.662081a0
test eax, eax
jl 0x66208c0c
push 0
xor edx, edx
lea ecx, [ebx + ebx]
add ecx, dword [esp + 0x34]
push 2
adc edx, dword [esp + 0x3c]
lea eax, [esp + 0x18]
push eax
push edx
push ecx
mov ecx, esi
call fcn.662073e0
test eax, eax
jl 0x66208c0c
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x24]
movzx eax, word [esp + 0x10]
cmp eax, dword [esp + 0x4c]
jae 0x66208b08
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x30]
push ecx
push edx
push edi
mov ecx, esi
call fcn.662081a0
test eax, eax
jl 0x66208c0c
movzx eax, word [esp + 0x10]
add eax, eax
add eax, eax
cdq
add eax, dword [esp + 0x30]
push 0
adc edx, dword [esp + 0x38]
push 4
lea ecx, [esp + 0x24]
push ecx
push edx
push eax
mov ecx, esi
call fcn.662073e0
test eax, eax
jl 0x66208c0c
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x30]
push edx
push eax
push edi
mov ecx, esi
call fcn.662081a0
test eax, eax
jl 0x66208c0c
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
cmp edx, ebp
jb 0x66208bf5
ja 0x66208bdd
cmp esi, dword [esp + 0x20]
jb 0x66208bf5
xor eax, eax
add ebx, dword [esp + 0x20]
adc eax, ebp
mov ecx, ebx
cmp edx, eax
ja 0x66208bf5
jb 0x66208bf1
cmp esi, ecx
jae 0x66208bf5
mov al, 1
jmp 0x66208bf7
xor al, al
mov ecx, dword [esp + 0x70]
test ecx, ecx
je 0x66208c16
mov byte [ecx], al
mov eax, dword [esp + 0x6c]
mov dword [eax], esi
mov dword [eax + 4], edx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0x10
test al, al
je 0x66208c01
pop edi
pop esi
pop ebp
mov eax, 0xc000000d
pop ebx
add esp, 0x50
ret 0x10