Function at 0x409820
Capabilities:
Check if file exists
Create thread
Delete file
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46cceb
mov eax, dword fs:[0]
push eax
sub esp, 0x98
mov eax, dword [0x485370]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov edi, edx
mov esi, ecx
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0x98], ebx
cmp edi, ebx
jne 0x40996c
push 0x738
call fcn.004507d8
mov edi, eax
add esp, 4
mov dword [ebp - 0xa4], edi
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x409912
lea ebx, [ebp - 0xa0]
call fcn.0040a1b0
mov byte [ebp - 4], 1
mov edx, dword [esi]
mov edx, dword [edx + 0x20]
lea eax, [ebp - 0x94]
push eax
mov ecx, esi
mov dword [ebp - 0x98], 1
call edx
lea ecx, [ebp - 0xa0]
push ecx
mov dword [ebp - 4], 2
mov ebx, 3
mov ecx, eax
mov dword [ebp - 0x98], ebx
call fcn.0041fe6a
push eax
lea edx, [ebp - 0x9c]
push edx
call fcn.0040a4f0
add esp, 0xc
mov dword [ebp - 4], ebx
mov eax, dword [eax]
mov ebx, 7
mov dword [ebp - 0x98], ebx
test eax, eax
je 0x409905
mov eax, dword [eax]
push eax
push edi
call fcn.004076f0
mov edi, eax
jmp 0x409914
xor eax, eax
push eax
push edi
call fcn.004076f0
mov edi, eax
jmp 0x409914
xor edi, edi
test bl, 4
je 0x409927
lea ecx, [ebp - 0x9c]
and ebx, 0xfffffffb
call fcn.0040a4a0
mov dword [ebp - 4], 4
test bl, 2
je 0x409947
and ebx, 0xfffffffd
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x98], ebx
call fcn.0041fd16
mov dword [ebp - 4], 0xffffffff
test bl, 1
je 0x40995e
lea ecx, [ebp - 0xa0]
call fcn.0040a4a0
mov eax, dword [esi + 4]
push eax
call fcn.00405580
jmp 0x409c22
cmp edi, 1
jne 0x4099ad
mov ecx, dword [esi + 4]
mov edi, dword [sym.imp.USER32.dll_MessageBoxW]
push 4
push 0x47a5b8
push str._fTnx
push ecx
call edi
cmp eax, 6
jne 0x409c22
call fcn.0040f5f0
mov edx, dword [esi + 4]
push ebx
push 0x47a5b8
push 0x47ae98
push edx
call edi
jmp 0x409c22
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0xa0], eax
lea esi, [ebp - 0x9c]
mov dword [ebp - 4], 7
call fcn.0040f800
mov byte [ebp - 4], 8
mov ecx, dword [0x4881bc]
mov eax, dword [eax]
shl edi, 5
mov ebx, edi
mov edx, dword [ebx + ecx + 8]
push edx
push eax
push str._s_s
lea edi, [ebp - 0xa0]
call fcn.00404aa0
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x9c]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409a27
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0xa0]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x409b04
lea esi, [ebp - 0x9c]
call fcn.0040f830
mov eax, dword [eax]
mov ecx, dword [0x4881bc]
mov ecx, dword [ebx + ecx + 8]
push eax
push 0
push ecx
push str.config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
mov eax, dword [ebp - 0x9c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409a87
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [0x4881bc]
cmp esi, dword [ebx + eax + 0x1c]
jne 0x409afd
mov eax, dword [ebx + eax + 0x14]
push ecx
sub eax, 0x10
mov dword [ebp - 0xa4], esp
mov esi, esp
call fcn.00404b40
add eax, 0x10
mov dword [esi], eax
push ecx
lea esi, [edi - 0x10]
mov byte [ebp - 4], 9
mov eax, esi
mov dword [ebp - 0x9c], esp
mov ebx, esp
call fcn.00404b40
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 7
call fcn.00411040
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409c22
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
jmp 0x409c22
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x2c
call fcn.004507d8
add esp, 4
test eax, eax
je 0x409b1f
call fcn.00409c50
mov dword [ebp - 0x98], eax
jmp 0x409b29
mov dword [ebp - 0x98], 0
lea esi, [ebp - 0x9c]
call fcn.0040f800
mov byte [ebp - 4], 0xa
mov edi, dword [ebp - 0x98]
add edi, 0x20
call fcn.00406f90
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x9c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409b6c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebx, dword [0x4881bc]
push ebx
mov ebx, dword [ebp - 0x98]
mov edi, ebx
call fcn.00409c90
lea esi, [ebp - 0x98]
call fcn.0040f830
lea edi, [ebx + 0x24]
mov byte [ebp - 4], 0xb
call fcn.00406f90
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x98]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409bbd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0xa4]
mov dword [ebx + 0x28], esi
mov edx, dword [esi]
mov eax, dword [edx + 0xd0]
push 0
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x94]
push 0x47aea8
mov ecx, esi
call eax
push 0
push 0
push ebx
push 0x406b40
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xa0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409c22
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004501c4
mov esp, ebp
pop ebp
ret 4