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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10023197
mov eax, dword fs:[0]
push eax
sub esp, 0x478
mov eax, dword [0x100330b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.100052a0
lea ebx, [edi + 0x18]
lea esi, [edi + 0x48]
cmp esi, ebx
je 0x10004f6b
push 0xffffffffffffffff
push 0
push ebx
mov ecx, esi
call fcn.10001790
push 0xc
push str.Trumpete.exe
mov ecx, esi
call fcn.10003150
xor eax, eax
mov dword [ebp - 0x424], 7
push 0xffffffffffffffff
push eax
push ebx
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
call fcn.10001790
push 0x10
push str.ConchPicInfo.ini
lea ecx, [ebp - 0x438]
mov dword [ebp - 4], 0
call fcn.10003150
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.1000ebd0
add esp, 0xc
lea eax, [ebp - 0x438]
cmp dword [ebp - 0x424], 8
cmovae eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1000505f
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
cmovae eax, dword [ebp - 0x438]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x100242ac
push str.CfgPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x218], 0
jne 0x10005037
xor ecx, ecx
jmp 0x1000504f
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10005040
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [edi + 0x78]
call fcn.100018b0
cmp dword [edi + 0x88], 0
jne 0x10005216
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.1000ebd0
add esp, 0xc
lea eax, [ebp - 0x468]
mov ecx, edi
push eax
call fcn.10004720
cmp dword [ebp - 0x454], 8
lea ecx, [ebp - 0x420]
push ecx
push str.97b842
push str.XKSetting
lea eax, [ebp - 0x468]
mov byte [ebp - 4], 1
cmovae eax, dword [ebp - 0x468]
mov ecx, edi
push eax
push str.ConchPicture
lea eax, [ebp - 0x450]
push eax
call fcn.10004b90
mov ebx, eax
lea esi, [edi + 0x78]
cmp esi, ebx
je 0x10005110
mov eax, dword [esi + 0x14]
cmp eax, 8
jb 0x100050e9
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.10001a00
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x10005101
mov eax, dword [esi]
jmp 0x10005103
mov eax, esi
xor ecx, ecx
mov word [eax], cx
mov ecx, esi
push ebx
call fcn.10002dc0
mov eax, dword [ebp - 0x43c]
mov byte [ebp - 4], 1
cmp eax, 8
jb 0x10005132
inc eax
lea ecx, [ebp - 0x450]
push eax
push dword [ebp - 0x450]
call fcn.10001a00
cmp dword [esi + 0x10], 0
je 0x100051f6
xor eax, eax
mov dword [ebp - 0x43c], 7
push 0xffffffffffffffff
push eax
push esi
lea ecx, [ebp - 0x450]
mov dword [ebp - 0x440], 0
mov word [ebp - 0x450], ax
call fcn.10001790
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x484]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x450]
mov dword [ebp - 0x484], 0x5c
call fcn.10005bb0
cmp eax, 0xffffffff
jle 0x100051d8
inc eax
mov ecx, esi
push eax
push 0
lea eax, [ebp - 0x480]
push eax
call fcn.10003f60
push eax
mov ecx, esi
call fcn.10004230
lea ecx, [ebp - 0x480]
call fcn.10001140
add edi, 0x90
cmp edi, esi
je 0x100051cc
push 0xffffffffffffffff
push 0
push esi
mov ecx, edi
call fcn.10001790
push str.Calleuo.ini
mov ecx, edi
call fcn.10004300
mov eax, dword [ebp - 0x43c]
cmp eax, 8
jb 0x100051f6
inc eax
lea ecx, [ebp - 0x450]
push eax
push dword [ebp - 0x450]
call fcn.10001a00
mov eax, dword [ebp - 0x454]
cmp eax, 8
jb 0x10005259
inc eax
lea ecx, [ebp - 0x468]
push eax
push dword [ebp - 0x468]
call fcn.10001a00
jmp 0x10005259
push 6
lea esi, [edi + 0x78]
push str.Config
mov ecx, esi
call fcn.10003150
push 1
push 0x1002434c
mov ecx, esi
call fcn.10003150
add edi, 0x90
cmp edi, esi
je 0x1000524b
push 0xffffffffffffffff
push 0
push esi
mov ecx, edi
call fcn.10001790
push 0xe
push str.UseVestige.ini
mov ecx, edi
call fcn.10003150
mov eax, dword [ebp - 0x424]
cmp eax, 8
jb 0x10005277
inc eax
lea ecx, [ebp - 0x438]
push eax
push dword [ebp - 0x438]
call fcn.10001a00
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000be6b
mov esp, ebp
pop ebp
ret