Function at 0x402790
Capabilities:
Read .ini file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x468f77
push eax
mov dword fs:[0], esp
sub esp, 0x118
push esi
mov esi, ecx
mov eax, dword [esi + 8]
test eax, eax
je 0x4027d0
mov eax, 1
pop esi
mov ecx, dword [esp + 0x118]
mov dword fs:[0], ecx
add esp, 0x124
ret
push ebp
push 0x104
lea eax, [esp + 0x20]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x10]
call fcn.00402190
mov ebp, dword [esp + 0xc]
push 0x5c
push ebp
mov dword [esp + 0x130], 0
call fcn.00457ed0
add esp, 8
test eax, eax
jne 0x402814
or eax, 0xffffffff
jmp 0x402816
sub eax, ebp
push edi
inc eax
push eax
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x18]
call fcn.00402350
push 0x46e628
push eax
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0x138], 1
call fcn.00402290
mov eax, dword [esp + 0xc]
mov edx, dword [0x486078]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
mov byte [esp + 0x12c], 3
je 0x402878
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x402878
mov eax, dword [esp + 0xc]
add eax, 0xfffffff4
push eax
call fcn.0045850f
add esp, 4
push ebx
mov ebx, dword [esp + 0x20]
push ebx
push 0
push 0x46e61c
push 0x46e60c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
mov dword [esi + 4], eax
jne 0x4028dd
mov eax, dword [0x486078]
lea edx, [ebx - 0xc]
cmp edx, eax
je 0x4028b6
add ebx, 0xfffffff4
push ebx
call edi
test eax, eax
jg 0x4028b6
push ebx
call fcn.0045850f
add esp, 4
mov ecx, dword [0x486078]
lea eax, [ebp - 0xc]
cmp eax, ecx
je 0x4028d6
lea esi, [ebp - 0xc]
push esi
call edi
test eax, eax
jg 0x4028d6
push esi
call fcn.0045850f
add esp, 4
xor eax, eax
jmp 0x402a70
push ebx
push 0x20
lea ecx, [esi + 0x10]
push ecx
push 0x46e600
push 0x46e5f0
push 0x46e60c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov edx, dword [esi + 4]
shl edx, 5
push edx
call fcn.0045812f
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
shl eax, 5
push eax
call fcn.0045812f
mov dword [esi + 0xc], eax
mov eax, dword [esi + 4]
add esp, 8
test eax, eax
jle 0x402a2c
xor edi, edi
mov dword [esp + 0x10], edi
mov ebp, 1
jmp 0x402940
mov edi, dword [esp + 0x10]
jmp 0x402940
mov eax, dword [0x486074]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push ebp
lea ecx, [esp + 0x1c]
push 0x46e5e0
push ecx
mov byte [esp + 0x13c], 5
call fcn.004019f0
push ebp
lea edx, [esp + 0x2c]
push 0x46e5d0
push edx
call fcn.004019f0
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x30]
add esp, 0x18
push ebx
push 0x20
add eax, edi
push eax
push 0x46e5c8
push ecx
push 0x46e60c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov edx, dword [esi + 0xc]
push ebx
push 0x20
add edx, edi
mov edi, dword [esp + 0x24]
push edx
push 0x46e5c8
push edi
push 0x46e60c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [0x486078]
lea eax, [edi - 0xc]
cmp eax, ecx
je 0x4029d8
add edi, 0xfffffff4
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4029d8
push edi
call fcn.0045850f
add esp, 4
mov eax, dword [esp + 0x18]
mov edx, dword [0x486078]
lea ecx, [eax - 0xc]
cmp ecx, edx
mov byte [esp + 0x130], 3
je 0x402a08
lea edi, [eax - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402a08
push edi
call fcn.0045850f
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 4]
inc ebp
add ecx, 0x20
lea edx, [ebp - 1]
cmp edx, eax
mov dword [esp + 0x10], ecx
jl 0x402932
mov ebp, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, dword [0x486078]
lea eax, [ebx - 0xc]
cmp eax, ecx
je 0x402a4c
add ebx, 0xfffffff4
push ebx
call edi
test eax, eax
jg 0x402a4c
push ebx
call fcn.0045850f
add esp, 4
mov eax, dword [0x486078]
lea ecx, [ebp - 0xc]
cmp ecx, eax
je 0x402a6b
lea esi, [ebp - 0xc]
push esi
call edi
test eax, eax
jg 0x402a6b
push esi
call fcn.0045850f
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x128]
pop ebx
pop edi
pop ebp
pop esi
mov dword fs:[0], ecx
add esp, 0x124
ret