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

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x5c
mov eax, dword [esp + 0x78]
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
mov dword [esp + 0x2c], eax
mov byte [esp + 0x23], al
mov eax, dword [esi]
mov dword [esp + 0x30], eax
mov edx, dword [eax]
test edx, edx
je 0x665395c0
cmp edx, 0xffffffff
jne 0x66539500
lea eax, [esp + 0x34]
mov ecx, ebx
mov dword [esp], eax
mov eax, dword [0x66a1fa64]
mov dword [esp + 0x1c], eax
call eax
sub esp, 4
mov eax, dword [esp + 0x34]
test eax, eax
jle 0x6653946b
movzx eax, byte [esp + 0x2c]
xor esi, esi
lea ebp, [esp + 0x30]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x38]
mov dword [esp + 0x14], eax
mov eax, dword [0x66a20904]
mov dword [esp + 0x18], eax
jmp 0x665393f7
mov eax, dword [esp + 0x38]
imul eax, eax, 0x34
mov dword [esp + 4], ebp
mov dword [esp], ebx
lea ecx, [edi + eax + 0x38]
mov eax, dword [esp + 0x24]
mov dword [esp + 8], eax
call fcn.665388f0
sub esp, 0xc
test al, al
je 0x665395a0
add esi, 1
cmp dword [esp + 0x34], esi
jle 0x66539480
mov eax, dword [esp + 0x14]
mov ecx, ebx
mov dword [esp], eax
mov eax, dword [esp + 0x1c]
call eax
sub esp, 4
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x44], 0xffffffff
mov dword [esp], ebx
call eax
cmp byte [esp + 0x23], 0
jne 0x665393c0
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
sub eax, 1
mov ecx, eax
lea eax, [edx - 1]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x38]
imul edx, eax, 0x34
add edx, edi
mov dword [edx + 0x50], ecx
mov ecx, dword [esp + 0x28]
mov dword [edx + 0x48], 0
mov dword [edx + 0x4c], 0
mov dword [edx + 0x54], ecx
jmp 0x665393c4
lea eax, [esp + 0x38]
mov dword [esp + 0x14], eax
mov eax, dword [0x66a20904]
mov dword [esp + 0x18], eax
lea esi, [esi]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], 0xffffffff
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp], ebx
call eax
mov eax, dword [esp + 0x38]
mov dword [edi + 0x28], 0
mov ecx, ebx
mov dword [edi + 0x2c], 0
mov esi, dword [0x66a202f8]
lea edx, [eax - 1]
mov eax, dword [esp + 0x3c]
mov dword [edi + 0x30], edx
sub eax, 1
mov dword [edi + 0x34], eax
call esi
test eax, eax
je 0x66539510
xor eax, eax
mov edx, dword [esp + 0x30]
mov ecx, dword [edx]
test ecx, ecx
je 0x6653957d
cmp ecx, 0xffffffff
je 0x665394f4
lock sub dword [edx], 1
mov edx, dword [esp + 0x30]
je 0x6653957d
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
lock add dword [eax], 1
jmp 0x66539376
mov dword [esp + 0x14], esi
mov esi, ebx
mov ebx, dword [esp + 0x1c]
lea ebp, [esp + 0x40]
mov dword [esp], ebp
mov ecx, esi
add ebp, 4
call ebx
sub esp, 4
lea eax, [esp + 0x50]
cmp eax, ebp
jne 0x6653951e
mov ebx, esi
mov esi, dword [esp + 0x14]
mov ecx, ebx
call esi
test eax, eax
jne 0x6653955c
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [edi], eax
mov eax, dword [esp + 0x48]
mov dword [edi + 4], edx
mov edx, dword [esp + 0x4c]
mov dword [edi + 8], eax
mov dword [edi + 0xc], edx
cmp byte [esp + 0x2c], 0
jne 0x6653956a
mov byte [edi + 0x10c], 0
mov edx, dword [esp + 0x30]
mov eax, 1
mov ecx, dword [edx]
test ecx, ecx
jne 0x665394e1
mov byte [esp + 0x14], al
mov dword [esp], edx
call dword [0x66a20228]
movzx eax, byte [esp + 0x14]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov byte [esp + 0x14], al
mov ecx, ebx
mov dword [esp], 2
call dword [0x66a1fa3c]
sub esp, 4
movzx eax, byte [esp + 0x14]
jmp 0x665394d3
mov eax, dword [eax + 4]
lea ebp, [esp + 0x30]
mov ecx, ebp
mov dword [esp], eax
call dword [0x66a20218]
mov eax, dword [esi]
sub esp, 4
mov edx, dword [eax + 8]
lea esi, [eax + edx*4 + 0x10]
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 8]
shl eax, 2
lea ecx, [edx + eax + 0x10]
cmp esi, ecx
je 0x66539376
mov edx, dword [edx + 0xc]
shl edx, 2
sub edx, eax
test edx, edx
jle 0x66539376
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], ecx
call fcn.6678ef40
jmp 0x66539376