Function at 0x40b4e0
Capabilities:
Create directory
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40c
mov dword [ebp - 0x304], 0
push 0x100
push 0
mov eax, dword [0x42cd90]
push eax
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
mov ecx, dword [0x42cd94]
push ecx
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
mov edx, dword [0x42cd98]
push edx
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
mov eax, dword [0x42cd9c]
push eax
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
mov ecx, dword [0x42cda0]
push ecx
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
mov edx, dword [0x42cda4]
push edx
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
push 0x430f74
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
mov eax, dword [0x42cda8]
push eax
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
mov ecx, dword [0x42cdac]
push ecx
call fcn.00410e60
add esp, 0xc
push 0x100
push 0
mov edx, dword [0x42cdb0]
push edx
call fcn.00410e60
add esp, 0xc
push 0x181
push 0
push 0x436200
call fcn.00410e60
add esp, 0xc
mov eax, dword [0x42cd94]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov dword [ebp - 0x30c], 0
jmp 0x40b60a
mov ecx, dword [ebp - 0x30c]
add ecx, 1
mov dword [ebp - 0x30c], ecx
mov edx, dword [0x42cd94]
push edx
call fcn.00412190
add esp, 4
cmp dword [ebp - 0x30c], eax
ja 0x40b645
mov eax, dword [0x42cd94]
add eax, dword [ebp - 0x30c]
movsx ecx, byte [eax]
cmp ecx, 0x5c
jne 0x40b643
mov edx, dword [0x42cd94]
add edx, dword [ebp - 0x30c]
mov byte [edx], 0x2f
jmp 0x40b5fb
push 0x100
push 0
lea eax, [ebp - 0x100]
push eax
call fcn.00410e60
add esp, 0xc
mov ecx, dword [0x42cd94]
push ecx
push str._s_zxssbc.ini
lea edx, [ebp - 0x100]
push edx
call fcn.00410dfc
add esp, 0xc
lea eax, [ebp - 0x100]
push eax
push 0x43627e
call fcn.00410f50
add esp, 8
lea ecx, [ebp - 0x100]
push ecx
push 0
push str.LanguageID
push 0x42cdd0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x43625a], eax
push 0x100
push 0
lea edx, [ebp - 0x200]
push edx
call fcn.00410e60
add esp, 0xc
lea eax, [ebp - 0x100]
push eax
push 0x100
lea ecx, [ebp - 0x200]
push ecx
push 0
push 0x42cdd8
push 0x42cde0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x304], eax
cmp dword [ebp - 0x304], 0
jne 0x40b6fc
mov dword [0x436211], 0
lea edx, [ebp - 0x200]
push edx
call sub.WS2_32.dll_inet_addr
mov dword [0x436211], eax
cmp dword [0x436211], 0xffffffff
jne 0x40b720
mov dword [0x436211], 0
lea eax, [ebp - 0x100]
push eax
push 0x2382
push 0x42cde8
push 0x42cdf4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov word [0x436215], ax
lea ecx, [ebp - 0x100]
push ecx
push 0x26ac
push 0x42cdfc
push 0x42ce08
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov word [0x436217], ax
push 0x100
push 0
lea edx, [ebp - 0x200]
push edx
call fcn.00410e60
add esp, 0xc
lea eax, [ebp - 0x100]
push eax
push 0x100
lea ecx, [ebp - 0x200]
push ecx
push str._Local_
push 0x42ce18
push 0x42ce24
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x1e
lea edx, [ebp - 0x200]
push edx
push 0x43625e
call fcn.00411580
add esp, 0xc
lea eax, [ebp - 0x100]
push eax
push 0x100
mov ecx, dword [0x42cd90]
push ecx
push 0x431274
push str.CurVersion
push str.Version
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x40b809
push 0x100
push str.Single
mov edx, dword [0x42cd90]
push edx
call fcn.00411580
add esp, 0xc
mov eax, dword [0x42cd94]
mov dword [0x42cd98], eax
jmp 0x40b842
lea ecx, [ebp - 0x100]
push ecx
push 0x100
mov edx, dword [0x42cd98]
push edx
push 0x431278
push str.RootPath
mov eax, dword [0x42cd90]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x40b842
mov ecx, dword [0x42cd94]
mov dword [0x42cd98], ecx
lea edx, [ebp - 0x100]
push edx
push 0x100
mov eax, dword [0x42cd9c]
push eax
push 0x43127c
push str.WorkPath
push 0x42ce60
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x40b879
mov ecx, dword [0x42cd98]
mov dword [0x42cd9c], ecx
mov edx, dword [0x42cd9c]
push edx
push str._s_GC_MGT.ini
mov eax, dword [0x42cda4]
push eax
call fcn.00410dfc
add esp, 0xc
push 0x100
push 0
lea ecx, [ebp - 0x300]
push ecx
call fcn.00410e60
add esp, 0xc
mov edx, dword [0x42cd9c]
push edx
push str._s_log
lea eax, [ebp - 0x300]
push eax
call fcn.00410dfc
add esp, 0xc
push 0
lea ecx, [ebp - 0x300]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea edx, [ebp - 0x300]
push edx
push str._s_except
mov eax, dword [0x42cda0]
push eax
call fcn.00410dfc
add esp, 0xc
push 0
mov ecx, dword [0x42cda0]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edx, dword [0x42cd9c]
push edx
push str._s_module.ini
mov eax, dword [0x42cda8]
push eax
call fcn.00410dfc
add esp, 0xc
mov ecx, dword [0x42cd9c]
push ecx
push str._s_log_SYSTrace.log
mov edx, dword [0x42cdac]
push edx
call fcn.00410dfc
add esp, 0xc
mov eax, dword [0x42cd9c]
push eax
push str._s_log_CFGTrace.log
push 0x430f74
call fcn.00410dfc
add esp, 0xc
mov ecx, dword [0x42cd9c]
push ecx
push str._s_log_COMTrace.log
mov edx, dword [0x42cdb0]
push edx
call fcn.00410dfc
add esp, 0xc
lea eax, [ebp - 0x100]
push eax
push 0x12c
push 0x42ced8
push 0x42cee4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push eax
call fcn.00410bf5
add esp, 4
mov word [0x436200], ax
xor ecx, ecx
mov cx, word [0x436200]
cmp ecx, 1
jl 0x40b9ae
xor edx, edx
mov dx, word [0x436200]
cmp edx, 0x1f4
jle 0x40b9d5
xor eax, eax
mov ax, word [0x436200]
cmp eax, 0x3e9
jl 0x40b9ce
xor ecx, ecx
mov cx, word [0x436200]
cmp ecx, 0x7530
jle 0x40b9d5
xor al, al
jmp 0x40bcba
lea edx, [ebp - 0x100]
push edx
push 1
push 0x42ceec
push 0x42cef8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push eax
call fcn.00410bf5
add esp, 4
mov byte [0x436202], al
xor eax, eax
mov al, byte [0x436202]
cmp eax, 1
jl 0x40ba18
xor ecx, ecx
mov cl, byte [0x436202]
cmp ecx, 0xfe
jle 0x40ba1f
xor al, al
jmp 0x40bcba
lea edx, [ebp - 0x100]
push edx
push 1
push str.IsLeft
push 0x42cf08
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
sub eax, 1
neg eax
sbb eax, eax
inc eax
mov byte [0x436259], al
lea eax, [ebp - 0x100]
push eax
push 0x578
push 0x42cf10
push str.SYSTEM
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov word [0x43620d], ax
xor ecx, ecx
mov cx, word [0x43620d]
cmp ecx, 0x5dc
jle 0x40ba81
mov word [0x43620d], 0x5dc
xor edx, edx
mov dx, word [0x43620d]
cmp edx, 0x1f4
jge 0x40ba9b
mov word [0x43620d], 0x1f4
xor eax, eax
mov ax, word [0x436200]
cmp eax, 1
jl 0x40badf
xor ecx, ecx
mov cx, word [0x436200]
cmp ecx, 0x1f4
jg 0x40badf
mov word [0x43620f], 8
mov word [0x436203], 0x14
mov word [0x436207], 0x3e8
mov word [0x436205], 0
jmp 0x40bb03
mov word [0x43620f], 4
mov word [0x436203], 0
mov word [0x436207], 0xa
mov word [0x436205], 6
mov dword [ebp - 0x308], 0
jmp 0x40bb1e
mov edx, dword [ebp - 0x308]
add edx, 1
mov dword [ebp - 0x308], edx
xor eax, eax
mov ax, word [0x43620f]
sub eax, 1
cmp dword [ebp - 0x308], eax
jge 0x40bc8e
push 0x100
push 0
lea ecx, [ebp - 0x40c]
push ecx
call fcn.00410e60
add esp, 0xc
mov edx, dword [ebp - 0x308]
add edx, 1
push edx
push str.Extern__d
lea eax, [ebp - 0x40c]
push eax
call fcn.00410dfc
add esp, 0xc
push 0x100
push 0
lea ecx, [ebp - 0x200]
push ecx
call fcn.00410e60
add esp, 0xc
lea edx, [ebp - 0x100]
push edx
push 0x100
lea eax, [ebp - 0x200]
push eax
push 0
push str.LocalIP
lea ecx, [ebp - 0x40c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x304], eax
cmp dword [ebp - 0x304], 0
jne 0x40bbc8
mov edx, dword [ebp - 0x308]
mov dword [edx*8 + 0x436219], 0xffffffff
jmp 0x40bbe1
lea eax, [ebp - 0x200]
push eax
call sub.WS2_32.dll_inet_addr
mov ecx, dword [ebp - 0x308]
mov dword [ecx*8 + 0x436219], eax
lea edx, [ebp - 0x100]
push edx
push 0xffff
push str.TCPSvrPort
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [ebp - 0x308]
mov word [ecx*8 + 0x43621d], ax
lea edx, [ebp - 0x100]
push edx
push 0xffff
push str.UDPSvrPort
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [ebp - 0x308]
mov word [ecx*8 + 0x43621f], ax
mov edx, dword [ebp - 0x308]
xor eax, eax
mov ax, word [edx*8 + 0x43621d]
cmp eax, 0xffff
jne 0x40bc89
mov ecx, dword [ebp - 0x308]
xor edx, edx
mov dx, word [ecx*8 + 0x43621f]
cmp edx, 0xffff
jne 0x40bc89
mov eax, dword [ebp - 0x308]
cmp dword [eax*8 + 0x436219], 0xffffffff
jne 0x40bc89
mov ecx, dword [ebp - 0x308]
mov dword [ecx*8 + 0x436219], 0
jmp 0x40bb0f
push 0x43637f
call fcn.0040dd23
add esp, 4
test eax, eax
jne 0x40bcb1
mov word [0x43637f], 0xffff
mov byte [0x43637e], 0
jmp 0x40bcb8
mov byte [0x43637e], 1
mov al, 1
mov esp, ebp
pop ebp
ret