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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
movaps xmm0, xmmword [0x4b4c30]
push ebx
push esi
mov esi, dword [ebp + 8]
movups xmmword [esp + 0x3c], xmm0
mov dword [esp + 0x18], ecx
movaps xmm0, xmmword [0x4b4c30]
mov eax, dword [esi]
mov ecx, dword [ebp + 0xc]
movups xmmword [esp + 0x64], xmm0
push edi
movaps xmm0, xmmword [0x4b4c30]
shr ecx, 1
mov dword [esp + 0x18], edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x28], eax
movups xmmword [esp + 0x2c], xmm0
call fcn.00403d60
mov ebx, eax
xor edx, edx
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], ebx
lea ecx, [ebx + ebx]
div ecx
inc eax
mov dword [esp + 0x24], eax
add eax, 8
lea ebx, [eax + ebx*2]
mov eax, dword [esi + 8]
add ebx, dword [ebp + 0xc]
cmp eax, 0xffffffff
jg 0x407c08
mov edx, esi
lea ecx, [esp + 0x3c]
call fcn.00401e7e
xor esi, esi
mov edi, esi
mov dword [esp + 0x14], esi
jmp 0x407cdc
xor esi, esi
lea edi, [eax + ebx]
mov dword [esp + 0x14], esi
jmp 0x407c54
mov ecx, dword [esp + 0x44]
cmp ecx, 0x80000000
je 0x407c32
add ecx, dword [esp + 0x20]
lea eax, [ebx - 1]
cmp ecx, eax
jge 0x407cd5
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x14]
neg ecx
inc eax
imul eax, eax, 3
cdq
sub eax, edx
sar eax, 1
cmp ecx, eax
cmovle ecx, eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x14], ecx
mov edi, dword [eax + 8]
add edi, ecx
add edi, ebx
push 6
mov edx, edi
mov dword [esp + 0x24], edi
lea ecx, [esp + 0x68]
call fcn.00406c2c
pop ecx
push 1
push 0x3fffffff
or edx, 0xffffffff
lea ecx, [esp + 0x6c]
call fcn.004037f4
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x44]
push esi
push esi
mov dword [esp + 0x60], eax
lea ecx, [esp + 0x60]
push edi
lea eax, [esp + 0x78]
mov dword [esp + 0x68], esi
push eax
push dword [ebp + 8]
mov dword [esp + 0x74], 0x80000000
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], esi
call fcn.00403ab8
add esp, 0x1c
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc]
push 1
call fcn.00404a1a
pop ecx
lea ecx, [esp + 0x50]
call fcn.00401c92
mov edi, dword [esp + 0xc]
test edi, edi
jne 0x407c13
and edi, 3
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x40]
push esi
mov dword [esp + 0x24], eax
lea eax, [esp + 0x40]
push ebx
push eax
mov edx, eax
mov ecx, eax
call fcn.0040363f
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x48]
add esp, 0xc
neg edx
add edx, edx
push 1
push 0x3fffffff
call fcn.004037f4
push esi
push 1
lea ecx, [esp + 0x38]
call fcn.00401d22
add esp, 0x10
cmp dword [esp + 0x24], 1
jl 0x407dc2
mov edi, dword [esp + 0x24]
lea eax, [edi + edi]
mov dword [esp + 0xc], eax
dec eax
lea ecx, [esp + 0x64]
cdq
push edx
push eax
call fcn.00401d22
mov eax, dword [esp + 0x14]
push 1
cdq
push 0x3fffffff
push edx
lea edx, [esp + 0x78]
push eax
mov ecx, edx
call fcn.004043cb
push 0x4038fb
push esi
lea eax, [esp + 0x84]
push ebx
push eax
lea edx, [esp + 0x64]
mov ecx, eax
call fcn.00404315
push esi
lea eax, [esp + 0x90]
lea edx, [esp + 0x54]
push ebx
push eax
mov ecx, edx
call fcn.0040363f
xor dword [esp + 0x60], 1
add esp, 0x34
cmp edi, 1
je 0x407da9
push esi
push ebx
lea edx, [esp + 0x30]
push esi
push 1
mov ecx, edx
call fcn.00404481
add esp, 0x10
mov eax, dword [esp + 0xc]
dec edi
sub eax, 2
mov dword [esp + 0xc], eax
cmp edi, 1
jge 0x407d34
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x64]
call fcn.00401c92
cmp dword [esp + 0x10], 0
jle 0x407e34
mov edi, dword [esp + 0x10]
push esi
lea eax, [esp + 0x2c]
push ebx
push eax
mov edx, eax
lea ecx, [esp + 0x48]
call fcn.0040363f
add esp, 0xc
lea ecx, [esp + 0x28]
xor edx, edx
inc edx
push 1
push 0x3fffffff
call fcn.004037f4
push 0x402b42
push esi
lea eax, [esp + 0x4c]
lea edx, [esp + 0x38]
push ebx
push eax
mov ecx, edx
call fcn.00404315
xor edx, edx
lea ecx, [esp + 0x40]
push 1
push 0x3fffffff
inc edx
call fcn.004037f4
add esp, 0x20
sub edi, 1
jne 0x407dd6
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x3c]
call fcn.00401c92
mov ecx, dword [esp + 0x18]
mov eax, edi
test ecx, ecx
je 0x407e8b
and eax, 1
lea edx, [esp + 0x28]
mov dword [esp + 0x24], eax
jne 0x407e6a
push esi
push ebx
push esi
push 1
call fcn.00404481
mov edx, dword [esp + 0x28]
add esp, 0x10
mov ecx, dword [edx + 4]
jmp 0x407e7c
push ebx
call fcn.00407af9
mov edx, dword [esp + 0x1c]
pop ecx
mov ecx, dword [esp + 0x20]
xor ecx, 1
mov eax, edi
shr eax, 1
xor eax, ecx
mov dword [edx + 4], eax
mov eax, dword [esp + 0x24]
jmp 0x407e8e
and eax, 1
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x407eca
lea edx, [esp + 0x28]
test eax, eax
jne 0x407eaf
push ebx
call fcn.00407af9
mov eax, dword [esp + 0x24]
pop ecx
mov ecx, dword [esp + 0x1c]
jmp 0x407ec3
push esi
push ebx
push esi
push 1
call fcn.00404481
mov ecx, dword [esp + 0x2c]
add esp, 0x10
mov eax, dword [ecx + 4]
shr edi, 1
xor edi, eax
mov dword [ecx + 4], edi
lea ecx, [esp + 0x28]
call fcn.00401c92
push 0x10
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret