Function at 0x402d60
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54b2e1
mov eax, dword fs:[0]
push eax
sub esp, 0xec
mov eax, dword [0x5ae1b0]
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 ebx, ecx
mov dword [ebp - 0xf8], ebx
push 0x7f02
call fcn.00404ae0
call fcn.0041543b
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x402dbc
push 0x80004005
call fcn.00402120
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xf0], eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
test edx, edx
jne 0x402de3
xor ecx, ecx
jmp 0x402dff
mov ecx, edx
lea esi, [ecx + 2]
jmp 0x402df0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402df0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0xf0]
call fcn.004058c0
mov eax, dword [0x5baaec]
push str.openvr_api.dll
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.00405980
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov ecx, ebx
lea eax, [ebp - 0xe0]
push eax
call fcn.004036d0
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov ecx, dword [eax]
mov esi, dword [0x5baaec]
add esi, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, esi
je 0x402ea0
cmp dword [esi + 0xc], 0
jl 0x402e92
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x402e92
push edx
call fcn.00405980
add esp, 4
mov dword [ebp - 0xdc], eax
mov ecx, edi
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402e88
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0xdc]
add eax, 0x10
mov dword [0x5baaec], eax
jmp 0x402ea0
push dword [ecx - 0xc]
push ecx
mov ecx, 0x5baaec
call fcn.004058c0
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0xe0]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402ec3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x5baaec]
mov ecx, ebx
mov esi, dword [ebp - 0xf0]
cmp dword [eax - 0xc], 0
jne 0x402f5b
push dword [0x5af524]
push 0x3e8
call fcn.0041fae9
push 0
push 0x3e9
mov ecx, ebx
call fcn.0041f2f9
mov ecx, eax
call fcn.0041f1cb
push 0
push 0x3ea
mov ecx, ebx
call fcn.0041f2f9
mov ecx, eax
call fcn.0041f1cb
push 0
push 0x3eb
mov ecx, ebx
call fcn.0041f2f9
mov ecx, eax
call fcn.0041f1cb
push 0
push 0x3f0
mov ecx, ebx
call fcn.0041f2f9
mov ecx, eax
call fcn.0041f1cb
push 0x7f00
mov ecx, ebx
mov dword [0x5b9db4], 0
call fcn.00404ae0
xor ebx, ebx
jmp 0x403321
push 1
push 0x3e9
mov dword [0x5b9db4], 0
call fcn.0041f2f9
mov ecx, eax
call fcn.0041f1cb
push 1
push 0x3ea
mov ecx, ebx
call fcn.0041f2f9
mov ecx, eax
call fcn.0041f1cb
push 1
push 0x3eb
mov ecx, ebx
call fcn.0041f2f9
mov ecx, eax
call fcn.0041f1cb
push 1
push 0x3f0
mov ecx, ebx
call fcn.0041f2f9
mov ecx, eax
call fcn.0041f1cb
mov eax, dword [0x5baaec]
push str.openvr_api_dp.dll
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0xe0], 0
mov edi, esp
push eax
call fcn.00405980
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov ecx, ebx
lea eax, [ebp - 0xe0]
push eax
call fcn.004036d0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xe0]
cmp dword [eax - 0xc], 0
lea eax, [esi - 0x10]
jne 0x403032
push dword [0x5af52c]
mov dword [0x5b9db0], 0
push ecx
mov edi, esp
push eax
call fcn.00405980
add esp, 4
add eax, 0x10
mov ecx, ebx
mov dword [edi], eax
call fcn.00403360
push str.Patch
jmp 0x4032df
push dword [0x5af528]
mov dword [0x5b9db0], 0xb8c00
push ecx
mov edi, esp
push eax
call fcn.00405980
add esp, 4
add eax, 0x10
mov ecx, ebx
mov dword [edi], eax
call fcn.00403360
push str.openvr_api_dp.cfg
push dword [0x5baaec]
mov dword [ebp - 0xf4], 0
push str._s_s
push 0x5b9dc0
mov dword [ebp - 0xec], 0
mov dword [ebp - 0xe4], 0
mov dword [ebp - 0xe8], 0
mov dword [ebp - 0xdc], 1
call fcn.00404e50
push 0x58ec4c
lea eax, [ebp - 0xf4]
push 0x5b9dc0
push eax
call fcn.0052ebc8
mov eax, dword [ebp - 0xf4]
add esp, 0x1c
test eax, eax
je 0x4032a0
lea ecx, [ebp - 0xdc]
push ecx
lea ecx, [ebp - 0xe8]
push ecx
lea ecx, [ebp - 0xe4]
push ecx
lea ecx, [ebp - 0xec]
push ecx
push str._d__d__d__d
push eax
call fcn.0052ecd7
push dword [ebp - 0xf4]
call fcn.0052ee60
mov ecx, dword [ebp - 0xf8]
add esp, 0x1c
xor ebx, ebx
cmp dword [ebp - 0xdc], ebx
push 0x3f0
setne bl
call fcn.0041f2f9
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push ebx
push 0xf1
push dword [eax + 0x20]
call edi
mov eax, dword [ebp - 0xec]
test eax, eax
jne 0x403155
mov ebx, dword [ebp - 0xf8]
mov ecx, ebx
push 0x3ea
call fcn.0041f2f9
push 0
push 0
jmp 0x4031d9
mov ecx, 0xf
cmp eax, ecx
cmovb eax, ecx
push eax
mov dword [ebp - 0xec], eax
lea eax, [ebp - 0xd8]
push 0x58ed24
push eax
call fcn.00404e70
mov ebx, dword [ebp - 0xf8]
add esp, 0xc
mov ecx, ebx
push 0x3ea
call fcn.0041f2f9
lea ecx, [ebp - 0xd8]
push ecx
push 0
push 0x14d
push dword [eax + 0x20]
call edi
test eax, eax
jns 0x4031e3
push 0x3ea
mov ecx, ebx
call fcn.0041f2f9
lea ecx, [ebp - 0xd8]
push ecx
push 0
push 0x143
push dword [eax + 0x20]
call edi
push 0x3ea
mov ecx, ebx
mov edi, eax
call fcn.0041f2f9
push 0
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x14e
push dword [eax + 0x20]
call edi
mov edx, dword [ebp - 0xe8]
mov eax, edx
mov ecx, dword [ebp - 0xe4]
imul eax, ecx
test eax, eax
jne 0x403209
mov dword [ebp - 0xe8], eax
mov dword [ebp - 0xe4], eax
jmp 0x4032c0
mov eax, 0x640
cmp ecx, eax
cmova ecx, eax
cmp edx, eax
mov dword [ebp - 0xe4], ecx
cmova edx, eax
push edx
lea eax, [ecx + ecx]
mov dword [ebp - 0xe8], edx
push eax
lea eax, [ebp - 0xd8]
push str._dx_d
push eax
call fcn.00404e70
add esp, 0x10
mov ecx, ebx
push 0x3eb
call fcn.0041f2f9
lea ecx, [ebp - 0xd8]
push ecx
push 0
push 0x14d
push dword [eax + 0x20]
call edi
test eax, eax
jns 0x4032da
push 0x3eb
mov ecx, ebx
call fcn.0041f2f9
lea ecx, [ebp - 0xd8]
push ecx
push 0
push 0x143
push dword [eax + 0x20]
call edi
push 0x3eb
mov ecx, ebx
mov edi, eax
call fcn.0041f2f9
push 0
push edi
push 0x14e
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x4032da
push 0x3ea
mov ecx, ebx
call fcn.0041f2f9
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x14e
push dword [eax + 0x20]
call edi
push 0x3eb
mov ecx, ebx
call fcn.0041f2f9
push 0
push 0
push 0x14e
push dword [eax + 0x20]
call edi
push str.Unpatch
lea ecx, [ebx + 0xc0]
call fcn.0041fbb4
mov byte [ebp - 4], 0
or edi, 0xffffffff
mov edx, dword [ebp - 0xe0]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x403310
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x7f00
mov ecx, ebx
call fcn.00404ae0
mov ebx, 1
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x40333f
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.0052e57d
mov esp, ebp
pop ebp
ret