Function at 0x405890
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a3a57
mov eax, dword fs:[0]
push eax
mov eax, 0x190
call fcn.00596bf0
mov eax, dword [0x616930]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x19c], ebx
mov dword [ebp - 0x198], eax
mov dword [ebp - 0x148], 0xf
mov dword [ebp - 0x14c], ebx
mov byte [ebp - 0x15c], bl
push str..DCAgent.reg
push 0x100
lea ecx, [ebp - 0x124]
push ecx
push ebx
push str._ServerHashTime_
mov dword [ebp - 4], ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str.HKEY_LOCAL_MACHINESOFTWAREAdventNetDesktopCentralDCAgentMetadataVersions
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 2
jne 0x40593b
push str..DCAgent.reg
push 0x100
lea edx, [ebp - 0x124]
push edx
push ebx
push str._ServerHashTime_
push str.HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeAdventNetDesktopCentralDCAgentMetadataVersions
call esi
call edi
cmp eax, 2
jne 0x405b08
push str..DCAgent.reg
push 0xa
lea eax, [ebp - 0x20]
push eax
push ebx
push str._DCProductType_
push str.HKEY_LOCAL_MACHINESOFTWAREAdventNetDesktopCentralDCAgent
call esi
call edi
cmp eax, 2
jne 0x40597d
push str..DCAgent.reg
push 0xa
lea ecx, [ebp - 0x20]
push ecx
push ebx
push str._DCProductType_
push str.HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeAdventNetDesktopCentralDCAgent
call esi
mov ecx, 0x5ad508
lea eax, [ebp - 0x20]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4059a5
cmp dl, bl
je 0x4059a1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4059a5
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x405985
xor eax, eax
jmp 0x4059aa
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x405a41
push str..DCAgent.reg
push 0x100
lea edx, [ebp - 0x124]
push edx
push ebx
push str._DCServerFlatName_
push str.HKEY_LOCAL_MACHINESOFTWAREAdventNetDesktopCentralDCAgentServerInfo
call esi
call edi
cmp eax, 2
jne 0x4059f5
push str..DCAgent.reg
push 0x100
lea eax, [ebp - 0x124]
push eax
push ebx
push str._DCServerFlatName_
push str.HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeAdventNetDesktopCentralDCAgentServerInfo
call esi
call edi
cmp eax, 2
jne 0x405a13
push 4
push str.NULL
lea ecx, [ebp - 0x15c]
call fcn.0040b380
jmp 0x405c99
lea eax, [ebp - 0x124]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405a20
sub eax, edx
push eax
lea ecx, [ebp - 0x124]
push ecx
lea ecx, [ebp - 0x15c]
call fcn.0040b380
jmp 0x405c99
mov ecx, 0x5ad558
lea eax, [ebp - 0x20]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405a70
cmp dl, bl
je 0x405a6c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405a70
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x405a50
xor eax, eax
jmp 0x405a75
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x405c99
push str..DCAgent.reg
push 0x100
lea edx, [ebp - 0x124]
push edx
push ebx
push str._CustomerId_
push str.HKEY_LOCAL_MACHINESOFTWAREAdventNetDesktopCentralDCAgent
call esi
call edi
cmp eax, 2
jne 0x405ac0
push str..DCAgent.reg
push 0x100
lea eax, [ebp - 0x124]
push eax
push ebx
push str._CustomerId_
push str.HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeAdventNetDesktopCentralDCAgent
call esi
call edi
cmp eax, 2
jne 0x405ade
push 4
push str.NULL
lea ecx, [ebp - 0x15c]
call fcn.0040b380
jmp 0x405c99
lea eax, [ebp - 0x124]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405ae7
sub eax, edx
push eax
lea ecx, [ebp - 0x124]
push ecx
lea ecx, [ebp - 0x15c]
call fcn.0040b380
jmp 0x405c99
lea eax, [ebp - 0x124]
mov dword [ebp - 0x164], 0xf
mov dword [ebp - 0x168], ebx
mov byte [ebp - 0x178], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405b27
sub eax, edx
push eax
lea edx, [ebp - 0x124]
push edx
lea ecx, [ebp - 0x178]
call fcn.0040b380
push 1
push 0x5ad944
lea eax, [ebp - 0x178]
push eax
mov byte [ebp - 4], 1
call fcn.0040aa90
push ebx
push 0x5ad275
lea ecx, [ebp - 0x140]
mov esi, eax
mov dword [ebp - 0x12c], 0xf
mov dword [ebp - 0x130], ebx
mov byte [ebp - 0x140], bl
call fcn.0040b380
lea ecx, [esi + 1]
push 0xffffffffffffffff
lea esi, [ebp - 0x194]
lea edx, [ebp - 0x178]
mov byte [ebp - 4], 2
call fcn.004090e0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x140]
mov byte [ebp - 4], 3
call fcn.0040a6b0
mov esi, 0x10
mov byte [ebp - 4], 2
cmp dword [ebp - 0x180], esi
jb 0x405bd0
mov ecx, dword [ebp - 0x194]
push ecx
call fcn.0057af7f
add esp, 4
mov eax, dword [ebp - 0x140]
cmp dword [ebp - 0x12c], esi
jae 0x405be4
lea eax, [ebp - 0x140]
push esi
lea edx, [ebp - 0x19c]
push edx
push eax
call fcn.0057d7e0
cdq
add esp, 0xc
push edx
push eax
lea esi, [ebp - 0x194]
call fcn.004029e0
add esp, 8
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x405c14
mov edx, dword [eax]
jmp 0x405c16
mov edx, eax
mov eax, edx
lea esi, [eax + 1]
jmp 0x405c20
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405c20
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x15c]
call fcn.0040b380
mov esi, 0x10
cmp dword [ebp - 0x180], esi
jb 0x405c52
mov eax, dword [ebp - 0x194]
push eax
call fcn.0057af7f
add esp, 4
cmp dword [ebp - 0x12c], esi
jb 0x405c69
mov ecx, dword [ebp - 0x140]
push ecx
call fcn.0057af7f
add esp, 4
mov byte [ebp - 4], bl
mov dword [ebp - 0x12c], 0xf
mov dword [ebp - 0x130], ebx
mov byte [ebp - 0x140], bl
cmp dword [ebp - 0x164], esi
jb 0x405c99
mov edx, dword [ebp - 0x178]
push edx
call fcn.0057af7f
add esp, 4
call edi
cmp eax, 2
jne 0x405cdf
push str.Error_:_Registry_values_not_found__n
call fcn.00402b00
mov esi, dword [ebp - 0x198]
add esp, 4
push 4
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
push str.NULL
mov ecx, esi
mov byte [esi], bl
call fcn.0040b380
cmp dword [ebp - 0x148], 0x10
jb 0x405d17
mov eax, dword [ebp - 0x15c]
push eax
jmp 0x405d0f
mov esi, dword [ebp - 0x198]
lea ecx, [ebp - 0x15c]
push ecx
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov ecx, esi
mov byte [esi], bl
call fcn.0040a630
cmp dword [ebp - 0x148], 0x10
jb 0x405d17
mov edx, dword [ebp - 0x15c]
push edx
call fcn.0057af7f
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0057af8a
mov esp, ebp
pop ebp
ret