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

Disassembly:
sub esp, 0xd8
mov eax, dword [esp + 0xdc]
mov edx, dword [esp + 0xe0]
push ebx
push ebp
push esi
push edi
mov ebx, ecx
sub esp, 8
mov dword [esp + 0x68], ebx
mov dword [ebx + 0x3c], eax
mov esi, dword [edx]
mov eax, esp
lea ecx, [ebx + 0x24]
mov dx, word [edx + 4]
mov dword [eax], esi
mov word [eax + 4], dx
call fcn.00408b30
mov eax, dword [esp + 0xf4]
mov cl, byte [eax]
mov byte [ebx + 0x70], cl
mov dl, byte [eax + 1]
mov byte [ebx + 0x71], dl
mov cl, byte [eax + 2]
mov byte [ebx + 0x72], cl
mov dl, byte [eax + 3]
movsx eax, byte [ebx + 0x70]
movsx ecx, cl
add eax, 0xb
mov byte [ebx + 0x73], dl
cmp eax, ecx
jg 0x408d3f
mov dword [ebx + 0x74], 1
jmp 0x408d46
mov dword [ebx + 0x74], 0
movsx ecx, word [ebx + 0x26]
mov dword [esp + 0x5c], 0
lea eax, [ecx - 1]
inc ecx
cmp eax, ecx
mov dword [esp + 0x20], eax
jg 0x409001
movsx ecx, word [ebx + 0x24]
lea esi, [ecx - 1]
inc ecx
cmp esi, ecx
mov dword [esp + 0x54], esi
jg 0x408fef
mov ecx, dword [esp + 0x5c]
lea edx, [ecx + ecx*2]
lea ecx, [esi + eax]
lea ebp, [esp + edx*4 + 0x6c]
lea edx, [ecx + ecx*4]
mov dword [esp + 0x1c], ebp
lea ecx, [ecx + edx*2]
lea edi, [ecx + ecx - 0x16]
mov dword [esp + 0x58], edi
push eax
push esi
call fcn.004b8c60
mov ecx, dword [0xceced8]
mov edx, dword [esp + 0x28]
sub ecx, edx
add esp, 8
add ecx, esi
movsx ebx, byte [eax]
lea edx, [ecx + ecx*4]
lea esi, [ebx*4]
lea ecx, [ecx + edx*2]
mov dword [esp + 0x2c], esi
movsx edx, byte [eax + 1]
mov dword [esp + 0x14], edx
shl edx, 2
mov dword [esp + 0x38], edx
lea edx, [edi + 0x2c]
mov dword [esp + 0x40], edx
movsx edx, byte [eax + 2]
mov dword [esp + 0x18], edx
shl edx, 2
mov dword [esp + 0x44], edx
movsx edx, byte [eax + 3]
shl ecx, 1
lea eax, [edx*4]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x14]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov eax, ebx
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x14]
cmp eax, edx
jg 0x408ef5
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x44]
sub eax, esi
lea ebx, [edi + 0x16]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
sub ebx, edi
sub eax, edi
mov edi, dword [esp + 0x18]
sub edx, esi
mov dword [esp + 0x1c], ebx
mov esi, eax
imul ebx, edx
imul esi, edi
mov dword [esp + 0x14], ebx
sub ebx, esi
mov dword [esp + 0xd0], ebx
lea ebx, [ecx + 0x16]
xor esi, esi
sub ebx, ecx
imul esi, edi
mov edi, ebx
mov dword [esp + 0x10], edx
imul edi, edx
mov edx, dword [esp + 0x1c]
sub esi, edi
xor edi, edi
imul edx, edi
mov edi, eax
imul edi, ebx
mov ebx, dword [esp + 0x50]
sub edi, edx
mov dword [esp + 0xd8], edi
mov edi, dword [esp + 0x2c]
sub ebx, edi
mov edi, eax
imul edi, ebx
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x14]
sub edi, ebx
lea ebx, [ecx - 0x16]
sub ebx, ecx
xor ecx, ecx
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x18]
imul ebx, ecx
imul eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x14]
sub edx, eax
imul ecx, dword [esp + 0x10]
mov eax, dword [esp + 0xd0]
sub ecx, ebx
add ecx, esi
mov ebx, dword [esp + 0x60]
sar ecx, 1
mov esi, dword [esp + 0x54]
mov dword [ebp - 4], ecx
mov ecx, dword [esp + 0xd8]
add edi, eax
add edx, ecx
sar edi, 1
sar edx, 1
mov dword [ebp - 8], edi
mov edi, dword [esp + 0x58]
mov dword [ebp], edx
jmp 0x408fc2
mov edx, dword [esp + 0x50]
lea ebp, [edi + 0x16]
mov dword [esp + 0x34], ebp
sub ebp, edi
mov edi, dword [esp + 0x38]
sub edx, esi
sub edi, esi
mov eax, edx
sub eax, edi
lea ebx, [ecx + 0x16]
imul eax, ebp
mov dword [esp + 0xdc], eax
lea esi, [ecx - 0x16]
mov eax, ebx
sub esi, ecx
sub eax, ecx
mov dword [esp + 0x14], esi
imul edx, eax
imul esi, edi
sub esi, edx
mov edx, dword [esp + 0x14]
sub eax, edx
mov edi, dword [esp + 0x40]
imul eax, ebp
mov ebp, dword [esp + 0x34]
mov edx, dword [esp + 0x44]
mov dword [esp + 0xe4], eax
mov eax, dword [esp + 0x50]
sub edi, ebp
mov ebp, dword [esp + 0x38]
sub eax, ebp
sub edx, ebp
xor ebp, ebp
mov dword [esp + 0x10], edx
imul ebp, edx
mov edx, eax
mov dword [esp + 0x18], edi
imul edx, edi
lea edi, [ecx - 0x16]
sub ecx, ebx
sub edi, ebx
sub edx, ebp
mov ebx, edi
imul edi, dword [esp + 0x18]
imul ebx, dword [esp + 0x10]
mov ebp, ecx
imul ebp, eax
xor eax, eax
sub ebx, ebp
mov ebp, dword [esp + 0x1c]
imul ecx, eax
mov eax, dword [esp + 0xdc]
sub ecx, edi
add edx, eax
mov edi, dword [esp + 0x58]
sar edx, 1
mov dword [ebp - 8], edx
mov edx, dword [esp + 0xe4]
add ebx, esi
mov esi, dword [esp + 0x54]
add ecx, edx
sar ebx, 1
sar ecx, 1
mov dword [ebp - 4], ebx
mov ebx, dword [esp + 0x60]
mov dword [ebp], ecx
mov eax, dword [esp + 0x5c]
add ebp, 0xc
inc eax
inc esi
mov dword [esp + 0x5c], eax
add edi, 0x16
movsx eax, word [ebx + 0x24]
inc eax
mov dword [esp + 0x1c], ebp
cmp esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], edi
jle 0x408d96
movsx ecx, word [ebx + 0x26]
inc eax
inc ecx
cmp eax, ecx
mov dword [esp + 0x20], eax
jle 0x408d62
mov esi, dword [esp + 0x94]
mov edx, dword [esp + 0x88]
mov ecx, dword [esp + 0x70]
mov edi, dword [esp + 0x98]
mov ebp, dword [esp + 0x64]
lea eax, [esi + edx]
mov edx, dword [esp + 0x74]
add eax, ecx
mov ecx, dword [esp + 0x8c]
add eax, ebp
mov ebp, dword [esp + 0x68]
add ecx, edi
add ecx, edx
mov edx, dword [esp + 0x90]
add ecx, ebp
mov ebp, dword [esp + 0x9c]
add edx, ebp
mov ebp, dword [esp + 0x78]
add edx, ebp
mov ebp, dword [esp + 0x6c]
add edx, ebp
sar edx, 2
mov ebp, edx
mov dword [esp + 0x2c], edx
sar ecx, 2
imul ebp, edx
mov edx, ecx
mov dword [esp + 0x28], ecx
sar eax, 2
imul edx, ecx
mov ecx, eax
add ebp, edx
imul ecx, eax
add ebp, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fsqrt
fdivr dword [0x50147c]
fmul dword [0x501478]
fild dword [esp + 0x24]
fmul st(1)
call fcn.004ed97c
fild dword [esp + 0x28]
mov dword [esp + 0x24], eax
fmul st(1)
call fcn.004ed97c
fild dword [esp + 0x2c]
mov dword [esp + 0x28], eax
fmul st(1)
call fcn.004ed97c
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0xa0]
add eax, edx
mov edx, dword [esp + 0xa4]
mov ebp, dword [esp + 0x74]
add eax, esi
add eax, ecx
mov ecx, dword [esp + 0x80]
add ecx, edx
mov edx, dword [esp + 0x84]
add ecx, edi
add ecx, ebp
mov ebp, dword [esp + 0xa8]
add edx, ebp
mov ebp, dword [esp + 0x9c]
add edx, ebp
mov ebp, dword [esp + 0x78]
add edx, ebp
sar edx, 2
mov ebp, edx
mov dword [esp + 0x38], edx
sar eax, 2
sar ecx, 2
imul ebp, edx
fstp st(0)
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov edx, ecx
imul edx, ecx
mov ecx, eax
add ebp, edx
imul ecx, eax
add ebp, ecx
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fsqrt
fdivr dword [0x50147c]
fmul dword [0x501478]
fild dword [esp + 0x30]
fmul st(1)
call fcn.004ed97c
fild dword [esp + 0x34]
mov dword [esp + 0x30], eax
fmul st(1)
call fcn.004ed97c
fild dword [esp + 0x38]
mov dword [esp + 0x34], eax
fmul st(1)
call fcn.004ed97c
mov edx, dword [esp + 0xc4]
mov ecx, dword [esp + 0xc8]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xb8]
add eax, edx
mov edx, dword [esp + 0xa0]
mov ebp, dword [esp + 0xc0]
add eax, edx
mov edx, dword [esp + 0xbc]
add eax, esi
add ecx, edx
mov edx, dword [esp + 0xa4]
add ecx, edx
mov edx, dword [esp + 0xcc]
add edx, ebp
mov ebp, dword [esp + 0xa8]
add edx, ebp
mov ebp, dword [esp + 0x9c]
add edx, ebp
add ecx, edi
sar edx, 2
mov ebp, edx
mov dword [esp + 0x44], edx
sar ecx, 2
imul ebp, edx
fstp st(0)
mov edx, ecx
mov dword [esp + 0x40], ecx
sar eax, 2
imul edx, ecx
mov ecx, eax
add ebp, edx
imul ecx, eax
add ebp, ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fsqrt
fdivr dword [0x50147c]
fmul dword [0x501478]
fild dword [esp + 0x3c]
fmul st(1)
call fcn.004ed97c
fild dword [esp + 0x40]
mov dword [esp + 0x3c], eax
fmul st(1)
call fcn.004ed97c
fild dword [esp + 0x44]
mov dword [esp + 0x40], eax
fmul st(1)
call fcn.004ed97c
mov edx, dword [esp + 0xac]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0xb8]
add eax, edx
mov edx, dword [esp + 0x88]
add eax, esi
add eax, edx
fstp st(0)
sar eax, 2
mov ecx, dword [esp + 0xb0]
mov edx, dword [esp + 0xbc]
mov esi, dword [esp + 0x8c]
mov ebp, dword [esp + 0x9c]
add ecx, edx
mov edx, dword [esp + 0xb4]
add ecx, edi
mov edi, dword [esp + 0x90]
add ecx, esi
mov esi, dword [esp + 0xc0]
add edx, esi
mov dword [esp + 0x48], eax
add edx, ebp
add edx, edi
sar edx, 2
mov esi, edx
mov dword [esp + 0x50], edx
sar ecx, 2
imul esi, edx
mov edx, ecx
mov dword [esp + 0x4c], ecx
imul edx, ecx
mov ecx, eax
add esi, edx
imul ecx, eax
add esi, ecx
mov dword [esp + 0x10], esi
fild dword [esp + 0x10]
fsqrt
fdivr dword [0x50147c]
fmul dword [0x501478]
fild dword [esp + 0x48]
fmul st(1)
call fcn.004ed97c
fild dword [esp + 0x4c]
mov dword [esp + 0x48], eax
fmul st(1)
call fcn.004ed97c
fild dword [esp + 0x50]
mov dword [esp + 0x4c], eax
fmul st(1)
call fcn.004ed97c
fstp st(0)
mov dword [esp + 0x50], eax
lea esi, [ebx + 0x40]
lea ecx, [esp + 0x2c]
mov edi, 4
mov edx, dword [ecx - 4]
mov eax, dword [ecx - 8]
imul edx, dword [0x518064]
imul eax, dword [0x518060]
add edx, eax
mov eax, dword [ecx]
imul eax, dword [0x518068]
add edx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
jns 0x40934a
xor edx, edx
jmp 0x409354
cmp edx, 0xf
jle 0x409354
mov edx, 0xf
mov dword [esi], edx
add esi, 4
add ecx, 0xc
dec edi
jne 0x409312
mov cl, byte [ebx + 0x71]
mov al, byte [ebx + 0x70]
lea esi, [ebx + 0x70]
cmp cl, al
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x6c], 2
mov ebp, 1
jle 0x409382
mov dword [ebx + 0x68], ebp
mov dl, byte [ebx + 0x73]
mov al, byte [ebx + 0x72]
cmp dl, al
mov edi, 3
jle 0x409394
mov dword [ebx + 0x6c], edi
push esi
call fcn.0040e880
add esp, 4
test eax, eax
je 0x4093ea
mov eax, dword [ebx + 0x68]
mov cl, byte [ebx + 0x72]
mov dl, byte [eax + ebx + 0x70]
cmp cl, dl
mov ecx, 2
jle 0x4093b7
mov dword [ebx + 0x68], ecx
mov edx, dword [ebx + 0x6c]
mov al, byte [esi]
cmp al, byte [ebx + edx + 0x70]
jle 0x4093c9
xor eax, eax
mov dword [ebx + 0x6c], eax
jmp 0x4093cb
xor eax, eax
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x54], ebp
mov dword [ebx + 0x58], ecx
mov dword [ebx + 0x5c], ecx
mov dword [ebx + 0x60], edi
mov dword [ebx + 0x64], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd8
ret 0xc
mov ecx, dword [ebx + 0x68]
mov dl, byte [ebx + 0x73]
cmp dl, byte [ecx + ebx + 0x70]
jle 0x4093f9
mov dword [ebx + 0x68], edi
mov eax, dword [ebx + 0x6c]
mov cl, byte [ebx + 0x71]
cmp cl, byte [ebx + eax + 0x70]
jle 0x409408
mov dword [ebx + 0x6c], ebp
mov dword [ebx + 0x58], edi
mov dword [ebx + 0x64], edi
pop edi
mov dword [ebx + 0x54], ebp
mov dword [ebx + 0x5c], ebp
pop esi
mov dword [ebx + 0x50], 0
mov dword [ebx + 0x60], 2
pop ebp
pop ebx
add esp, 0xd8
ret 0xc