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

Disassembly:
sub esp, 0x88
push ebp
mov ebp, dword [esp + 0x90]
test ebp, ebp
jne 0x4b772d
lea eax, [ebp + 0x14]
pop ebp
add esp, 0x88
ret
mov eax, dword [esp + 0x94]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x98]
cdq
sar ecx, 1
sub eax, edx
sar eax, 1
mov dword [esp + 0x48], ecx
mov dword [esp + 0x94], ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x98], eax
test ecx, ecx
jne 0x4b7769
test eax, eax
je 0x4b7b6b
push ebp
call fcn.004b7c30
add esp, 4
mov dword [esp + 0x64], eax
cmp eax, 2
jne 0x4b7793
cmp word [ebp], 0
je 0x4b7b6b
mov eax, 6
pop ebp
add esp, 0x88
ret
mov eax, dword [ebp + 4]
xor ecx, ecx
mov dword [esp + 0x44], eax
or edx, 0xffffffff
xor eax, eax
mov dword [esp + 0x58], ecx
cmp ax, word [ebp]
jge 0x4b7b6b
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
lea ebx, [edx + 1]
xor ebp, ebp
mov dword [esp + 0x94], edx
mov dword [esp + 0x90], edx
or edi, 0xffffffff
mov dword [esp + 0x48], 0
movsx edx, word [eax + ecx*2]
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x60], edx
mov dword [esp + 0x5c], ebp
mov esi, edx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], edi
cmp ebx, edx
je 0x4b7b4c
nop dword [eax]
cmp esi, edi
je 0x4b7b4c
cmp ebx, edi
je 0x4b786b
mov ecx, dword [esp + 0x50]
mov eax, dword [ecx + ebx*8]
sub eax, dword [ecx + esi*8]
mov dword [esp + 0x18], eax
mov eax, dword [ecx + ebx*8 + 4]
sub eax, dword [ecx + esi*8 + 4]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
call fcn.004b9b20
mov ecx, dword [esp + 0x18]
mov edx, eax
add esp, 4
mov dword [esp + 0x2c], edx
test edx, edx
je 0x4b7b31
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
jmp 0x4b788f
mov edx, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov dword [esp + 0x28], edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x24], edi
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x30]
mov dword [esp + 0x2c], edx
test ebp, ebp
je 0x4b7b09
test edi, edi
jns 0x4b78ab
mov dword [esp + 0x30], esi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ebp
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x18]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x68], eax
mov edi, dword [esp + 0x68]
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x1c]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x6c]
add eax, edi
cmp eax, 0xffff1000
jle 0x4b7acf
mov edx, dword [esp + 0x24]
add eax, 0x10000
add edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
add ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x70]
mov dword [esp + 0x20], eax
mov dword [esp + 0x4c], eax
mov eax, edx
neg eax
test edi, edi
cmovne edx, eax
mov eax, ecx
neg eax
mov dword [esp + 0x8c], edx
test edi, edi
cmovne eax, ecx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x74], eax
mov ebp, dword [esp + 0x74]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x38]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x78], eax
sub ebp, dword [esp + 0x78]
mov dword [esp + 0x14], ebp
test edi, edi
jne 0x4b79ac
neg ebp
mov dword [esp + 0x14], ebp
mov edx, dword [esp + 0x2c]
mov eax, edx
cmp dword [esp + 0x5c], edx
cmovl eax, dword [esp + 0x5c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x7c], eax
mov edi, dword [esp + 0x7c]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x4c]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x80], eax
cmp edi, dword [esp + 0x80]
jg 0x4b7a28
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x20]
jmp 0x4b7a2e
mov eax, dword [esp + 0x10]
mov ecx, ebp
push ecx
push eax
push dword [esp + 0x3c]
call fcn.004b6e10
add esp, 0xc
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xa4]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x84], eax
mov edi, dword [esp + 0x84]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x4c]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x88], eax
cmp edi, dword [esp + 0x88]
jg 0x4b7aab
mov eax, dword [esp + 0x58]
jmp 0x4b7ab3
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], ebp
push dword [esp + 0x20]
push eax
push dword [esp + 0x94]
call fcn.004b6e10
mov edx, dword [esp + 0x40]
add esp, 0xc
mov ecx, eax
jmp 0x4b7ad3
xor ecx, ecx
xor edx, edx
cmp esi, ebx
je 0x4b7b0b
mov edi, dword [esp + 0x60]
mov ebp, dword [esp + 0x50]
nop
mov eax, dword [ebp + esi*8]
add eax, edx
add eax, dword [esp + 0x54]
mov dword [ebp + esi*8], eax
mov eax, dword [esp + 0x58]
add eax, ecx
add dword [ebp + esi*8 + 4], eax
cmp esi, edi
cmovge esi, dword [esp + 0x90]
inc esi
cmp esi, ebx
jne 0x4b7ae0
jmp 0x4b7b0b
mov esi, ebx
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x5c], ebp
jmp 0x4b7b35
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x60]
cmp ebx, edx
cmovge ebx, dword [esp + 0x94]
inc ebx
cmp ebx, esi
jne 0x4b7810
mov ebp, dword [esp + 0x9c]
mov ecx, dword [esp + 0x64]
inc ecx
mov dword [esp + 0x64], ecx
movsx eax, word [ebp]
cmp ecx, eax
jl 0x4b77b2
pop edi
pop esi
pop ebx
xor eax, eax
pop ebp
add esp, 0x88
ret