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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1f8
mov eax, dword [0x4b3008]
xor eax, esp
mov dword [esp + 0x1f4], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0xa4]
sub eax, dword [esi + 0xa0]
test eax, 0xfffffffc
je 0x422728
push 0x7c1d48
lea eax, [esp + 0xfc]
push str._sresult.Valves.dat
push eax
call fcn.00404440
add esp, 0xc
lea eax, [esp + 0xf8]
push 0x4a6fb8
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x422728
push 0x4a7008
push eax
call fcn.00411e60
mov ecx, dword [esi + 0xa4]
add esp, 8
mov eax, dword [esi + 0xa0]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
cmp eax, ecx
je 0x42271b
nop dword [eax]
mov esi, dword [eax]
mov edx, 1
mov edi, edx
mov dword [esp + 0x18], edx
xorps xmm0, xmm0
movsd qword [esp + 8], xmm0
mov ecx, dword [esi + 0x484c]
cmp ecx, edx
lea eax, [ecx + 1]
cmovne edi, eax
mov dword [esp + 0x10], edi
test ecx, ecx
jne 0x422228
push dword [esi + 0x4818]
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x14], 2
movsd qword [esi + 0x49c8], xmm0
movsd qword [esi + 0x4920], xmm0
call fcn.00469a90
mov eax, dword [esi + 0x14]
lea ecx, [esi + 0x2408]
add eax, 0x60
push eax
call fcn.00407b40
movsd xmm7, qword [esp + 8]
lea edi, [esi + 0x2410]
xorps xmm0, xmm0
xorps xmm2, xmm2
movsd qword [esi + 0x2420], xmm0
movsd qword [esi + 0x30], xmm0
jmp 0x4224d5
mov eax, dword [esi + 0x49e8]
lea edi, [esi + 0x2410]
test eax, eax
je 0x422251
movsd xmm0, qword [eax + 0x20]
movsd qword [edi], xmm0
movsd xmm0, qword [eax + 0x28]
movsd qword [esi + 0x2418], xmm0
xorps xmm0, xmm0
cmp dword [0x7c1e4c], 0
jne 0x422268
xor eax, eax
comisd xmm0, xmmword [esi + 0x30]
cmova edx, eax
mov dword [esp + 0x18], edx
movsd xmm0, qword [esi + 0x20]
comisd xmm0, xmmword [edi]
jbe 0x422281
cmp dword [esi + 0x4930], 8
mov eax, 0x2408
jne 0x422286
mov eax, 0x18
lea ecx, [eax + esi]
call fcn.0042ea40
movsd xmm1, qword [esi + 0x48c8]
movaps xmm2, xmm0
mulsd xmm2, qword [0x4af1d8]
movsd xmm0, qword [esi + 0x30]
andps xmm0, xmmword [0x4afb90]
mulsd xmm0, qword [esi + 0x48]
mulsd xmm2, xmm1
mulsd xmm0, qword [0x4af228]
mulsd xmm2, xmm1
divsd xmm0, xmm2
movsd qword [esi + 0x49c8], xmm0
mov ecx, dword [0x7c1e70]
cmp ecx, 3
jne 0x42231e
movups xmm0, xmmword [esi + 0x2410]
sub esp, 0x10
lea ecx, [esp + 0x50]
movups xmmword [esp], xmm0
push ecx
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x60]
push ecx
lea ecx, [esp + 0x6c]
push ecx
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x84]
push ecx
lea ecx, [esi + 0x2408]
call fcn.004307f0
movsd xmm0, qword [esp + 0x28]
jmp 0x422486
jle 0x422416
movsd xmm0, qword [esi + 0x2410]
sub esp, 0x10
mulsd xmm0, qword [0x4ae888]
movsd xmm1, qword [esi + 0x2418]
movsd qword [esp + 8], xmm0
movsd qword [esp], xmm1
cmp ecx, 4
jne 0x422397
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x7c]
push ecx
lea ecx, [esp + 0x88]
push ecx
lea ecx, [esp + 0x94]
push ecx
lea ecx, [esp + 0xa0]
push ecx
lea ecx, [esp + 0xac]
push ecx
lea ecx, [esp + 0xb8]
push ecx
lea ecx, [esi + 0x2408]
call fcn.00431170
movsd xmm0, qword [esp + 0x30]
jmp 0x422486
push 1
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0xb0]
push ecx
lea ecx, [esp + 0xbc]
push ecx
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0xcc]
push ecx
lea ecx, [esp + 0xd8]
push ecx
lea ecx, [esp + 0xe4]
push ecx
lea ecx, [esp + 0xf0]
push ecx
lea ecx, [esp + 0xfc]
push ecx
lea ecx, [esp + 0x108]
push ecx
lea ecx, [esp + 0x114]
push ecx
lea ecx, [esp + 0x120]
push ecx
lea ecx, [esp + 0x12c]
push ecx
lea ecx, [esp + 0x138]
push ecx
lea ecx, [esi + 0x2408]
call fcn.00431c40
movsd xmm0, qword [esp + 0x38]
jmp 0x422486
movsd xmm2, qword [esi + 0x2418]
lea ecx, [esi + 0x2408]
movsd xmm1, qword [esi + 0x2410]
call fcn.0042e5e0
lea ecx, [esi + 0x2408]
movsd qword [esp + 8], xmm0
call fcn.0042ece0
movaps xmm2, xmm0
xorps xmm1, xmm1
mulsd xmm2, qword [esi + 0x2418]
movsd xmm0, qword [esi + 0x2440]
mulsd xmm0, qword [esi + 0x2438]
mulsd xmm2, qword [esp + 8]
divsd xmm2, xmm0
movaps xmm0, xmm2
ucomisd xmm1, xmm0
ja 0x422479
sqrtsd xmm0, xmm0
jmp 0x42247e
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
mulsd xmm0, qword [0x4af478]
movsd xmm1, qword [esi + 0x49c8]
lea ecx, [esi + 0x18]
divsd xmm1, xmm0
movsd xmm0, qword [esi + 0x48c0]
movsd qword [esp + 8], xmm1
movsd xmm1, qword [esi + 0x48b8]
mulsd xmm1, xmm1
mulsd xmm0, xmm0
mulsd xmm1, qword [0x4af5d0]
divsd xmm1, xmm0
movsd qword [esi + 0x4920], xmm1
call fcn.0042ea40
movsd xmm2, qword [esp + 8]
movaps xmm7, xmm0
movsd xmm3, qword [esi + 0x20]
sub esp, 0x20
cmp dword [esi + 0x4820], 1
movaps xmm1, xmm3
movsd xmm0, qword [esi + 0x28]
movsd xmm4, qword [edi]
movsd xmm5, qword [esi + 0x30]
subsd xmm1, xmm4
movsd qword [esp + 0x28], xmm0
movaps xmm0, xmm3
mulsd xmm0, qword [0x4ae8a8]
mov eax, dword [esi + 0x4818]
movsd xmm6, qword [esi + 0x2420]
mulsd xmm4, qword [0x4ae8b0]
mulsd xmm0, qword [esi + 0x48d8]
mulsd xmm3, qword [0x4ae8b0]
mulsd xmm0, qword [0x4ae928]
mulsd xmm0, qword [0x4af4c0]
mulsd xmm0, qword [0x4ae928]
jne 0x422614
mulsd xmm1, qword [0x4ae8b0]
mulsd xmm6, qword [0x4aeb28]
mulsd xmm5, qword [0x4aeb28]
movsd qword [esp + 0x18], xmm1
movsd qword [esp + 0x10], xmm0
movsd xmm0, qword [esi + 0x48e8]
movsd qword [esp + 8], xmm2
movsd qword [esp], xmm0
push dword [esp + 0x30]
movsd xmm0, qword [esi + 0x48d0]
push dword [esp + 0x3c]
sub esp, 0x58
movsd qword [esp + 0x50], xmm0
movsd xmm0, qword [esi + 0x4920]
movsd qword [esp + 0x48], xmm0
movsd xmm0, qword [esi + 0x49c8]
movsd qword [esp + 0x40], xmm0
movsd xmm0, qword [esi + 0x2418]
subsd xmm0, qword [0x4af658]
movsd qword [esp + 0x38], xmm6
movsd qword [esp + 0x30], xmm7
movsd qword [esp + 0x28], xmm0
movsd xmm0, qword [esi + 0x48]
movsd qword [esp + 0x20], xmm4
movsd qword [esp + 0x18], xmm5
movsd qword [esp + 0x10], xmm0
movsd xmm0, qword [esp + 0x88]
subsd xmm0, qword [0x4af658]
movsd qword [esp + 8], xmm0
movsd qword [esp], xmm3
jmp 0x4226eb
xorps xmm1, xmmword [0x4afba0]
mulsd xmm1, qword [0x4ae8b0]
xorps xmm5, xmmword [0x4afba0]
mulsd xmm5, qword [0x4aeb28]
movsd qword [esp + 0x18], xmm1
movsd qword [esp + 0x10], xmm0
movsd xmm0, qword [esi + 0x48e8]
movsd qword [esp + 8], xmm2
movsd qword [esp], xmm0
push dword [esp + 0x30]
movsd xmm0, qword [esi + 0x48d0]
xorps xmm6, xmmword [0x4afba0]
mulsd xmm6, qword [0x4aeb28]
push 0
sub esp, 0x58
movsd qword [esp + 0x50], xmm0
movsd xmm0, qword [esi + 0x4920]
movsd qword [esp + 0x48], xmm0
movsd xmm0, qword [esi + 0x49c8]
movsd qword [esp + 0x40], xmm0
movsd xmm0, qword [esp + 0x88]
subsd xmm0, qword [0x4af658]
movsd qword [esp + 0x38], xmm5
movsd qword [esp + 0x30], xmm7
movsd qword [esp + 0x28], xmm0
movsd xmm0, qword [esi + 0x2438]
movsd qword [esp + 0x20], xmm3
movsd qword [esp + 0x18], xmm6
movsd qword [esp + 0x10], xmm0
movsd xmm0, qword [esi + 0x2418]
subsd xmm0, qword [0x4af658]
movsd qword [esp + 8], xmm0
movsd qword [esp], xmm4
push eax
push str._d__lf__lf__lf__lf__lf__lf__lf__lf__lf__.10lf__.10lf__d__d__lf__lf__lf__lf_n
push dword [esp + 0x9c]
call fcn.00411e60
mov eax, dword [esp + 0xa8]
add esp, 0x8c
add eax, 4
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x20]
jne 0x4221a0
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov ecx, dword [esp + 0x1fc]
pop edi
pop esi
xor ecx, esp
call fcn.004a034d
mov esp, ebp
pop ebp
ret 4