Function at 0x407150
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x49c
mov eax, dword [0x43e0a0]
xor eax, esp
mov dword [esp + 0x494], eax
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebp, ebp
cmp edi, ebp
jne 0x407190
push str.KG_GetVersionType
push 0x1c
push str.pszRetBuffer
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
push 0x104
lea eax, [esp + 0x94]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, ebp
jg 0x4071c8
push str.KG_GetVersionType
push 0x22
push str.nRetCode___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
cmp eax, 0x104
jb 0x4071ef
push str.KG_GetVersionType
push 0x23
push str.nRetCode____countof_szApplicationPath_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
lea ecx, [esp + 0x90]
push 0x5c
push ecx
call fcn.00416b85
add esp, 8
cmp eax, ebp
jne 0x407225
push str.KG_GetVersionType
push 0x26
push str.pchLastSlash
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
push str.version.cfg
lea edx, [esp + 0x94]
push edx
push 0x435c44
mov word [eax + 2], bp
lea eax, [esp + 0x2a4]
push 0x104
push eax
call fcn.00416bb5
add esp, 0x14
cmp eax, ebp
jg 0x407274
push str.KG_GetVersionType
push 0x2d
push str.nRetCode___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
cmp eax, 0x104
jb 0x40729b
push str.KG_GetVersionType
push 0x2e
push str.nRetCode____countof_szVersionCfgFileName_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [esp + 0x298]
push ecx
push 0x40
push edi
push ebp
push str.Sword3.VersionLineName
push str.Version
call ebx
cmp eax, ebp
jg 0x4072dd
push str.KG_GetVersionType
push 0x34
push str.nRetCode___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
cmp eax, 0x40
jle 0x407302
push str.KG_GetVersionType
push 0x35
push str.nRetCode____int_uLeftBufferSize
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
lea edx, [esp + 0x298]
push edx
push 0x40
mov esi, 0x40
sub esi, eax
lea edi, [edi + eax*2]
lea eax, [esp + 0x18]
push eax
push ebp
push str.Sword3.versionex
push str.Version
call ebx
cmp eax, ebp
je 0x4073b1
cmp eax, 0x40
jb 0x407352
push str.KG_GetVersionType
push 0x40
push str.nRetCode____countof_szExVersionType_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
cmp esi, ebp
ja 0x407373
push str.KG_GetVersionType
push 0x42
push str.uLeftBufferSize___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
sub esi, 1
push esi
lea ecx, [esp + 0x14]
mov word [edi], 0x5f
push ecx
add edi, 2
push edi
call fcn.00416872
add esp, 0xc
cmp word [edi + esi*2 - 2], bp
je 0x4073b1
push str.KG_GetVersionType
push 0x48
push str.pszWritePos_uLeftBufferSize__1_____T_0_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4073b6
mov ebp, 1
mov ecx, dword [esp + 0x4a4]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
xor ecx, esp
call fcn.00416863
add esp, 0x49c
ret