Function at 0x515e70
Capabilities:
Check if file exists
Create thread
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x609c5b
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x6b000c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x134], 0
or edi, 0xffffffff
mov eax, dword fs:[0x2c]
mov ebx, dword [eax]
mov eax, dword [0x6befa8]
mov dword [ebp - 0x140], ebx
cmp eax, dword [ebx + 4]
jle 0x516044
push 0x6befa8
call fcn.0055fefe
add esp, 4
cmp dword [0x6befa8], edi
jne 0x516044
mov dword [ebp - 4], 0
lea eax, [ebp - 0x124]
push 0x110
push 0
push eax
call fcn.00588800
mov esi, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
add esp, 0xc
mov dword [ebp - 0x130], 0x11c
mov dword [ebp - 0x12c], 6
mov dword [ebp - 0x128], 0
push 2
push 2
push 0
push 0
call esi
mov ebx, eax
mov eax, edx
push eax
push ebx
mov dword [ebp - 0x13c], eax
lea eax, [ebp - 0x130]
push 2
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
jne 0x515f73
push 1
push 2
push dword [ebp - 0x13c]
push ebx
call esi
push 2
push 1
push edx
push eax
call esi
push edx
push eax
push 3
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
push 0x104
push 0x6b88a0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x6b88a0
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x144]
call fcn.004e28e0
mov byte [ebp - 4], 1
mov edx, dword [eax]
mov esi, dword [0x6b9690]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x515ffc
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x515fee
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x515fee
call fcn.0040c950
mov dword [ebp - 0x13c], eax
mov ecx, edi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x515fe4
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x13c]
add eax, 0x10
mov dword [0x6b9690], eax
jmp 0x515ffc
push dword [edx - 0xc]
mov ecx, 0x6b9690
push edx
call fcn.0040c9d0
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x144]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51601d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x61e670
call fcn.005603ea
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x6befa8
call fcn.0055feb4
mov ebx, dword [ebp - 0x140]
add esp, 4
mov dword [ebp - 4], 3
mov edx, 0x6b88a0
push str.oem.ini
lea ecx, [ebp - 0x138]
call fcn.0048e450
mov esi, dword [ebp - 0x138]
add esp, 4
mov dword [ebp - 0x134], 1
push esi
push 0
push str.LCID
push str.LANG
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x5161df
cmp eax, 0x801
ja 0x516133
je case.0x5160b4.1025
add eax, 0xfffffbff
cmp eax, 0x20
ja case.0x5160b4.1026
movzx eax, byte [eax + 0x516330]
jmp dword [eax*4 + 0x516300]
mov dword [0x6b0c60], 0x3b6
jmp 0x5161df
mov dword [0x6b0c60], 0x3a4
jmp 0x5161df
mov dword [0x6b0c60], 0x475
jmp 0x5161df
mov dword [0x6b0c60], 0x551
jmp 0x5161df
mov dword [0x6b0c60], 0x479
jmp 0x5161df
mov dword [0x6b0c60], 0x35f
jmp 0x5161df
mov dword [0x6b0c60], 0x362
jmp 0x5161df
mov dword [0x6b0c60], 0x421
jmp 0x5161df
cmp eax, 0x2401
ja 0x516196
je case.0x5160b4.1025
cmp eax, 0x1401
ja 0x516181
je case.0x5160b4.1025
cmp eax, 0xc01
ja 0x51617a
je case.0x5160b4.1025
sub eax, 0x804
je 0x51616e
sub eax, 0x12
jne case.0x5160b4.1026
mov dword [0x6b0c60], 0x35c
jmp 0x5161df
mov dword [0x6b0c60], 0x3a8
jmp 0x5161df
cmp eax, 0x1001
jmp 0x5161c7
cmp eax, 0x1801
je case.0x5160b4.1025
cmp eax, 0x1c01
je case.0x5160b4.1025
cmp eax, 0x2001
jmp 0x5161c7
cmp eax, 0x3401
ja 0x5161b4
je case.0x5160b4.1025
cmp eax, 0x2801
je case.0x5160b4.1025
cmp eax, 0x2c01
je case.0x5160b4.1025
cmp eax, 0x3001
jmp 0x5161c7
cmp eax, 0x3801
je case.0x5160b4.1025
cmp eax, 0x3c01
je case.0x5160b4.1025
cmp eax, 0x4001
je case.0x5160b4.1025
mov dword [0x6b0c60], 0
jmp 0x5161df
mov dword [0x6b0c60], 0x360
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, eax
test esi, esi
je 0x5161f1
call fcn.004dc850
xor ecx, ecx
test esi, esi
sete cl
push ecx
mov ecx, 0x6b8f68
call fcn.0048eda0
cmp dword [0x6b8ff0], 0
jne 0x51622e
lea eax, [ebp - 0x140]
push eax
push 0
push 0x6b8f68
push 0x48fad0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x6b8ff0], eax
mov eax, dword [0x6befac]
cmp eax, dword [ebx + 4]
jle 0x516278
push 0x6befac
call fcn.0055fefe
add esp, 4
cmp dword [0x6befac], 0xffffffff
jne 0x516278
mov byte [ebp - 4], 4
call fcn.00555e40
push 0x61e660
call fcn.005603ea
add esp, 4
mov byte [ebp - 4], 3
push 0x6befac
call fcn.0055feb4
add esp, 4
push dword [ebp - 0x138]
call fcn.004e8ae0
call fcn.0049f4e0
test esi, esi
jne 0x516291
call fcn.004dc850
push 0
push dword [0x6b8fc0]
push dword [0x6b8fb8]
push dword [0x6b8fbc]
call dword [sym.imp.SCSIEngine.dll_public:_static_void___cdecl_SCSIEngine::InitValue_int__unsigned_int__wchar_t_const___void__]
mov eax, 1
add esp, 0x10
mov dword [ebp - 0x134], eax
and eax, 0xfffffffe
mov dword [ebp - 0x134], eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x138]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x5162e4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055f9be
mov esp, ebp
pop ebp
ret