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

Disassembly:
sub esp, 0x360
push ebx
push ebp
lea eax, [esp + 0x264]
push eax
mov ebx, ecx
push 0x104
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ebp, dword [esp + 0x36c]
cmp ebp, dword [ebx + 0x2c]
jl 0x40216a
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret 8
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push ebp
lea ecx, [esp + 0x270]
push ecx
lea edx, [esp + 0x170]
push 0x44cf00
push edx
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 0x10
lea eax, [esp + 0x168]
push eax
push 0xa
lea ecx, [esp + 0x1c]
push ecx
push 0x44cf10
push 0x44cf18
push 0x44cf20
call esi
lea edx, [esp + 0x168]
push edx
push 0x13
lea eax, [esp + 0x38]
push eax
push 0x44cf30
push 0x44cf34
push 0x44cf3c
call esi
lea ecx, [esp + 0x168]
push ecx
push 0x27
lea edx, [esp + 0x4c]
push edx
push 0x44cf40
push 0x44cf44
push 0x44cf50
call esi
mov eax, dword [ebx + ebp*4 + 0x30]
mov ecx, dword [eax + 0x14c3]
test ecx, ecx
jne 0x402221
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x34]
push edx
inc ebp
push ebp
lea eax, [esp + 0x78]
push str.Port_d__s__s_IDLE_
push eax
call edi
add esp, 0x14
jmp 0x4023fb
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x38]
push eax
lea ebx, [ebp + 1]
push ebx
lea ecx, [esp + 0x7c]
push 0x44cf68
push ecx
call edi
mov edx, dword [esp + 0x28]
mov eax, dword [edx + ebp*4 + 0x30]
mov ecx, dword [eax + 0x14bf]
add esp, 0x18
cmp ecx, 2
jne 0x402295
lea ecx, [esp + 0x168]
push ecx
push 0xa
lea edx, [esp + 0x1c]
push edx
push 0x44cf84
push 0x44cf8c
push 0x44cf94
call esi
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x38]
push edx
push ebx
lea eax, [esp + 0x7c]
push 0x44cfa4
push eax
call edi
add esp, 0x18
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + ebp*4 + 0x30]
cmp dword [edx + 0x14bf], 4
jne 0x4022e5
lea eax, [esp + 0x168]
push eax
push 0xa
lea ecx, [esp + 0x1c]
push ecx
push 0x44cfc0
push 0x44cfc8
push 0x44cfd0
call esi
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x38]
push ecx
push ebx
lea edx, [esp + 0x7c]
push 0x44cfe0
push edx
call edi
add esp, 0x18
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + ebp*4 + 0x30]
cmp dword [ecx + 0x14bf], 5
jne 0x402335
lea edx, [esp + 0x168]
push edx
push 0xa
lea eax, [esp + 0x1c]
push eax
push 0x44cffc
push 0x44d004
push 0x44d00c
call esi
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x38]
push eax
push ebx
lea ecx, [esp + 0x7c]
push 0x44d01c
push ecx
call edi
add esp, 0x18
mov edx, dword [esp + 0x10]
mov eax, dword [edx + ebp*4 + 0x30]
cmp dword [eax + 0x14bf], 0xb
jne 0x402385
lea ecx, [esp + 0x168]
push ecx
push 0xa
lea edx, [esp + 0x1c]
push edx
push 0x44d038
push 0x44d040
push 0x44d048
call esi
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x38]
push edx
push ebx
lea eax, [esp + 0x7c]
push 0x44d058
push eax
call edi
add esp, 0x18
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + ebp*4 + 0x30]
cmp dword [edx + 0x14bf], 0xc
jne 0x4023d5
lea eax, [esp + 0x168]
push eax
push 0xa
lea ecx, [esp + 0x1c]
push ecx
push 0x44d074
push 0x44d07c
push 0x44d084
call esi
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x38]
push ecx
push ebx
lea edx, [esp + 0x7c]
push str.Port_d_with__s_On__s__s_
push edx
call edi
add esp, 0x18
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + ebp*4 + 0x30]
cmp dword [ecx + 0x14bf], 0xf
jne 0x4023fb
lea edx, [esp + 0x30]
push edx
push ebx
lea eax, [esp + 0x74]
push str.Port_d_with__s_
push eax
call edi
add esp, 0x10
mov edx, dword [esp + 0x378]
lea ecx, [esp + 0x6c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x360
ret 8