Function at 0x405550
Capabilities:
Read .ini file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4e2379
mov eax, dword fs:[0]
push eax
sub esp, 0x318
mov eax, dword [0x515854]
xor eax, esp
mov dword [esp + 0x310], eax
push ebx
push esi
push edi
mov eax, dword [0x515854]
xor eax, esp
push eax
lea eax, [esp + 0x328]
mov dword fs:[0], eax
xor ebx, ebx
mov edi, ecx
mov eax, 7
mov dword [esp + 0x20], edi
mov dword [esp + 0x110], eax
mov dword [esp + 0x10c], ebx
mov word [esp + 0xfc], bx
mov dword [esp + 0x330], ebx
push 0xd
push str.ExeConfig.ini
lea esi, [esp + 0x30]
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], ebx
mov word [esp + 0x34], bx
call fcn.00407ef0
lea esi, [edi + 0x308]
push esi
lea edi, [esp + 0x80]
mov byte [esp + 0x334], 1
mov dword [esp + 0x20], esi
call fcn.0043eabf
add esp, 4
lea ecx, [esp + 0x28]
push ecx
push eax
lea ecx, [esp + 0xc8]
mov byte [esp + 0x338], 2
call fcn.0043e96d
add esp, 8
mov edi, 8
cmp dword [esp + 0x94], edi
jb 0x405634
mov edx, dword [esp + 0x80]
push edx
call fcn.004b6eae
add esp, 4
mov dword [esp + 0x94], 7
mov dword [esp + 0x90], ebx
mov word [esp + 0x80], bx
mov byte [esp + 0x330], 5
cmp dword [esp + 0x40], edi
jb 0x405669
mov eax, dword [esp + 0x2c]
push eax
call fcn.004b6eae
add esp, 4
lea ecx, [esp + 0xc0]
push ecx
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], ebx
mov word [esp + 0x30], bx
call fcn.0043ec8b
add esp, 4
test al, al
je 0x405858
push 0x206
lea edx, [esp + 0x11a]
push ebx
push edx
mov word [esp + 0x120], bx
call fcn.004b9920
mov eax, dword [esp + 0xd0]
add esp, 0xc
cmp dword [esp + 0xd8], edi
jae 0x4056c7
lea eax, [esp + 0xc4]
push eax
push 0x104
lea eax, [esp + 0x11c]
push eax
push 0x4ec52c
push str.ExeIcon
push str.setup
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x114]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4056f4
sub eax, edx
sar eax, 1
jne 0x405758
cmp dword [esp + 0xd8], edi
jb 0x40571e
mov ecx, dword [esp + 0xc4]
push ecx
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0x110], edi
mov dword [esp + 0xd8], 7
mov dword [esp + 0xd4], ebx
mov word [esp + 0xc4], bx
jb 0x405751
mov edx, dword [esp + 0xfc]
push edx
call fcn.004b6eae
add esp, 4
xor al, al
jmp 0x405b18
lea eax, [esp + 0x114]
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405773
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x118]
push eax
lea esi, [esp + 0x4c]
call fcn.00407ef0
mov ecx, dword [esp + 0x1c]
push ecx
lea edi, [esp + 0x64]
mov byte [esp + 0x334], 6
call fcn.0043eabf
add esp, 4
mov edx, esi
push edx
push eax
lea ecx, [esp + 0xa0]
mov byte [esp + 0x338], 7
call fcn.0043e96d
add esp, 8
push 0xffffffffffffffff
push ebx
push eax
lea eax, [esp + 0x104]
mov byte [esp + 0x33c], 8
call fcn.00401690
mov esi, 8
cmp dword [esp + 0xb0], esi
jb 0x4057fe
mov eax, dword [esp + 0x9c]
push eax
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0x78], esi
mov edi, 7
mov dword [esp + 0xb0], edi
mov dword [esp + 0xac], ebx
mov word [esp + 0x9c], bx
jb 0x40582c
mov ecx, dword [esp + 0x64]
push ecx
call fcn.004b6eae
add esp, 4
mov byte [esp + 0x330], 5
cmp dword [esp + 0x5c], esi
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], bx
jb 0x405854
mov edx, dword [esp + 0x48]
push edx
call fcn.004b6eae
add esp, 4
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0xdc]
call fcn.0043046f
mov byte [esp + 0x330], 9
mov edi, dword [esp + 0x20]
lea eax, [edi + 0x2b4]
push eax
lea ecx, [esp + 0xe0]
push ecx
lea ecx, [esp + 0x68]
call fcn.0043e96d
add esp, 8
push 0xffffffffffffffff
push ebx
push eax
lea eax, [esp + 0xe8]
mov byte [esp + 0x33c], 0xa
call fcn.00401690
mov byte [esp + 0x330], 9
cmp dword [esp + 0x78], 8
jb 0x4058bf
mov edx, dword [esp + 0x64]
push edx
call fcn.004b6eae
add esp, 4
push 4
push 0x4ec9bc
lea ecx, [esp + 0xe4]
call fcn.00407df0
mov dword [esp + 0x14], vtable.GameMgr::GMFile.0
mov dword [esp + 0x18], 0xffffffff
lea ecx, [esp + 0x14]
mov byte [esp + 0x330], 0xb
call dword [0x4f2d74]
cmp dword [esi + 0x18], 8
jb 0x4058ff
mov esi, dword [esi + 4]
jmp 0x405902
add esi, 4
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x405980
push ebx
call fcn.004b761d
add esp, 4
mov dword [esp + 0x24], eax
lea eax, [esp + 0xb4]
push eax
push 2
push ebx
push ebx
lea ecx, [esp + 0x24]
mov dword [esp + 0x30], ebx
call fcn.00430b88
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
je 0x405980
push ebx
lea ecx, [esp + 0x24]
push ecx
push 4
lea edx, [esp + 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
je 0x405980
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x405980
mov dword [esp + 0x18], 0xffffffff
push 2
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov byte [esp + 0x330], 0xc
push ebx
push 0x4ec52c
lea esi, [esp + 0x4c]
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], ebx
mov word [esp + 0x50], bx
call fcn.00407ef0
mov byte [esp + 0x330], 0xd
push ebx
push 0x4ec52c
lea esi, [esp + 0x30]
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], ebx
mov word [esp + 0x34], bx
call fcn.00407ef0
mov esi, 8
mov byte [esp + 0x330], 0xe
cmp dword [edi + 0x304], esi
jb 0x4059f6
mov eax, dword [edi + 0x2f0]
jmp 0x4059fc
lea eax, [edi + 0x2f0]
push ebx
push eax
push ebx
lea eax, [esp + 0x104]
push eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x3c]
push edx
push eax
lea ecx, [esp + 0xf8]
call fcn.00435d3f
cmp dword [esp + 0x40], esi
mov byte [esp + 0x13], al
jb 0x405a39
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0x5c], esi
mov edi, 7
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], ebx
mov word [esp + 0x2c], bx
jb 0x405a5e
mov edx, dword [esp + 0x48]
push edx
call fcn.004b6eae
add esp, 4
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], bx
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
mov dword [esp + 0x14], vtable.GameMgr::GMFile.0
je 0x405a95
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x405a95
mov dword [esp + 0x18], 0xffffffff
cmp dword [esp + 0xf4], esi
mov dword [esp + 0x14], vtable.GameMgr::GMBaseFile.0
jb 0x405ab6
mov eax, dword [esp + 0xe0]
push eax
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0xd8], esi
mov dword [esp + 0xf4], edi
mov dword [esp + 0xf0], ebx
mov word [esp + 0xe0], bx
jb 0x405ae5
mov ecx, dword [esp + 0xc4]
push ecx
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0x110], esi
mov dword [esp + 0xd8], edi
mov dword [esp + 0xd4], ebx
mov word [esp + 0xc4], bx
jb 0x405b14
mov edx, dword [esp + 0xfc]
push edx
call fcn.004b6eae
add esp, 4
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x328]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x310]
xor ecx, esp
call fcn.004b6e9f
mov esp, ebp
pop ebp
ret