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

Disassembly:
push rbx
push rbp
push r12
push r15
sub rsp, 0x328
mov rax, qword [0x140377790]
xor rax, rsp
mov qword [rsp + 0x2c0], rax
lea rbx, [0x140560500]
xor ebp, ebp
mov r15, r8
mov r8, rdx
mov r12, rcx
mov qword [rsp + 0x88], rcx
mov rax, rbx
mov qword [rsp + 0x310], r14
mov edx, ebp
lea rcx, [0x1405605f0]
nop
cmp dword [rax], ebp
je 0x140227236
add rax, 0x18
inc edx
cmp rax, rcx
jl 0x140227220
mov r14d, dword [rsp + 0x24]
jmp 0x14022723d
mov r14d, edx
mov dword [rsp + 0x24], edx
cmp edx, 0xa
jne 0x14022724a
lea eax, [rdx - 9]
jmp 0x1402279c6
movsxd rax, r14d
lea rcx, [rsp + 0x20]
mov rdx, r8
mov qword [rsp + 0x368], rsi
lea rsi, [rax + rax*2]
call fcn.1401466f0
test eax, eax
je 0x140227274
mov eax, 1
jmp 0x1402279be
mov ecx, dword [rsp + 0x20]
mov qword [rsp + 0x318], r13
lea r13, [rbx + rsi*8 + 4]
lea r8, str.num_lights
mov rdx, r13
call fcn.140146d60
mov ecx, dword [r13]
test ecx, ecx
jne 0x1402272aa
mov ecx, dword [rsp + 0x20]
call fcn.1401470a0
jmp 0x1402279b4
shl ecx, 2
mov qword [rsp + 0x320], rdi
movaps xmmword [rsp + 0x300], xmm6
call fcn.14014a890
cmp dword [r13], ebp
mov edi, ebp
movss xmm6, dword [0x1403392e0]
mov qword [rbx + rsi*8 + 8], rax
lea rbx, [0x140560600]
jle 0x1402277ed
movaps xmmword [rsp + 0x2f0], xmm7
movss xmm7, dword [0x140339228]
movaps xmmword [rsp + 0x2e0], xmm8
movss xmm8, dword [0x140339240]
mov r12, rbp
lea r14, [0x140560500]
movaps xmmword [rsp + 0x2d0], xmm9
movsd xmm9, qword [0x140339400]
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_type
lea rdx, [rsp + 0x60]
mov r9d, edi
call fcn.140146d60
test eax, eax
jne 0x1402277c6
mov r8, qword [r14 + rsi*8 + 8]
mov edx, ebp
mov rcx, rbp
mov rax, rbx
lea r9, [0x140561d70]
cmp dword [rax], ebp
je 0x140227366
add rax, 0x3c
inc edx
inc rcx
cmp rax, r9
jl 0x140227354
cmp edx, 0x64
je 0x140227382
mov eax, dword [rsp + 0x60]
imul rcx, rcx, 0x3c
mov dword [rcx + rbx], 1
mov dword [rcx + rbx + 4], eax
mov dword [r12 + r8], edx
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_color_red
lea rdx, [rsp + 0x90]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_color_green
lea rdx, [rsp + 0x98]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_color_blue
lea rdx, [rsp + 0x7c]
mov r9d, edi
call fcn.140146fb0
mov r11, qword [r14 + rsi*8 + 8]
mov ecx, dword [rsp + 0x60]
movss xmm0, dword [rsp + 0x90]
movsxd rax, dword [r12 + r11]
imul rax, rax, 0x3c
movss dword [rax + rbx + 0x24], xmm0
movss xmm0, dword [rsp + 0x98]
movss dword [rax + rbx + 0x28], xmm0
movss xmm0, dword [rsp + 0x7c]
movss dword [rax + rbx + 0x2c], xmm0
test ecx, ecx
je 0x1402276fd
sub ecx, 1
je 0x140227658
cmp ecx, 1
jne 0x1402277b6
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_direction_x
lea rdx, [rsp + 0x40]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_direction_y
lea rdx, [rsp + 0x44]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_direction_z
lea rdx, [rsp + 0x48]
mov r9d, edi
call fcn.140146fb0
mov r11, qword [r14 + rsi*8 + 8]
lea rdx, [rsp + 0x68]
movss xmm0, dword [rsp + 0x40]
movss xmm1, dword [rsp + 0x44]
xorps xmm0, xmm6
movss dword [rsp + 0x68], xmm0
movss xmm0, dword [rsp + 0x48]
movsxd rbx, dword [r12 + r11]
xorps xmm1, xmm6
lea rcx, [rsp + 0x68]
xorps xmm0, xmm6
movss dword [rsp + 0x6c], xmm1
movss dword [rsp + 0x70], xmm0
call fcn.1402506a0
mov ecx, dword [rsp + 0x20]
movss xmm0, dword [rsp + 0x68]
mov r11, rbx
lea rbx, [0x140560600]
lea r8, str.light_d_position_x
lea rdx, [rsp + 0x50]
mov r9d, edi
imul r11, r11, 0x3c
movss dword [r11 + rbx + 0x18], xmm0
movss xmm0, dword [rsp + 0x6c]
movss dword [r11 + rbx + 0x1c], xmm0
movss xmm0, dword [rsp + 0x70]
movss dword [r11 + rbx + 0x20], xmm0
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_position_y
lea rdx, [rsp + 0x54]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_position_z
lea rdx, [rsp + 0x58]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_attenuationfactor
lea rdx, [rsp + 0x38]
mov r9d, edi
call fcn.140146fb0
mov r11, qword [r14 + rsi*8 + 8]
mov ecx, dword [rsp + 0x20]
movss xmm0, dword [rsp + 0x50]
movaps xmm1, xmm7
divss xmm1, dword [rsp + 0x38]
movsxd rax, dword [r12 + r11]
lea r8, str.light_d_spot_innerangle
lea rdx, [rsp + 0x80]
mov r9d, edi
imul rax, rax, 0x3c
movss dword [rax + rbx + 8], xmm0
movss xmm0, dword [rsp + 0x54]
movss dword [rax + rbx + 0x14], xmm1
movss dword [rax + rbx + 0xc], xmm0
movss xmm0, dword [rsp + 0x58]
movss dword [rax + rbx + 0x10], xmm0
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_spot_outerangle
lea rdx, [rsp + 0x78]
mov r9d, edi
call fcn.140146fb0
mov r9d, edi
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_spot_falloff
lea rdx, [rsp + 0x94]
call fcn.140146fb0
mov r11, qword [r14 + rsi*8 + 8]
movss xmm0, dword [rsp + 0x80]
movsxd rbx, dword [r12 + r11]
mulss xmm0, xmm8
unpcklps xmm0, xmm0
cvtps2pd xmm0, xmm0
imul rbx, rbx, 0x3c
mulsd xmm0, xmm9
call sub.MSVCR90.dll_cos
lea rax, [0x140560600]
cvtsd2ss xmm1, xmm0
movss xmm0, dword [rsp + 0x78]
mulss xmm0, xmm8
unpcklps xmm0, xmm0
cvtps2pd xmm0, xmm0
movss dword [rbx + rax + 0x30], xmm1
mulsd xmm0, xmm9
call sub.MSVCR90.dll_cos
lea rax, [0x140560600]
cvtsd2ss xmm1, xmm0
movss xmm0, dword [rsp + 0x94]
movss dword [rbx + rax + 0x34], xmm1
movss dword [rbx + rax + 0x38], xmm0
lea rbx, [0x140560600]
jmp 0x1402277b6
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_position_x
lea rdx, [rsp + 0x50]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_position_y
lea rdx, [rsp + 0x54]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_position_z
lea rdx, [rsp + 0x58]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_attenuationfactor
lea rdx, [rsp + 0x38]
mov r9d, edi
call fcn.140146fb0
mov r11, qword [r14 + rsi*8 + 8]
movss xmm0, dword [rsp + 0x50]
movaps xmm1, xmm7
movsxd rax, dword [r12 + r11]
divss xmm1, dword [rsp + 0x38]
imul rax, rax, 0x3c
movss dword [rax + rbx + 8], xmm0
movss xmm0, dword [rsp + 0x54]
movss dword [rax + rbx + 0x14], xmm1
movss dword [rax + rbx + 0xc], xmm0
movss xmm0, dword [rsp + 0x58]
movss dword [rax + rbx + 0x10], xmm0
jmp 0x1402277b6
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_direction_x
lea rdx, [rsp + 0x40]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_direction_y
lea rdx, [rsp + 0x44]
mov r9d, edi
call fcn.140146fb0
mov ecx, dword [rsp + 0x20]
lea r8, str.light_d_direction_z
lea rdx, [rsp + 0x48]
mov r9d, edi
call fcn.140146fb0
mov r11, qword [r14 + rsi*8 + 8]
lea rdx, [rsp + 0x28]
movss xmm0, dword [rsp + 0x40]
movss xmm1, dword [rsp + 0x44]
movss dword [rsp + 0x28], xmm0
movss xmm0, dword [rsp + 0x48]
movss dword [rsp + 0x2c], xmm1
movsxd rbx, dword [r12 + r11]
lea rcx, [rsp + 0x28]
movss dword [rsp + 0x30], xmm0
call fcn.1402506a0
mov r11, rbx
lea rbx, [0x140560600]
movss xmm0, dword [rsp + 0x28]
imul r11, r11, 0x3c
movss dword [r11 + rbx + 0x18], xmm0
movss xmm0, dword [rsp + 0x2c]
movss dword [r11 + rbx + 0x1c], xmm0
movss xmm0, dword [rsp + 0x30]
movss dword [r11 + rbx + 0x20], xmm0
inc edi
add r12, 4
cmp edi, dword [r13]
jl 0x140227320
mov r14d, dword [rsp + 0x24]
mov r12, qword [rsp + 0x88]
movaps xmm9, xmmword [rsp + 0x2d0]
movaps xmm8, xmmword [rsp + 0x2e0]
movaps xmm7, xmmword [rsp + 0x2f0]
mov ecx, dword [rsp + 0x20]
call fcn.1401470a0
test r15, r15
je 0x1402279ec
lea rcx, [rsp + 0x24]
mov rdx, r15
call fcn.1401466f0
test eax, eax
jne 0x14022798e
mov ecx, dword [rsp + 0x24]
lea r8, str.size
lea rdx, [rsp + 0x88]
call fcn.140146fb0
mov ecx, dword [r13]
imul ecx, ecx, 0x1c
call fcn.14014a890
cmp dword [r13], ebp
mov rdi, rax
mov r10d, ebp
jle 0x140227916
mov r9, rbp
lea r8, [rax + 0xc]
lea r11, [0x140560500]
nop word [rax + rax]
mov rcx, qword [r11 + rsi*8 + 8]
movsxd rdx, dword [r9 + rcx]
imul rdx, rdx, 0x3c
cmp dword [rdx + rbx + 4], 2
jne 0x140227905
movss xmm0, dword [rsp + 0x88]
inc ebp
movss dword [r8 + 0xc], xmm0
mov rax, qword [r11 + rsi*8 + 8]
movsxd rcx, dword [r9 + rax]
imul rcx, rcx, 0x3c
mov eax, dword [rcx + rbx + 8]
mov dword [r8 - 0xc], eax
mov eax, dword [rcx + rbx + 0xc]
mov dword [r8 - 8], eax
mov eax, dword [rcx + rbx + 0x10]
mov dword [r8 - 4], eax
mov rax, qword [r11 + rsi*8 + 8]
movsxd rcx, dword [r9 + rax]
imul rcx, rcx, 0x3c
add r8, 0x1c
movss xmm0, dword [rcx + rbx + 0x18]
xorps xmm0, xmm6
movss dword [rsp + 0x28], xmm0
movss xmm0, dword [rcx + rbx + 0x1c]
xorps xmm0, xmm6
movss dword [rsp + 0x2c], xmm0
movss xmm0, dword [rcx + rbx + 0x20]
lea rcx, [rsp + 0x28]
xorps xmm0, xmm6
movss dword [rsp + 0x30], xmm0
mov eax, dword [rcx]
mov dword [r8 - 0x1c], eax
mov eax, dword [rcx + 4]
mov dword [r8 - 0x18], eax
mov eax, dword [rcx + 8]
mov dword [r8 - 0x14], eax
inc r10d
add r9, 4
cmp r10d, dword [r13]
jl 0x140227860
mov ecx, dword [rsp + 0x24]
lea r8, str.texture
lea rdx, [rsp + 0xa0]
call fcn.140146bb0
mov rcx, r15
call fcn.14014ab30
lea r9, [rsp + 0xa0]
lea rdx, str._s_s
lea rcx, [rsp + 0x1b0]
mov r8, rax
call sub.MSVCR90.dll_sprintf
lea rax, [0x140560500]
lea r8, [rsp + 0x1b0]
lea rbx, [rax + rsi*8 + 0x10]
mov edx, ebp
mov rcx, rbx
call fcn.140224340
mov ecx, dword [rbx]
mov rdx, rdi
call fcn.1402246d0
mov rcx, rdi
call fcn.14014a8e0
mov ecx, dword [rsp + 0x24]
call fcn.1401470a0
lea rax, [0x140560500]
movaps xmm6, xmmword [rsp + 0x300]
mov rdi, qword [rsp + 0x320]
mov dword [rax + rsi*8], 1
lea eax, [r14 + 1]
mov dword [r12], eax
mov r13, qword [rsp + 0x318]
xor eax, eax
mov rsi, qword [rsp + 0x368]
mov r14, qword [rsp + 0x310]
mov rcx, qword [rsp + 0x2c0]
xor rcx, rsp
call fcn.140291ec0
add rsp, 0x328
pop r15
pop r12
pop rbp
pop rbx
ret
lea rax, [0x140560500]
mov dword [rax + rsi*8 + 0x10], ebp
jmp 0x140227995