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

Disassembly:
sub esp, 0x54
mov eax, dword [esp + 0x88]
push ebx
push ebp
mov ebp, dword [esp + 0x80]
push esi
push edi
or edi, 0xffffffff
mov dword [esp + 0x10], 0
test eax, eax
mov ecx, 1
jge 0x41782e
neg eax
mov dword [esp + 0x98], edi
lea edx, [eax - 1]
imul edx, ebp
mov dword [esp + 0x10], edx
jmp 0x417835
mov dword [esp + 0x98], ecx
mov esi, dword [esp + 0x9c]
test esi, esi
jge 0x417860
neg esi
mov dword [esp + 0x9c], edi
mov edi, dword [esp + 0x10]
lea edx, [esi - 1]
imul edx, dword [esp + 0x8c]
add edi, edx
mov dword [esp + 0x10], edi
jmp 0x417867
mov dword [esp + 0x9c], ecx
mov edx, dword [esp + 0x7c]
test edx, edx
jge 0x417873
mov dword [esp + 0x7c], eax
mov ebx, dword [esp + 0x80]
test ebx, ebx
jge 0x417887
mov ebx, esi
mov dword [esp + 0x80], ebx
shl eax, 0x10
cdq
idiv dword [esp + 0x7c]
mov edi, eax
mov eax, esi
shl eax, 0x10
cdq
idiv ebx
test edi, 0xffff0000
mov dword [esp + 0x14], eax
je 0x4178ac
mov esi, edi
sar esi, 0x10
jmp 0x4178ae
mov esi, ecx
test eax, 0xffff0000
je 0x4178ba
mov ecx, eax
sar ecx, 0x10
mov ebx, ecx
mov eax, 0x10000
imul ebx, esi
cdq
idiv ebx
mov edx, dword [esp + 0x98]
imul edi, edx
imul ecx, edx
mov dword [esp + 0x5c], edi
mov edi, dword [esp + 0x9c]
imul esi, edi
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x14]
imul eax, edi
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x90]
mov edi, dword [esp + 0x74]
mov ebx, eax
mov dword [esp + 0x28], ecx
mov eax, 1
mov ecx, esi
mov edx, 1
shl eax, cl
mov ecx, edi
mov dword [esp + 0x14], ebx
shl edx, cl
mov ecx, dword [esp + 0x78]
dec eax
mov dword [esp + 0x44], eax
mov eax, 0x18
sub eax, edi
dec edx
mov dword [esp + 0x58], eax
mov eax, 8
shl edx, cl
sub eax, esi
xor ecx, ecx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x80]
cmp eax, ecx
mov dword [esp + 0x18], ecx
not edx
mov dword [esp + 0x48], edx
jle 0x417b83
mov esi, dword [esp + 0x68]
mov edi, ebx
neg edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x60], edi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], eax
jmp 0x417973
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
test ecx, ecx
jl 0x41797d
mov eax, ecx
test ebx, ebx
je 0x41798f
xor ecx, ecx
test ebx, ebx
setle cl
dec ecx
and ecx, 2
dec ecx
jmp 0x417991
xor ecx, ecx
sar eax, 0x10
imul eax, ecx
imul eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x68], 0
add eax, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x7c]
test eax, eax
jle 0x417b56
mov dword [esp + 0x74], esi
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x6c]
mov esi, dword [esp + 0x74]
mov eax, ecx
xor ebx, ebx
lea edi, [esp + 0x80]
mov dword [esp + 0x80], ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x2c], esi
je 0x417add
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x90], esi
imul eax, dword [esp + 0x8c]
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x24], esi
cmp ecx, esi
je 0x417ab0
mov edx, dword [esp + 0x68]
mov edi, dword [esp + 0x90]
sar edx, 0x10
imul edx, ebp
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x84]
add edx, edi
add edx, esi
imul eax, ebp
add edx, ecx
mov ecx, ebp
mov esi, edx
lea edi, [esp + 0x20]
mov dword [esp + 0x20], 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [esp + 0x98]
and ecx, 3
add edx, eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x94]
mov edi, dword [esp + 0x44]
shr esi, cl
mov ecx, dword [esp + 0x24]
add ecx, ebp
mov ebp, dword [esp + 0x88]
mov dword [esp + 0x24], ecx
and esi, edi
add ebx, esi
mov esi, dword [esp + 0x28]
cmp ecx, esi
jne 0x417a53
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
xor esi, esi
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x9c]
add ecx, edi
mov edi, dword [esp + 0x90]
add edi, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x90], edi
mov edi, dword [esp + 0x30]
cmp ecx, edi
jne 0x417a17
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x74]
shl ebx, cl
mov ecx, dword [esp + 0x58]
lea esi, [esp + 0x80]
mov edi, eax
imul ebx, dword [esp + 0x54]
shr ebx, cl
mov ecx, dword [esp + 0x78]
shl ebx, cl
mov ecx, dword [esp + 0x80]
and ecx, edx
or ebx, ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x80], ebx
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x68]
mov esi, ebx
add eax, esi
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x5c]
add ecx, eax
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x68], ecx
mov dword [esp + 0x34], eax
jne 0x4179c5
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x60]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x70]
add eax, ebx
add esi, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x3c]
add ecx, edi
dec eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x3c], eax
jne 0x41796f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret