Function at 0x403e20
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42259b
mov eax, dword fs:[0]
push eax
sub esp, 0x878
mov eax, dword [0x42c914]
xor eax, esp
mov dword [esp + 0x870], eax
push ebx
push esi
push edi
mov eax, dword [0x42c914]
xor eax, esp
push eax
lea eax, [esp + 0x888]
mov dword fs:[0], eax
push 0x400
xor ebx, ebx
lea eax, [esp + 0x20]
push ebx
push eax
call fcn.004131a0
add esp, 0xc
lea eax, [esp + 0x1c]
mov dword [esp + 0x890], ebx
call fcn.00402320
push 0x400
lea ecx, [esp + 0x20]
push ebx
push ecx
call fcn.004131a0
add esp, 0xc
lea esi, [esp + 0x1c]
call fcn.004023e0
push str.lhfpeizics
mov edx, esi
push 0x400
push edx
call fcn.0040d7c9
add esp, 0xc
cmp byte [esp + 0x1c], bl
je 0x403f70
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
xor eax, eax
mov dword [esp + 0x45d], eax
mov dword [esp + 0x461], eax
mov dword [esp + 0x465], eax
mov dword [esp + 0x469], eax
mov dword [esp + 0x46d], eax
mov dword [esp + 0x471], eax
mov dword [esp + 0x475], eax
mov word [esp + 0x479], ax
mov byte [esp + 0x47b], al
mov eax, esi
push eax
push 0x20
lea ecx, [esp + 0x464]
push ecx
push 0x4264cf
push 0x4269a0
push str.peizics
mov byte [esp + 0x474], bl
call edi
test eax, eax
je 0x403f70
lea eax, [esp + 0x45c]
lea edx, [eax + 1]
jmp 0x403f40
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403f40
sub eax, edx
push eax
lea esi, [esp + 0x460]
lea ebx, [esp + 0x20]
call fcn.004024e0
test al, al
je 0x403f70
mov edx, esi
push edx
call fcn.0040d7be
add esp, 4
cmp eax, 0x173e9
je 0x403f7d
mov eax, dword [esp + 0x44c]
push eax
jmp 0x4046d5
push 0x400
lea ecx, [esp + 0x20]
push 0
push ecx
call fcn.004131a0
add esp, 0xc
lea esi, [esp + 0x1c]
call fcn.004023e0
push str.lhfGameFileName1.ini
mov edx, esi
push 0x400
push edx
call fcn.0040d7c9
add esp, 0xc
cmp byte [esp + 0x1c], 0
je 0x40409f
xor eax, eax
mov dword [esp + 0x45d], eax
mov dword [esp + 0x461], eax
mov dword [esp + 0x465], eax
mov dword [esp + 0x469], eax
mov dword [esp + 0x46d], eax
mov dword [esp + 0x471], eax
mov dword [esp + 0x475], eax
mov word [esp + 0x479], ax
mov byte [esp + 0x47b], al
mov eax, esi
push eax
push 0x20
lea ecx, [esp + 0x464]
push ecx
push 0x4264cf
push 0x4269ac
push str.lhfCheck
mov byte [esp + 0x474], 0
call edi
test eax, eax
je 0x40409f
lea edx, [esp + 0x45c]
push edx
call fcn.0040d7be
add esp, 4
cmp ax, 0x63
je 0x4040a4
push eax
push ecx
push 0x4269bc
push 0x42ebc0
call fcn.00401d90
add esp, 0xc
push eax
call fcn.004047b0
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00404b80
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x404086
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x404086
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x4046c0
mov eax, dword [ecx + 0xc]
or eax, edi
jmp 0x4046af
or eax, 0xffffffff
jmp 0x40403c
push 1
call fcn.00402aa0
add esp, 4
push 0x426ab4
call fcn.0040de9e
add esp, 4
push str.......
push 0x42ebc0
call fcn.00401d90
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00404b80
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x4040fd
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x4040fd
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40411e
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x404116
or eax, 4
push 0
push eax
call fcn.004015f0
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00402ed0
push 0x3ff
lea edx, [esp + 0x481]
push 0
push edx
or edi, 0xffffffff
mov byte [esp + 0x488], 0
call fcn.004131a0
xor esi, esi
add esp, 0xc
cmp byte [esp + 0x1c], 0
mov dword [esp + 0x14], esi
je 0x4041e5
xor eax, eax
mov dword [esp + 0x45d], eax
mov dword [esp + 0x461], eax
mov dword [esp + 0x465], eax
mov dword [esp + 0x469], eax
mov dword [esp + 0x46d], eax
mov dword [esp + 0x471], eax
mov dword [esp + 0x475], eax
mov word [esp + 0x479], ax
mov byte [esp + 0x47b], al
lea eax, [esp + 0x1c]
push eax
push 0x20
lea ecx, [esp + 0x464]
push ecx
push 0x4264cf
push str.NeedK
push str.GameFN1
mov byte [esp + 0x474], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x4041e5
lea edx, [esp + 0x45c]
push edx
call fcn.0040d7be
add esp, 4
jmp 0x4041ea
mov eax, 1
movzx ecx, ax
mov dword [esp + 0x18], ecx
test ax, ax
jne 0x4041fb
mov edi, 0x31af9c1
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp word [esp + 0x18], 0
je 0x4042cc
lea ecx, [ecx]
push 0x400
lea edx, [esp + 0x480]
push 0
push edx
call fcn.004131a0
add esp, 0xc
push 0x4269e0
push 0x42ebc0
call fcn.00401d90
add esp, 8
lea edi, [esp + 0x47c]
call fcn.004017c0
test al, al
je 0x4042c0
mov eax, edi
push eax
call fcn.0040d7be
add esp, 4
mov edi, eax
test si, si
jne 0x404292
test edi, edi
je 0x4042d4
cmp edi, 1
je 0x4042d4
cmp edi, 2
je 0x4042d4
cmp edi, 3
je 0x4042d4
cmp edi, 4
je 0x4042d4
cmp edi, 5
je 0x4042d4
cmp edi, 6
je 0x4042d4
cmp edi, 7
je 0x4042d4
cmp edi, 0x31af9c1
je 0x4042d4
cmp edi, 0x1f0dc18a
jmp 0x4042be
cmp si, 1
jne 0x4042d4
cmp edi, 1
je 0x4042d4
cmp edi, 2
je 0x4042d4
cmp edi, 3
je 0x4042d4
cmp edi, 4
je 0x4042d4
cmp edi, 5
je 0x4042d4
cmp edi, 6
je 0x4042d4
cmp edi, 7
je 0x4042d4
cmp edi, 8
je 0x4042d4
mov eax, esi
call fcn.004037e0
jmp 0x404210
mov dword [esp + 0x18], 0xfffffff7
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test si, si
jne 0x404401
cmp edi, 0x31af9c1
jg 0x40438d
je 0x404350
lea eax, [edi - 1]
cmp eax, 6
ja case.default.0x404308
jmp dword [eax*4 + 0x404704]
call fcn.004029c0
jmp 0x404378
call fcn.004027e0
push 1
call fcn.00402aa0
add esp, 4
jmp 0x404378
call fcn.004029c0
push 0
call fcn.00402aa0
add esp, 4
jmp 0x404378
mov esi, 1
mov dword [esp + 0x14], esi
call fcn.00403570
mov edi, 0x31af9c1
jmp 0x404201
cmp word [esp + 0x18], 0xfff7
jne 0x404369
push 0x426ab4
call fcn.0040de9e
add esp, 4
xor edi, edi
jmp 0x40436e
call fcn.00402ed0
call fcn.004038f0
call fcn.004027e0
cmp edi, 0x31af9c1
jne 0x40464d
mov esi, dword [esp + 0x14]
jmp 0x4041fb
cmp edi, 0x1f0dc18a
je 0x40463e
push 0x4269e4
push 0x42ebc0
call fcn.00401d90
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00404b80
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
xor ebx, ebx
test byte [eax + esi + 0xc], 6
jne 0x4043db
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x4043db
mov ebx, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test ebx, ebx
je 0x404378
mov eax, dword [ecx + 0xc]
or eax, ebx
cmp dword [ecx + 0x38], 0
jne 0x4043f4
or eax, 4
push 0
push eax
call fcn.004015f0
jmp 0x404378
cmp si, 1
jne 0x404378
push 0x400
lea edx, [esp + 0x20]
push 0
push edx
call fcn.004131a0
add esp, 0xc
lea esi, [esp + 0x1c]
call fcn.004023e0
push str.GCOMSet.ini
mov eax, esi
push 0x400
push eax
call fcn.0040d7c9
add esp, 0xc
cmp byte [esp + 0x1c], 0
je 0x40453e
xor eax, eax
push edi
push 0x4264d0
lea edx, [esp + 0x464]
mov byte [esp + 0x464], 0
mov dword [esp + 0x465], eax
mov dword [esp + 0x469], eax
mov dword [esp + 0x46d], eax
mov dword [esp + 0x471], eax
mov dword [esp + 0x475], eax
mov dword [esp + 0x479], eax
mov dword [esp + 0x47d], eax
mov word [esp + 0x481], ax
mov byte [esp + 0x483], al
call fcn.00402580
add esp, 8
mov ecx, esi
push ecx
lea edx, [esp + 0x460]
push edx
push str.GCOM
push str.aplayer
call ebx
cmp byte [esp + 0x1c], 0
je 0x40453e
xor eax, eax
mov dword [esp + 0x45d], eax
mov dword [esp + 0x461], eax
mov dword [esp + 0x465], eax
mov dword [esp + 0x469], eax
mov dword [esp + 0x46d], eax
mov dword [esp + 0x471], eax
mov dword [esp + 0x475], eax
mov word [esp + 0x479], ax
mov byte [esp + 0x47b], al
lea eax, [edi + 1]
push eax
push 0x4264d0
lea edx, [esp + 0x464]
mov byte [esp + 0x464], 0
call fcn.00402580
add esp, 8
mov ecx, esi
push ecx
lea edx, [esp + 0x460]
push edx
push str.GCOM2
push str.aplayer
call ebx
push 0xa
mov ecx, 0x42ebc0
call fcn.00404b80
mov eax, dword [0x42ebc0]
mov eax, dword [eax + 4]
xor esi, esi
test byte [eax + 0x42ebcc], 6
jne 0x404576
mov eax, dword [eax + 0x42ebf8]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x404576
mov esi, 4
mov ecx, dword [0x42ebc0]
mov ecx, dword [ecx + 4]
add ecx, 0x42ebc0
test esi, esi
je 0x40459f
mov eax, dword [ecx + 0xc]
or eax, esi
cmp dword [ecx + 0x38], 0
jne 0x404597
or eax, 4
push 0
push eax
call fcn.004015f0
push 0x426a18
push ecx
push edi
push ecx
push 0x426a24
push 0x42ebc0
call fcn.00401d90
add esp, 0xc
push eax
call fcn.004049a0
add esp, 4
push eax
call fcn.00401d90
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00404b80
mov edx, dword [esi]
mov eax, dword [edx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x4045fb
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x4045fb
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40461c
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x404614
or eax, 4
push 0
push eax
call fcn.004015f0
push str.pause
call fcn.0040de9e
add esp, 4
call fcn.00402ed0
xor esi, esi
mov dword [esp + 0x14], esi
mov edi, 0x31af9c1
jmp 0x404201
call fcn.00402ed0
call fcn.00403d60
call fcn.004029c0
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xf
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
push 0xa
mov ecx, 0x42ebc0
call fcn.00404b80
mov edx, dword [0x42ebc0]
mov eax, dword [edx + 4]
xor esi, esi
test byte [eax + 0x42ebcc], 6
jne 0x404697
mov eax, dword [eax + 0x42ebf8]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x404697
mov esi, 4
mov ecx, dword [0x42ebc0]
mov ecx, dword [ecx + 4]
add ecx, 0x42ebc0
test esi, esi
je 0x4046c0
mov eax, dword [ecx + 0xc]
or eax, esi
cmp dword [ecx + 0x38], 0
jne 0x4046b8
or eax, 4
push 0
push eax
call fcn.004015f0
push str.pause
call fcn.0040de9e
mov edx, dword [esp + 0x450]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov ecx, dword [esp + 0x888]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x870]
xor ecx, esp
call fcn.0040cf5f
mov esp, ebp
pop ebp
ret