Function at 0x4059e0
Capabilities:
Delete file
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x27c
mov eax, dword [0x442184]
push ebx
mov ebx, ecx
mov dword [esp + 0x27c], eax
mov eax, dword [ebx + 0x74]
test eax, eax
push esi
push edi
je 0x405cb7
xor eax, eax
mov byte [esp + 0x70], 0
mov ecx, 0x40
lea edi, [esp + 0x71]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x178], 0
mov ecx, 0x40
lea edi, [esp + 0x179]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov dword [esp + 0x11], eax
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x15], eax
mov dword [esp + 0x31], ecx
mov dword [esp + 0x51], edx
mov dword [esp + 0x19], eax
mov dword [esp + 0x35], ecx
mov dword [esp + 0x55], edx
mov dword [esp + 0x1d], eax
mov dword [esp + 0x39], ecx
mov dword [esp + 0x59], edx
mov dword [esp + 0x21], eax
mov dword [esp + 0x3d], ecx
mov dword [esp + 0x5d], edx
mov dword [esp + 0x25], eax
mov dword [esp + 0x41], ecx
mov dword [esp + 0x61], edx
mov dword [esp + 0x29], eax
mov word [esp + 0x2d], ax
mov dword [esp + 0x45], ecx
mov dword [esp + 0x65], edx
mov byte [esp + 0x2f], al
mov byte [esp + 0x30], al
mov dword [esp + 0x49], ecx
mov dword [esp + 0x69], edx
mov word [esp + 0x4d], cx
push 0x103
lea eax, [esp + 0x74]
mov word [esp + 0x71], dx
push eax
mov byte [esp + 0x18], 0
mov byte [esp + 0x57], cl
mov byte [esp + 0x58], cl
mov byte [esp + 0x77], dl
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x70]
mov byte [esp + eax + 0x178], cl
inc eax
test cl, cl
jne 0x405ad0
lea edi, [esp + 0x70]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405ae5
mov ecx, dword [str.HkApp.ini]
mov edx, dword [0x435078]
mov ax, word [0x43507c]
mov dword [edi], ecx
mov cl, byte [0x43507e]
mov dword [edi + 4], edx
mov word [edi + 8], ax
mov byte [edi + 0xa], cl
lea edi, [esp + 0x178]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405b20
mov edx, dword [str.DesConfig.ini]
mov eax, dword [0x434eec]
mov ecx, dword [0x434ef0]
mov dword [edi], edx
mov dx, word [0x434ef4]
mov dword [edi + 4], eax
mov al, byte [0x434ef6]
mov dword [edi + 8], ecx
mov word [edi + 0xc], dx
mov byte [edi + 0xe], al
mov eax, dword [ebx + 0x8c]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x405bd8
push ecx
lea edx, [esp + 0x74]
mov ecx, esp
mov dword [esp + 0x10], esp
push edx
call fcn.004053e0
mov ecx, ebx
call fcn.00404170
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x70]
push eax
push 0x20
lea ecx, [esp + 0x18]
push ecx
push str.127.0.0.1
push str.Server
push str.HkApp
call esi
lea edx, [esp + 0x70]
push edx
push 0x20
lea eax, [esp + 0x38]
push eax
push str.1999
push str.ServerPort
push str.HkApp
call esi
lea ecx, [esp + 0x70]
push ecx
push 0x20
lea edx, [esp + 0x58]
push edx
push 0x4347f0
push str.AutoLogon
push str.HkApp
call esi
jmp 0x405c1a
lea edx, [esp + 0x10]
sub edx, eax
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405be0
mov eax, dword [ebx + 0x90]
lea edx, [esp + 0x30]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405bf6
mov eax, dword [ebx + 0x94]
lea edx, [esp + 0x50]
sub edx, eax
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405c10
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x14]
push edx
push str.Server
push str.HkApp
call esi
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x34]
push ecx
push str.ServerPort
push str.HkApp
call esi
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x54]
push eax
push str.AutoLogon
push str.HkApp
call esi
push ecx
lea edx, [esp + 0x74]
mov ecx, esp
mov dword [esp + 0x10], esp
push edx
call fcn.004053e0
mov ecx, ebx
call fcn.00404170
lea eax, [esp + 0x178]
push eax
lea ecx, [esp + 0x14]
push ecx
push str.ServerIP
push str.MessageServer
call esi
lea edx, [esp + 0x178]
push edx
lea eax, [esp + 0x14]
push eax
push str.ElectronIP
push str.ElectronServer
call esi
mov ecx, dword [esp + 0x284]
call fcn.00417188
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret