Function at 0x405fb0
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4210c6
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x43c], eax
push ebx
push ebp
push esi
mov eax, dword [0x42b1d0]
xor eax, esp
push eax
lea eax, [esp + 0x450]
mov dword fs:[0], eax
push str.WritRegKeyToConfig_enter
call fcn.004124a0
add esp, 4
lea ecx, [esp + 0x14]
call fcn.0040fd30
xor ebx, ebx
mov dword [esp + 0x458], ebx
cmp dword [esp + 0x28], ebx
jne 0x406037
push str.GetModuleDirectory_error
call fcn.00412560
add esp, 4
cmp dword [esp + 0x2c], 0x10
jb 0x406030
mov eax, dword [esp + 0x18]
push eax
call fcn.0041288e
add esp, 4
xor eax, eax
jmp 0x4062cd
push 5
push str.log_
lea eax, [esp + 0x1c]
call fcn.00401740
mov eax, str.RegDir.dat
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406050
sub eax, edx
push eax
push str.RegDir.dat
lea eax, [esp + 0x1c]
call fcn.00401740
push 0x400
lea ecx, [esp + 0x50]
push ebx
push ecx
call fcn.004183e0
mov eax, dword [esp + 0x24]
mov ebp, 0x10
add esp, 0xc
cmp dword [esp + 0x2c], ebp
jae 0x40608e
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
mov eax, dword [esp + 0x18]
je 0x4061ca
cmp dword [esp + 0x2c], ebp
jae 0x4060ab
lea eax, [esp + 0x18]
push 0x42422c
push eax
call fcn.00413b3c
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x4060f9
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x2c], ebp
jae 0x4060cd
lea eax, [esp + 0x18]
push eax
push str.open_file__s_error
call fcn.00412560
add esp, 8
cmp dword [esp + 0x2c], ebp
jb 0x406030
mov edx, dword [esp + 0x18]
push edx
call fcn.0041288e
add esp, 4
xor eax, eax
jmp 0x4062cd
push esi
push 0x3ff
lea eax, [esp + 0x54]
push 1
push eax
call fcn.00413df3
push esi
call fcn.00413fbe
add esp, 0x14
lea ecx, [esp + 0x4c]
push edi
push ecx
call fcn.00413540
add esp, 8
test eax, eax
je 0x406141
push str.this_PID_is_exist...
call fcn.004124a0
add esp, 4
lea ecx, [esp + 0x14]
call fcn.00401570
jmp 0x4062c8
lea eax, [esp + 0x4c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406148
sub eax, edx
mov edx, 0x3ff
sub edx, eax
push edx
lea eax, [esp + 0x50]
push 0x424d4c
push eax
call fcn.00413340
lea eax, [esp + 0x58]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406172
sub eax, edx
mov ecx, 0x3ff
sub ecx, eax
push ecx
lea edx, [esp + 0x50]
push edi
push edx
call fcn.00413340
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp dword [esp + 0x2c], ebp
jae 0x40619f
lea eax, [esp + 0x18]
push 0x424d50
push eax
call fcn.00413b3c
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x4062a8
lea eax, [esp + 0x4c]
push eax
push esi
call fcn.00413f2c
add esp, 8
jmp 0x406296
cmp dword [esp + 0x2c], ebp
jae 0x4061d4
lea eax, [esp + 0x18]
push 0x424d50
push eax
call fcn.00413b3c
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406222
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x2c], ebp
jae 0x4061f6
lea eax, [esp + 0x18]
push eax
push str.open_file__s_error
call fcn.00412560
add esp, 8
cmp dword [esp + 0x2c], ebp
jb 0x406030
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0041288e
add esp, 4
xor eax, eax
jmp 0x4062cd
push str._REG_DIR__nvalue
lea ecx, [esp + 0x34]
call fcn.00401500
mov eax, edi
mov byte [esp + 0x458], 1
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406240
sub eax, edx
push eax
push edi
lea eax, [esp + 0x38]
call fcn.00401740
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x48], ebp
jae 0x406262
lea eax, [esp + 0x34]
push eax
push esi
call fcn.00413e10
add esp, 8
mov byte [esp + 0x458], bl
cmp dword [esp + 0x48], ebp
jb 0x406286
mov edx, dword [esp + 0x34]
push edx
call fcn.0041288e
add esp, 4
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
push esi
call fcn.00413750
add esp, 4
push esi
call fcn.00413fbe
add esp, 4
push str.WritRegKeyToConfig_leave
call fcn.004124a0
add esp, 4
cmp dword [esp + 0x2c], ebp
jb 0x4062c8
mov eax, dword [esp + 0x18]
push eax
call fcn.0041288e
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x450]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x43c]
xor ecx, esp
call fcn.00412899
add esp, 0x44c
ret