Function at 0x403480
Capabilities:
Get file size
Read .ini file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404d68
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x408028]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x18], esi
push str.KH_7837512
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [0x58a838], eax
test eax, eax
je 0x4034f0
push 0x40
push 0x4060d8
push 0x4060f0
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.KH_7837512
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x58a838], eax
test eax, eax
je 0x4034dc
push 0x405b60
push 0
call dword [sym.imp.MSVCR90.dll__wsetlocale]
add esp, 8
push 0x1000
push 0x5897f0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push 0x5897f0
call dword [sym.imp.MSVCR90.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x403549
xor ecx, ecx
mov word [eax], cx
add eax, 2
mov dword [ebp - 0x14], eax
xor eax, eax
jmp 0x403550
movzx ecx, ax
mov word [eax*2 + 0x5687f0], cx
mov word [eax*2 + 0x5487f0], cx
inc eax
cmp eax, 0xffff
jl 0x403550
mov ebx, dword [sym.imp.MSVCR90.dll_wcscpy_s]
push 0x5897f0
add esi, 0xe8
push 0x800
push esi
call ebx
mov edi, dword [sym.imp.MSVCR90.dll_wcscat_s]
push 0x406120
push 0x800
push esi
call edi
mov edx, dword [ebp - 0x14]
push 0x2e
push edx
call dword [sym.imp.MSVCR90.dll_wcschr]
add esp, 0x20
test eax, eax
je 0x4035af
xor ecx, ecx
mov word [eax], cx
mov edx, dword [ebp - 0x14]
push edx
push 0x800
push esi
call edi
push esi
push 0x800
push 0x5887f0
call ebx
mov ebx, dword [ebp - 0x18]
push esi
add ebx, 0x10e8
push 0x800
push ebx
call dword [sym.imp.MSVCR90.dll_wcscpy_s]
push 0x406124
push 0x800
push esi
call edi
push str..log
push 0x800
push 0x5887f0
call edi
push str..upc
push 0x800
push ebx
call edi
mov eax, dword [0x40815c]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
add esp, 0x48
push esi
push eax
push 0x406174
push 0x408160
call edi
mov ecx, dword [0x58a83c]
push esi
push ecx
push str.Key2
push 0x408160
mov dword [0x40815c], eax
call edi
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push ebx
mov dword [0x58a83c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40371d
lea edx, [ebp - 0x10]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x403716
test bl, 3
jne 0x403716
push ebx
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x403716
push 0
lea eax, [ebp - 0x10]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40370c
mov edx, dword [ebp - 0x10]
cmp edx, ebx
jne 0x40370c
xor eax, eax
shr edx, 1
mov dword [ebp - 0x10], edx
je 0x40370c
lea esp, [esp]
movzx ecx, word [esi + eax*2]
movzx ebx, cx
cmp word [ebx*2 + 0x5487f0], cx
jne 0x4036e2
movzx ecx, word [esi + eax*2]
mov bx, word [esi + eax*2 + 2]
mov word [ecx*2 + 0x5487f0], bx
movzx ecx, word [esi + eax*2 + 2]
movzx ebx, cx
cmp word [ebx*2 + 0x5687f0], cx
jne 0x403705
movzx ecx, word [esi + eax*2 + 2]
mov bx, word [esi + eax*2]
mov word [ecx*2 + 0x5687f0], bx
add eax, 2
cmp eax, edx
jb 0x4036c0
push esi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x20]
push edx
mov dword [ebp - 0x20], 8
mov dword [ebp - 0x1c], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov esi, dword [ebp - 0x18]
mov ecx, esi
call sub.mfc90u.dll_CWinApp::InitInstance
push str.demkd
mov ecx, esi
call sub.mfc90u.dll_CWinApp::SetRegistryKey
mov ecx, esi
call sub.mfc90u.dll_Ordinal_9747
mov ecx, esi
call sub.mfc90u.dll_Ordinal_9761
mov ecx, esi
call sub.mfc90u.dll_Ordinal_9769
mov eax, 1
or edi, 0xffffffff
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x54]
xor ebx, ebx
push eax
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x38], 0xc8
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
call sub.mfc90u.dll_Ordinal_9474
push eax
push 0xffff
mov ecx, 0x58a848
call sub.mfc90u.dll_Ordinal_9636
mov ecx, eax
call sub.mfc90u.dll_Ordinal_13051
push 0x4388
call sub.mfc90u.dll_new
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x4037d4
push eax
call fcn.00402a00
mov ebx, eax
mov dword [ebp - 4], edi
test ebx, ebx
je 0x4034dc
push 0
push 0
mov dword [esi + 0x20], ebx
mov edx, dword [ebx]
mov eax, dword [edx + 0x148]
push 0x20000000
push 0x80
mov ecx, ebx
call eax
test eax, eax
je 0x4034dc
push 0
mov ecx, ebx
call sub.mfc90u.dll_CWnd::ShowWindow
mov ecx, dword [ebx + 0x20]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret