Function at 0x51deac
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 0x51e119
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 0x51e10b
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 0x51e0f4
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.00436351
test eax, eax
jne 0x51e0c9
mov ebp, dword [edi + 0x18]
xor ecx, ecx
mov eax, dword [esi + 0xc]
cmp ebp, dword [esi + 8]
jne 0x51df7c
cmp ecx, eax
jne 0x51df7e
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.0051f32e
cmp dword [eax], esi
jne 0x51e0c4
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x3c]
jmp 0x51e0bc
cmp ecx, eax
jb 0x51e02c
ja 0x51df8f
cmp ebp, dword [esi + 8]
jbe 0x51e02c
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.0051f32e
cmp dword [eax], esi
jne 0x51e002
lea eax, [esp + 0x60]
mov ecx, ebp
push eax
lea eax, [esp + 0x44]
push eax
call fcn.0051d23e
mov esi, dword [ebp]
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x30]
mov ecx, ebp
push eax
call fcn.0051f32e
cmp dword [eax], esi
jne 0x51e0c4
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x4c]
jmp 0x51e0bc
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.0051f32e
cmp dword [eax], esi
jne 0x51e09b
lea eax, [esp + 0x74]
mov ecx, ebp
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0051d23e
mov esi, dword [ebp]
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x38]
mov ecx, ebp
push eax
call fcn.0051f32e
cmp dword [eax], esi
jne 0x51e0c4
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x5c]
push eax
mov ecx, ebp
call fcn.0051d23e
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 0x51df08
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 0x51ded8
add edi, 0x20
cmp edi, dword [ebx + 0x28]
jne 0x51dec8
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x78
ret