Function at 0x100040a0
Capabilities:
Check if file exists
Delete file
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100085f4
mov eax, dword fs:[0]
push eax
sub esp, 0x820
mov eax, dword [0x1000c018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [esi + 8]
mov eax, dword [eax - 0xc]
lea edi, [esi + 8]
mov dword [ebp - 0x820], ecx
test eax, eax
je 0x100044a2
mov edx, dword [esi]
cmp dword [edx - 0xc], 0
je 0x100044a2
mov eax, dword [esi + 4]
cmp dword [eax - 0xc], 0
je 0x100044a2
cmp dword [ecx + 0xc], 0
je 0x10004305
lea ecx, [ebp - 0x824]
push edi
push ecx
mov ebx, 0x100096f4
call fcn.100058b0
xor ebx, ebx
push 0x7fc
lea edx, [ebp - 0x80c]
push ebx
mov dword [ebp - 4], ebx
push edx
mov dword [ebp - 0x810], ebx
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 0x820]
mov eax, dword [eax + 0x14]
add esp, 0x14
push eax
push 0x7ff
lea ecx, [ebp - 0x810]
push ecx
push ebx
push 0x10009700
push 0x100094e4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [ebp - 0x818]
push edx
lea ecx, [ebp - 0x810]
call fcn.100054d0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x818]
cmp dword [eax - 0xc], ebx
je 0x100042be
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100042be
lea eax, [ebp - 0x818]
push eax
lea ecx, [ebp - 0x814]
push ecx
mov ebx, 0x10009710
call fcn.100058b0
lea edx, [ebp - 0x824]
push edx
lea ecx, [ebp - 0x81c]
push ecx
mov ebx, eax
mov byte [ebp - 4], 2
call fcn.10005800
add esp, 0x10
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 3
call fcn.10005580
lea eax, [ebp - 0x81c]
call fcn.10005eb0
lea eax, [ebp - 0x814]
mov byte [ebp - 4], 1
call fcn.10005eb0
mov edx, dword [ebp - 0x818]
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push edx
push eax
push 0x10009714
push 0x1000971c
call edi
mov ecx, dword [ebp - 0x818]
mov eax, dword [esi + 4]
push ecx
push eax
push 0x10009740
push 0x1000971c
call edi
mov edx, dword [ebp - 0x818]
push edx
push 0x10009660
push 0x10009754
push 0x1000971c
call edi
mov ecx, dword [esi + 0x10]
cmp dword [ecx - 0xc], 0
lea eax, [esi + 0x10]
je 0x100042b5
mov ebx, dword [ebp - 0x820]
push eax
lea edx, [ebp - 0x814]
add ebx, 0x28
push edx
call fcn.10005800
push eax
lea eax, [ebp - 0x81c]
push eax
mov ebx, 0x1000969c
mov byte [ebp - 4], 4
call fcn.100058b0
add esp, 0x10
mov ebx, dword [ebp - 0x820]
lea ecx, [ebx + 0x28]
mov byte [ebp - 4], 5
call fcn.10005580
lea eax, [ebp - 0x81c]
call fcn.10005eb0
lea eax, [ebp - 0x814]
call fcn.10005eb0
mov ecx, ebx
mov eax, dword [ecx + 0x14]
mov ebx, dword [ebx + 0x28]
push eax
push ebx
push 0x100094f0
push 0x100094e4
call edi
mov dword [esi + 0x18], 1
xor ebx, ebx
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x818]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x100042e3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x824]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x10004494
lea ecx, [ebp - 0x81c]
call fcn.100053f0
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0x81c]
cmp dword [eax - 0xc], 0
je 0x10004477
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10004477
lea ecx, [ebp - 0x81c]
push ecx
lea edx, [ebp - 0x818]
push edx
mov ebx, 0x10009710
call fcn.100058b0
lea ecx, [ebp - 0x824]
push edi
push ecx
mov ebx, eax
mov byte [ebp - 4], 7
call fcn.10005800
push eax
lea edx, [ebp - 0x814]
push edx
mov ebx, 0x100096f4
mov byte [ebp - 4], 8
call fcn.100058b0
add esp, 0x18
lea eax, [ebp - 0x824]
call fcn.10005eb0
lea eax, [ebp - 0x818]
mov byte [ebp - 4], 0xb
call fcn.10005eb0
mov eax, dword [ebp - 0x814]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x814]
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push ecx
push eax
push 0x10009714
push 0x1000971c
call edi
mov edx, dword [ebp - 0x814]
mov eax, dword [esi + 4]
push edx
push eax
push 0x10009740
push 0x1000971c
call edi
mov eax, dword [ebp - 0x814]
push eax
push 0x10009660
push 0x10009754
push 0x1000971c
call edi
mov ecx, dword [esi + 0x10]
cmp dword [ecx - 0xc], 0
lea eax, [esi + 0x10]
je 0x10004465
mov ebx, dword [ebp - 0x820]
push eax
lea edx, [ebp - 0x82c]
add ebx, 0x28
push edx
call fcn.10005800
push eax
lea eax, [ebp - 0x828]
push eax
mov ebx, 0x1000969c
mov byte [ebp - 4], 0xc
call fcn.100058b0
add esp, 0x10
mov ebx, dword [ebp - 0x820]
lea ecx, [ebx + 0x28]
mov byte [ebp - 4], 0xd
call fcn.10005580
lea eax, [ebp - 0x828]
call fcn.10005eb0
lea eax, [ebp - 0x82c]
call fcn.10005eb0
mov ecx, ebx
mov eax, dword [ecx + 0x14]
mov ebx, dword [ebx + 0x28]
push eax
push ebx
push 0x100094f0
push 0x100094e4
call edi
lea eax, [ebp - 0x814]
mov dword [esi + 0x18], 1
call fcn.10005eb0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x81c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x100044a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x100044a9
mov dword [esi + 0x18], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000747e
mov esp, ebp
pop ebp
ret