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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x30], esi
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x40a4d4
mov eax, dword [esi + 0x80]
test eax, eax
je 0x40a4d4
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x54]
sub ebx, eax
mov eax, dword [esp + 0x5c]
inc ebx
sub eax, edi
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x78]
test eax, eax
je 0x409df8
push eax
call dword [fcn.004650fc]
mov eax, dword [esi + 0x78]
push eax
call dword [fcn.00465100]
push 0x42c
push 0x42
call dword [fcn.00465104]
push eax
mov dword [esi + 0x78], eax
call dword [fcn.004650f8]
mov ebp, eax
mov ecx, 0xb
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov esi, dword [esi + 0x7c]
mov ecx, 0xb
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x34], ecx
xor ecx, ecx
mov cx, word [ebp + 0xe]
mov eax, ecx
imul eax, dword [ebp + 4]
add eax, 0x1f
mov dword [ebp + 4], ebx
and al, 0xe0
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x1c]
mov esi, eax
mov eax, ecx
imul eax, ebx
add eax, 0x1f
mov dword [ebp + 8], edx
and al, 0xe0
cdq
and edx, 7
add eax, edx
mov ebx, eax
sar ebx, 3
mov edi, ebx
imul edi, dword [esp + 0x1c]
push edi
mov dword [ebp + 0x14], edi
sar esi, 3
call fcn.00462018
mov edx, eax
mov ecx, edi
mov dword [esp + 0x18], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
test eax, eax
jle 0x409f54
mov edi, ebx
mov edx, esi
neg edi
mov ecx, esi
imul esi, dword [esp + 0x34]
imul ecx, dword [esp + 0x54]
mov dword [esp + 0x28], edi
lea edi, [eax - 1]
imul edi, ebx
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x14]
neg edx
add edi, esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], eax
jmp 0x409ee9
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
sub eax, ecx
mov ecx, ebx
add edx, eax
xor eax, eax
mov ax, word [ebp + 0xe]
mov dword [esp + 0x34], edx
imul eax, dword [esp + 0x50]
cdq
and edx, 7
add eax, edx
mov esi, eax
mov eax, dword [esp + 0x34]
sar esi, 3
add esi, eax
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0x80]
mov eax, dword [esp + 0x24]
add esi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
add esi, eax
mov eax, dword [esp + 0x20]
add edx, ecx
dec eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], eax
jne 0x409edd
mov eax, dword [esp + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x40a4cb
cmp ebp, ebx
je 0x40a4cb
mov ecx, dword [ebp]
xor edi, edi
mov di, word [ebp + 0xe]
xor esi, esi
cmp edi, 0x18
mov dword [esp + 0x10], edi
mov dword [esp + 0x50], ecx
mov dword [esp + 0x1c], ebx
jne 0x40a003
mov eax, dword [ebp + 4]
mov esi, dword [ebp + 8]
imul eax, edi
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
imul eax, esi
mov dword [esp + 0x34], eax
lea esi, [eax + ecx]
push esi
call fcn.00462018
mov ecx, esi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
mov esi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x18], ebx
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x50]
mov ecx, 0xb
mov edi, ebx
add eax, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x14]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x1c], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov esi, ebx
jmp 0x40a2f7
cmp edi, 0x10
jne 0x40a1ba
mov eax, dword [ebp + 4]
mov edi, dword [ebp + 8]
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], edi
lea eax, [eax + eax*2]
mov dword [esp + 0x10], 0x18
lea eax, [eax*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
sar esi, 5
shl esi, 2
mov eax, esi
mov dword [esp + 0x44], esi
imul eax, edi
mov dword [esp + 0x48], eax
lea edi, [eax + ecx]
push edi
call fcn.00462018
mov ecx, edi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x2c]
and ecx, 3
mov dword [esp + 0x40], ebx
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x50]
xor ecx, ecx
add eax, ebx
mov dword [esp + 0x18], ebx
test edx, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], ecx
jle 0x40a195
add eax, 2
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x24]
xor edi, edi
test edx, edx
jle 0x40a17a
mov eax, edx
and eax, 0x80000001
jns 0x40a0b0
dec eax
or eax, 0xfffffffe
inc eax
add eax, edx
mov esi, dword [esp + 0x20]
imul eax, ecx
mov dword [esp + 0x34], eax
jmp 0x40a0c3
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
add eax, edi
add esi, 3
lea eax, [ecx + eax*2]
xor ecx, ecx
mov cl, byte [eax + 1]
mov al, byte [eax]
mov edx, ecx
add ecx, ecx
mov bl, al
and eax, 0x1f
sar ecx, 3
shl edx, 6
mov byte [esp + 0x3c], cl
mov ecx, eax
sar edx, 3
and dl, 0x1f
shr bl, 5
shl ecx, 8
add dl, bl
sub ecx, eax
mov eax, 0x84210843
mov byte [esp + 0x38], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x38]
and eax, 0xff
mov byte [esi - 5], dl
mov ecx, eax
shl ecx, 8
sub ecx, eax
mov eax, 0x84210843
imul ecx
mov eax, dword [esp + 0x3c]
add edx, ecx
sar edx, 4
mov ecx, edx
and eax, 0xff
shr ecx, 0x1f
add edx, ecx
mov ecx, eax
shl ecx, 8
sub ecx, eax
mov eax, 0x84210843
mov byte [esi - 4], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x24]
mov byte [esi - 3], dl
inc edi
cmp edi, eax
jl 0x40a0bf
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
inc ecx
add edx, esi
cmp ecx, eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], edx
jl 0x40a094
mov ecx, 0xb
mov esi, ebp
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov word [ebx + 0xe], 0x18
mov dword [ebx + 0x14], ecx
jmp 0x40a2f7
cmp edi, 8
jne 0x40a2eb
mov esi, dword [ebp + 4]
mov ebx, dword [ebp + 8]
mov eax, esi
mov dword [esp + 0x2c], esi
imul eax, edi
add eax, 0x1f
mov dword [esp + 0x48], ebx
cdq
and edx, 0x1f
mov dword [esp + 0x10], 0x18
add eax, edx
lea edx, [esi + esi*2]
sar eax, 5
shl eax, 2
mov dword [esp + 0x40], eax
lea eax, [edx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
mov esi, eax
sar esi, 5
shl esi, 2
mov eax, esi
mov dword [esp + 0x44], esi
imul eax, ebx
mov dword [esp + 0x3c], eax
lea edi, [eax + ecx]
push edi
call fcn.00462018
mov ecx, edi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x18], ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x50]
lea ecx, [ebx + eax]
mov eax, dword [esp + 0x48]
test eax, eax
mov dword [esp + 0x1c], ecx
jle 0x40a2c9
mov edx, dword [esp + 0x14]
add ecx, 2
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x2c]
xor ecx, ecx
test eax, eax
jle 0x40a2a6
mov eax, dword [esp + 0x50]
lea esi, [eax + ebp]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
xor edx, edx
add eax, 3
mov dl, byte [edi + ecx]
inc ecx
mov edi, edx
mov dl, byte [esi + edi*4]
mov byte [eax - 5], dl
mov dl, byte [esi + edi*4 + 1]
mov byte [eax - 4], dl
mov dl, byte [esi + edi*4 + 2]
mov byte [eax - 3], dl
mov edx, dword [esp + 0x2c]
cmp ecx, edx
jl 0x40a277
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
add ecx, eax
mov eax, dword [esp + 0x28]
add edx, esi
dec eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
jne 0x40a262
mov ecx, 0xb
mov esi, ebp
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov word [ebx + 0xe], 0x18
mov dword [ebx + 0x14], ecx
jmp 0x40a2f7
cmp edi, 1
jne 0x40a2f7
add ecx, 8
mov dword [esp + 0x50], ecx
mov edx, dword [esp + 0x14]
push edx
call fcn.00461fdc
mov ecx, dword [esi + 4]
push 0x2c
mov eax, ecx
imul eax, edi
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x4c], eax
lea eax, [ecx + ecx]
mov dword [esp + 0x28], eax
imul eax, edi
add eax, 0x1f
mov ecx, dword [esi + 8]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl ecx, 1
shl eax, 2
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x34], eax
call fcn.00462018
mov ebp, eax
mov ecx, 0xb
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x28]
mov ecx, 0xb
mov edi, ebp
add esp, 8
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x14]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x2c]
mov dword [ebp + 8], ecx
imul eax, ecx
mov ecx, dword [esp + 0x50]
mov dword [ebp + 0x14], eax
lea edi, [eax + ecx]
push edi
push 0x42
call dword [fcn.00465104]
push eax
mov dword [esp + 0x38], eax
call dword [fcn.004650f8]
mov ecx, edi
mov edx, eax
mov esi, ecx
xor eax, eax
mov edi, edx
mov dword [esp + 0x48], edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
mov esi, ebp
and ecx, 3
push ebp
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x54]
mov edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00461fdc
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x54]
add ecx, eax
mov eax, dword [esp + 0x14]
cdq
add esp, 4
and edx, 7
add eax, edx
mov dword [esp + 0x18], 0
mov ebp, eax
mov eax, dword [esp + 0x14]
sar ebp, 3
test eax, eax
jle 0x40a4a1
mov edi, ecx
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x20]
mov dword [esp + 0x50], 0
test eax, eax
jle 0x40a482
fild dword [esp + 0x18]
fmul dword [0x466144]
call fcn.004625d0
mov esi, eax
mov dword [esp + 0x24], edi
imul esi, dword [esp + 0x44]
mov dword [esp + 0x48], esi
jmp 0x40a435
mov esi, dword [esp + 0x48]
fild dword [esp + 0x50]
fmul dword [0x466140]
call fcn.004625d0
imul eax, ebp
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
sub esi, eax
mov eax, dword [esp + 0x50]
add esi, ecx
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x24]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
add edx, ebp
cmp eax, ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x24], edx
jl 0x40a431
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
inc eax
add edi, edx
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], edi
jl 0x40a401
push ebx
call fcn.00461fdc
mov eax, dword [esp + 0x14]
add esp, 4
cmp eax, 0x18
mov eax, dword [esp + 0x34]
jne 0x40a4d6
mov ecx, dword [esp + 0x30]
push eax
call fcn.00409a80
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 0x14
push eax
call fcn.00461fdc
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 0x14