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

Disassembly:
sub esp, 0x78
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebx + 0x24]
cmp edi, dword [ebx + 0x28]
je 0x51091c
push ebp
push esi
xor edx, edx
mov esi, 0x9c
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x1c], eax
cmp eax, dword [ebx + 0x1c]
je 0x51090e
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
mov ecx, dword [eax + 0xd8]
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 8]
sub eax, dword [ecx + 4]
cdq
idiv esi
test eax, eax
je 0x5108f7
xor eax, eax
mov ebp, 0x9c
mov dword [esp + 0x14], eax
mov esi, dword [ecx + 4]
mov ecx, edi
add esi, eax
lea eax, [esi + 0x34]
push eax
call fcn.00434271
test eax, eax
jne 0x5108cc
mov ebp, dword [edi + 0x18]
xor ecx, ecx
mov eax, dword [esi + 0xc]
cmp ebp, dword [esi + 8]
jne 0x51077f
cmp ecx, eax
jne 0x510781
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x68], eax
mov eax, dword [esi]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x68], ebp
lea eax, [esp + 0x28]
lea ebp, [ebx + 0x44]
mov byte [esp + 0x74], 2
mov esi, dword [ebp]
mov ecx, ebp
push eax
call fcn.00511b31
cmp dword [eax], esi
jne 0x5108c7
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x3c]
jmp 0x5108bf
cmp ecx, eax
jb 0x51082f
ja 0x510792
cmp ebp, dword [esi + 8]
jbe 0x51082f
mov ecx, dword [esi + 8]
mov eax, dword [esp + 0x10]
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x68], eax
mov eax, dword [esi]
mov dword [esp + 0x60], edx
sub edx, ecx
mov dword [esp + 0x6c], eax
add edx, ebp
mov dword [esp + 0x80], eax
lea ebp, [ebx + 0x44]
mov esi, dword [ebp]
lea eax, [esp + 0x60]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x10]
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x80], ecx
push eax
mov ecx, ebp
mov byte [esp + 0x78], 0
mov dword [esp + 0x7c], edx
mov byte [esp + 0x8c], 1
call fcn.00511b31
cmp dword [eax], esi
jne 0x510805
lea eax, [esp + 0x60]
mov ecx, ebp
push eax
lea eax, [esp + 0x44]
push eax
call fcn.0050f923
mov esi, dword [ebp]
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x30]
mov ecx, ebp
push eax
call fcn.00511b31
cmp dword [eax], esi
jne 0x5108c7
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x4c]
jmp 0x5108bf
mov eax, dword [edi + 0x1c]
mov ecx, dword [esi]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x74], eax
mov dword [esp + 0x60], eax
mov eax, dword [esi + 8]
sub eax, ebp
mov dword [esp + 0x78], ebp
add eax, ecx
mov dword [esp + 0x64], ebp
mov dword [esp + 0x6c], eax
lea ebp, [ebx + 0x44]
mov esi, dword [ebp]
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x34]
mov dword [esp + 0x84], ecx
push eax
mov ecx, ebp
mov dword [esp + 0x84], edx
mov byte [esp + 0x8c], 0
mov dword [esp + 0x70], edx
mov byte [esp + 0x78], 1
call fcn.00511b31
cmp dword [eax], esi
jne 0x51089e
lea eax, [esp + 0x74]
mov ecx, ebp
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0050f923
mov esi, dword [ebp]
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x38]
mov ecx, ebp
push eax
call fcn.00511b31
cmp dword [eax], esi
jne 0x5108c7
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x5c]
push eax
mov ecx, ebp
call fcn.0050f923
mov ebp, 0x9c
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
add dword [esp + 0x14], ebp
inc esi
mov dword [esp + 0x18], esi
mov eax, dword [ecx + 8]
sub eax, dword [ecx + 4]
cdq
idiv ebp
cmp esi, eax
mov eax, dword [esp + 0x14]
jb 0x51070b
mov esi, 0x9c
mov eax, dword [esp + 0x1c]
add eax, 4
push 0
mov dword [esp + 0x20], eax
pop edx
cmp eax, dword [ebx + 0x1c]
jne 0x5106db
add edi, 0x20
cmp edi, dword [ebx + 0x28]
jne 0x5106cb
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x78
ret