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

Disassembly:
sub esp, 0x64
mov eax, dword [esp + 0x68]
mov edx, dword [eax + 0x34]
mov ecx, dword [eax]
push ebx
push ebp
mov ebp, dword [eax + 0x2c]
push esi
mov esi, dword [eax + 0x30]
mov ebx, ebp
push edi
xor edi, edi
sar ebx, 1
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
cmp edx, 1
je 0x41f93b
cmp ecx, edi
jle 0x41f9b2
mov eax, dword [esp + 0x7c]
sar edx, 1
mov dword [esp + 0x24], edx
lea edx, [esp + 0x54]
sub eax, edx
lea edi, [esp + ecx*4 + 0x54]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jmp 0x41f8e7
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + edi - 4]
sub edi, 4
sub eax, esi
add eax, dword [esp + 0x24]
cdq
idiv dword [esp + 0x14]
cmp eax, ebx
jge 0x41f907
mov ecx, ebx
sub ecx, eax
lea ecx, [ecx + ecx - 1]
jmp 0x41f90d
mov ecx, eax
sub ecx, ebx
add ecx, ecx
test ecx, ecx
jge 0x41f915
xor ecx, ecx
jmp 0x41f91c
cmp ecx, ebp
jl 0x41f91c
lea ecx, [ebp - 1]
mov edx, dword [esp + 0x10]
imul eax, dword [esp + 0x14]
imul edx, ebp
add edx, ecx
add eax, esi
sub dword [esp + 0x20], 1
mov dword [esp + 0x10], edx
mov dword [edi], eax
jne 0x41f8e3
jmp 0x41f9a8
cmp ecx, edi
jle 0x41f9b2
mov eax, dword [esp + 0x7c]
lea edi, [esp + 0x54]
sub eax, edi
lea edx, [esp + ecx*4 + 0x54]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jmp 0x41f964
mov eax, dword [esp + 0x1c]
mov eax, dword [edx + eax - 4]
sub edx, 4
sub eax, esi
cmp eax, ebx
jge 0x41f97b
mov ecx, ebx
sub ecx, eax
lea ecx, [ecx + ecx - 1]
jmp 0x41f981
mov ecx, eax
sub ecx, ebx
add ecx, ecx
test ecx, ecx
jge 0x41f989
xor ecx, ecx
jmp 0x41f990
cmp ecx, ebp
jl 0x41f990
lea ecx, [ebp - 1]
mov edi, dword [esp + 0x10]
imul edi, ebp
add edi, ecx
add eax, esi
sub dword [esp + 0x20], 1
mov dword [esp + 0x10], edi
mov dword [edx], eax
jne 0x41f960
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x18]
xor edi, edi
mov edx, dword [eax + 0xc]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x78], edx
mov edx, dword [edx + 8]
cmp dword [edx + ebx*4], edi
jg 0x41fb1a
mov eax, dword [eax + 4]
lea edx, [ebp - 1]
imul edx, dword [esp + 0x14]
add edx, esi
xor ebp, ebp
cmp eax, edi
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x30], eax
jle 0x41fb1a
mov eax, dword [esp + 0x78]
mov eax, dword [eax + 8]
mov dword [esp + 0x78], eax
nop
mov eax, dword [esp + 0x78]
cmp dword [eax], edi
jle 0x41fac5
xor eax, eax
xor ebx, ebx
xor esi, esi
cmp ecx, 2
mov dword [esp + 0x28], eax
jl 0x41fa89
mov eax, dword [esp + 0x7c]
lea edx, [ecx - 2]
lea esi, [esp + 0x38]
shr edx, 1
sub esi, eax
inc edx
lea ecx, [edx + edx]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esi + eax - 4]
sub ecx, dword [eax]
add eax, 8
mov ebp, ecx
imul ebp, ecx
mov ecx, dword [esi + eax - 8]
sub ecx, dword [eax - 4]
add edi, ebp
mov ebp, ecx
imul ebp, ecx
add ebx, ebp
sub edx, 1
jne 0x41fa52
mov ebp, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
cmp esi, ecx
jge 0x41fa9b
mov eax, dword [esp + esi*4 + 0x34]
mov ecx, dword [esp + 0x7c]
sub eax, dword [ecx + esi*4]
imul eax, eax
mov ecx, dword [esp + 0x20]
add ebx, edi
add eax, ebx
cmp ecx, 0xffffffff
je 0x41faac
cmp eax, ecx
jge 0x41fac3
mov ecx, 8
lea esi, [esp + 0x34]
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ebp
xor edi, edi
xor ecx, ecx
cmp dword [esp + 0x34], edx
jl 0x41fae2
lea eax, [esp + 0x34]
inc ecx
mov dword [eax], 0
cmp dword [esp + ecx*4 + 0x34], edx
lea eax, [esp + ecx*4 + 0x34]
jge 0x41fad1
mov eax, dword [esp + ecx*4 + 0x34]
lea ecx, [esp + ecx*4 + 0x34]
test eax, eax
jl 0x41faf6
mov esi, dword [esp + 0x14]
add eax, esi
mov dword [ecx], eax
mov eax, dword [ecx]
add dword [esp + 0x78], 4
neg eax
inc ebp
xor edi, edi
cmp ebp, dword [esp + 0x30]
mov dword [ecx], eax
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
jl 0x41fa20
mov ebx, dword [esp + 0x10]
cmp ebx, 0xffffffff
mov eax, dword [esp + 0x7c]
jle 0x41fb35
cmp ecx, edi
jle 0x41fb35
mov edx, dword [esp + edi*4 + 0x54]
sub dword [eax], edx
inc edi
add eax, 4
cmp edi, ecx
jl 0x41fb27
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x64
ret