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

Disassembly:
mov edx, dword [esp + 0xc]
sub esp, 0x5c
cmp dword [edx + 0x40], 0
push ebx
push ebp
push esi
push edi
je 0x6869c2
cmp dword [edx], 0xffffffff
je 0x6869c2
mov eax, dword [edx + 4]
test eax, eax
jle 0x6869c2
mov ebp, dword [edx + 8]
test ebp, ebp
jle 0x6869c2
mov edi, dword [esp + 0x7c]
cmp dword [edi + 0x40], 0
je 0x6869c2
cmp dword [edi], 0xffffffff
je 0x6869c2
mov ecx, dword [edi + 4]
test ecx, ecx
jle 0x6869c2
mov ebx, dword [edi + 8]
test ebx, ebx
jle 0x6869c2
add eax, 0xffffffff
add ecx, 0xffffffff
add ebp, 0xffffffff
add ebx, 0xffffffff
test eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x20], ebx
je 0x6869c2
test ecx, ecx
je 0x6869c2
test ebp, ebp
je 0x6869c2
test ebx, ebx
je 0x6869c2
mov eax, edx
call fcn.0066ce20
test al, al
je 0x6869c2
mov eax, edx
lea esi, [esp + 0x48]
call fcn.004d3990
mov eax, edi
call fcn.0066ce20
test al, al
je 0x6869c2
mov eax, edi
push 0
lea edi, [esp + 0x3c]
call fcn.004d3900
mov ecx, edi
call fcn.004d3a40
test al, al
je 0x6869c2
mov ecx, esi
call fcn.004d3a40
test al, al
je 0x6869c2
cmp ebp, ebx
jl 0x6867df
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x50]
mov ecx, dword [esp + 0x70]
lea esi, [eax + eax]
sub eax, ebp
add eax, eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x1c]
push edi
push ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x30], esi
xor ebx, ebx
sub esi, ebp
call fcn.0068d200
test ebp, ebp
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x20], ebx
jle 0x686798
lea esp, [esp]
test esi, esi
jge 0x6866d2
add esi, dword [esp + 0x24]
add ebx, 1
add edi, ebp
jmp 0x686783
mov eax, dword [esp + 0x40]
add eax, dword [esp + 0x44]
mov edx, dword [esp + 0x70]
add esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
push eax
add edi, ebp
push edi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x20]
push edx
mov dword [esp + 0x3c], esi
call fcn.0068d200
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x58]
mov dword [esp + 0x58], eax
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], ebp
call fcn.004d3a40
test al, al
je 0x6869c2
lea edx, [ebx + 1]
imul edx, ebp
mov al, bl
add al, 1
mov esi, edi
sub esi, edx
mov edx, dword [esp + 0x70]
movzx ecx, al
mov eax, dword [edx]
mov al, byte [ecx + eax]
mov dword [esp + 0x2c], esi
add esi, ebp
test ebx, ebx
mov byte [esp + 0x7c], al
mov byte [esp + 0x1c], al
jle 0x68677d
mov ecx, dword [esp + 0x78]
mov edx, dword [ecx + 4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
push edx
push eax
push ecx
mov eax, edi
mov ecx, esi
call fcn.0068d2f0
mov dl, byte [esp + 0x7c]
add byte [esp + 0x1c], dl
sub ebx, 1
add esi, ebp
test ebx, ebx
jg 0x686751
mov esi, dword [esp + 0x30]
xor ebx, ebx
mov eax, dword [esp + 0x20]
add eax, 1
cmp eax, dword [esp + 0x34]
mov dword [esp + 0x20], eax
jl 0x6866c0
test esi, esi
jge 0x686a38
lea eax, [ebx - 1]
imul eax, ebp
sub edi, eax
test ebx, ebx
jle 0x686a38
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
push edi
push edx
call fcn.0068d200
add edi, ebp
sub ebx, 1
jne 0x6867b0
mov eax, dword [esp + 0x74]
mov dword [eax], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0x10
lea edi, [ebp + ebp]
sub ebp, ebx
add ebp, ebp
mov dword [esp + 0x34], edi
sub edi, ebx
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x50]
mov eax, ebx
lea esi, [esp + 0x58]
mov byte [esp + 0x13], 0
mov dword [esp + 0x28], ebp
call fcn.004d3990
mov ecx, esi
call fcn.004d3a40
test al, al
je 0x6869c2
mov ebx, dword [ebx + 8]
mov esi, dword [esp + 0x40]
sub ebx, 1
imul ebx, dword [esp + 0x64]
add ebx, dword [esp + 0x60]
cmp dword [esp + 0x20], 0
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], 0
jle 0x68692e
test edi, edi
jge 0x68685c
add edi, dword [esp + 0x34]
add byte [esp + 0x13], 1
add esi, dword [esp + 0x44]
jmp 0x686915
add edi, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
add ebp, dword [esp + 0x54]
add esi, edx
cmp byte [esp + 0x13], 0
mov dword [esp + 0x2c], edi
jbe 0x686901
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x58]
mov dword [esp + 0x58], eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], edx
call fcn.004d3a40
test al, al
je 0x6869be
mov edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, edx
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push edx
push edi
call fcn.0068d200
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push esi
push ebx
push edi
call fcn.0068d200
movzx edx, byte [esp + 0x13]
mov eax, dword [esp + 0x78]
mov ecx, dword [eax + 4]
add dl, 1
push ecx
mov ecx, dword [edi]
movzx eax, dl
movzx edx, byte [eax + ecx]
mov eax, dword [esp + 0x20]
push edx
push eax
mov eax, ebx
mov ecx, ebp
call fcn.0068d2f0
mov edi, dword [esp + 0x2c]
mov byte [esp + 0x13], 0
jmp 0x686915
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x18]
push esi
push ebp
push ecx
mov ecx, dword [esp + 0x20]
call fcn.0068d200
mov eax, dword [esp + 0x24]
add eax, 1
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x24], eax
jl 0x686846
mov dword [esp + 0x40], esi
test edi, edi
jge 0x6869ea
cmp byte [esp + 0x13], 0
jbe 0x6869d6
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x58]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], edx
call fcn.004d3a40
test al, al
je 0x6869c2
mov edi, dword [esp + 0x70]
mov eax, dword [esp + 0x18]
mov ecx, esi
sub ecx, edx
mov edx, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push edi
call fcn.0068d200
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push esi
push ebx
push edi
call fcn.0068d200
mov eax, dword [esp + 0x78]
mov ecx, dword [eax + 4]
mov al, byte [esp + 0x13]
add al, 1
movzx edx, al
mov eax, dword [edi]
push ecx
movzx ecx, byte [edx + eax]
mov edx, dword [esp + 0x20]
push ecx
push edx
mov eax, ebx
mov ecx, ebp
call fcn.0068d2f0
jmp 0x6869ea
mov dword [esp + 0x40], esi
mov eax, dword [esp + 0x74]
mov dword [eax], 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0x10
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x14]
push esi
push ebp
push eax
mov eax, dword [esp + 0x24]
call fcn.0068d200
mov ebp, dword [esp + 0x7c]
push 0
mov eax, ebp
lea edi, [esp + 0x3c]
call fcn.004d3900
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x70]
mov edi, dword [esp + 0x18]
push esi
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov eax, edi
call fcn.0068d200
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x70]
sub eax, 1
imul eax, dword [esp + 0x44]
add eax, esi
push eax
push ebx
push ecx
mov ecx, dword [esp + 0x20]
mov eax, edi
call fcn.0068d200
mov eax, dword [esp + 0x74]
pop edi
pop esi
pop ebp
mov dword [eax], 0
pop ebx
add esp, 0x5c
ret 0x10