Function at 0x41eae0
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x492932
mov eax, dword fs:[0]
push eax
sub esp, 0x81c
mov eax, dword [0x4b81bc]
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, edx
mov edi, ecx
mov dword [ebp - 0x824], edi
mov dword [ebp - 0x828], 0
call fcn.00403f70
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x41eb3e
push 0x80004005
call fcn.00404990
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x814], esi
lea eax, [ebp - 0x820]
mov dword [ebp - 4], 0
push eax
push 0x20219
push 0
push 0x4aa750
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x820], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41ec11
mov dword [ebp - 0x818], eax
mov ecx, 1
mov dword [ebp - 0x81c], 0x400
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x400
or eax, ecx
jge 0x41ebbd
push 0x400
lea ecx, [ebp - 0x814]
call fcn.004048e0
mov esi, dword [ebp - 0x814]
lea eax, [ebp - 0x81c]
push eax
push esi
lea eax, [ebp - 0x818]
push eax
push 0
push 0x4a78a8
push dword [ebp - 0x820]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esi - 8]
push esi
call fcn.00473092
add esp, 8
test eax, eax
js 0x41ec96
cmp eax, dword [esi - 8]
jg 0x41ec96
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [ebp - 0x820]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41eca0
push ebx
lea ecx, [ebp - 0x818]
call fcn.004038a0
lea eax, [ebp - 0x818]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp - 0x814]
mov ecx, edi
call fcn.0042b340
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov edx, dword [ebp - 0x818]
add esp, 4
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41ec6b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x814]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x41edf6
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x41edf6
push 0x80070057
call fcn.00404990
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.0046ce30
add esp, 0xc
lea eax, [ebp - 0x810]
push 0x400
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x4aa88c
lea ecx, [ebp - 0x81c]
call fcn.004038a0
lea eax, [ebp - 0x810]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x818]
call fcn.004038a0
lea eax, [ebp - 0x81c]
mov byte [ebp - 4], 3
push eax
lea edx, [ebp - 0x818]
lea ecx, [ebp - 0x824]
call fcn.0042b220
add esp, 4
push eax
lea ecx, [ebp - 0x814]
mov byte [ebp - 4], 4
call fcn.00409070
mov byte [ebp - 4], 3
or esi, 0xffffffff
mov edx, dword [ebp - 0x824]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41ed4a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, esi
mov edx, dword [ebp - 0x818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41ed6b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, esi
mov edx, dword [ebp - 0x81c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41ed8c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
lea ecx, [ebp - 0x81c]
call fcn.004038a0
lea eax, [ebp - 0x81c]
mov byte [ebp - 4], 5
push eax
lea edx, [ebp - 0x814]
mov ecx, edi
call fcn.0042b340
mov byte [ebp - 4], 0
add esp, 4
mov edx, dword [ebp - 0x81c]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41edd4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x814]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x41edf6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
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.00439921
mov esp, ebp
pop ebp
ret