Function at 0x5046f0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5abbdc
mov eax, dword fs:[0]
push eax
sub esp, 0xa50
mov eax, dword [0x608554]
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 eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push ecx
push str.CBaseMsgMgr::GetDebugMsg
lea ecx, [ebp - 0xa50]
mov dword [ebp - 0xa5c], edi
mov dword [ebp - 0xa54], eax
call fcn.0040a480
mov dword [ebp - 4], 0
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x504788
test byte [ecx + 0x1c], 1
je 0x504788
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5dc934
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x10
call fcn.00401840
add esp, 0xc
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00571c00
push 0x800
lea eax, [ebp - 0xa18]
push 0
push eax
call fcn.00571c00
add esp, 0x18
lea eax, [ebp - 0x218]
xor ebx, ebx
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x504962
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.00571054
add esp, 8
push 0x5c8da0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x218]
push 0x5c692c
push eax
call esi
push str.DebugSettings.ini
lea eax, [ebp - 0x218]
push eax
call esi
call fcn.00550b4e
mov ecx, eax
test ecx, ecx
je 0x504a5c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xa58], eax
push dword [ebp + 0x10]
lea eax, [ebp - 0xa58]
mov byte [ebp - 4], 1
push str.INPUT__d
push eax
call fcn.00408a60
add esp, 0xc
mov ecx, dword [0x608f30]
mov esi, dword [ebp - 0xa58]
cmp ecx, 0x608f30
je 0x50491e
test byte [ecx + 0x1c], 4
je 0x50489a
cmp dword [0x608f68], 8
lea edx, [ebp - 0x218]
push edx
mov eax, 0x608f54
mov edx, 0x5dc934
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
lea ecx, [ebx + 0x11]
call fcn.00405920
mov ecx, dword [0x608f30]
add esp, 0x10
cmp ecx, 0x608f30
je 0x50491e
test byte [ecx + 0x1c], 4
mov ebx, dword [ebp - 0xa54]
je 0x5048e1
cmp dword [0x608f68], 8
mov eax, 0x608f54
push ebx
cmovae eax, dword [0x608f54]
mov edx, 0x5dc934
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x12
call fcn.00405920
mov ecx, dword [0x608f30]
add esp, 0x10
cmp ecx, 0x608f30
je 0x504924
test byte [ecx + 0x1c], 4
je 0x504924
cmp dword [0x608f68], 8
mov eax, 0x608f54
push esi
cmovae eax, dword [0x608f54]
mov edx, 0x5dc934
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x13
call fcn.00405920
add esp, 0x10
jmp 0x504924
mov ebx, dword [ebp - 0xa54]
lea eax, [ebp - 0x218]
push eax
push 0x400
lea eax, [ebp - 0xa18]
push eax
push 0x5c6930
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebx, eax
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x504962
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 0xa4c], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x5049a9
test byte [ecx + 0x1c], 1
je 0x5049a9
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5dc934
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x14
call fcn.00401840
add esp, 0xc
call fcn.00550b4e
mov ecx, eax
test ebx, ebx
je 0x504a09
test ecx, ecx
je 0x504a66
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0xa18]
mov byte [ebp - 4], 2
test eax, 0xffff0000
jne 0x5049e4
movzx eax, ax
mov ecx, edi
push eax
call fcn.00403020
jmp 0x504a31
lea ecx, [ebp - 0xa18]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5049f0
sub ecx, edx
lea eax, [ebp - 0xa18]
sar ecx, 1
push ecx
push eax
jmp 0x504a2a
test ecx, ecx
je 0x504a70
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
mov eax, 0x5c6930
mov byte [ebp - 4], 3
test eax, 0xffff0000
je 0x5049d7
push 0
push eax
mov ecx, edi
call fcn.00403bb0
lea ecx, [ebp - 0xa50]
call fcn.0040a570
mov eax, edi
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.0056d977
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.004013a0
push 0x80004005
call fcn.004013a0
push 0x80004005
call fcn.004013a0
int3