Function at 0x40b390
Capabilities:
Check if file exists
Get file attributes
Move file
Read .ini file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57bc6c
mov eax, dword fs:[0]
push eax
sub esp, 0x844
mov eax, dword [0x5ef220]
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 esi, ecx
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x830], ax
lea eax, [ebp - 0x82e]
push eax
call fcn.0055c960
add esp, 0xc
xor eax, eax
mov word [ebp - 0x218], ax
push 0x206
push eax
lea eax, [ebp - 0x216]
push eax
call fcn.0055c960
add esp, 0xc
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
call fcn.00402a30
mov ebx, dword [sym.imp.SHLWAPI.dll_StrCatW]
lea eax, [ebp - 0x218]
push str.Config.ini
push eax
call ebx
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.00558864
add esp, 0xc
lea eax, [ebp - 0x830]
push eax
push 0
push str.pre_update
push str.action_first
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
je 0x40b45e
xor al, al
jmp 0x40b862
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x628], ax
lea eax, [ebp - 0x626]
push eax
call fcn.0055c960
add esp, 0xc
lea eax, [esi + 4]
push eax
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.00558864
mov edi, dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x628]
add esp, 0xc
push eax
call edi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call fcn.0055c960
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x628]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x422], ax
test ax, ax
jne 0x40b4c3
lea eax, [ebp - 0x420]
push eax
call edi
push str.Pre_Update
lea eax, [ebp - 0x420]
push eax
call ebx
lea eax, [ebp - 0x420]
push eax
call edi
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b457
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x83c], 0
mov dword [ebp - 0x838], 0
lea edx, [ebp - 0x840]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x420]
call fcn.00429f70
test eax, eax
je 0x40b565
push 0
push 0x5c39d4
push 0x5c4fa0
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor bl, bl
jmp 0x40b855
xor esi, esi
cmp dword [ebp - 0x83c], esi
jle 0x40b5e7
nop
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.0055c960
add esp, 0xc
xor eax, eax
movzx ecx, word [ebp + eax - 0x628]
lea eax, [eax + 2]
mov word [ebp + eax - 0x21a], cx
test cx, cx
jne 0x40b590
lea eax, [ebp - 0x218]
push eax
call edi
test esi, esi
js 0x40b61e
cmp esi, dword [ebp - 0x83c]
jge 0x40b61e
mov eax, dword [ebp - 0x840]
push dword [eax + esi*4]
lea eax, [ebp - 0x218]
push eax
call ebx
lea ecx, [ebp - 0x218]
call fcn.00429f00
test eax, eax
jne 0x40b603
inc esi
cmp esi, dword [ebp - 0x83c]
jl 0x40b570
call fcn.004311d4
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40b62f
push 0x80004005
call fcn.0040fbb0
push 0
push 0x5c39d4
push 0x5c4ff8
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor bl, bl
jmp 0x40b855
push 0
push 0
push 1
push 0xc000008c
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x844], edi
mov byte [ebp - 4], 1
call fcn.004311d4
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40b65f
push 0x80004005
call fcn.0040fbb0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x834], esi
xor ebx, ebx
mov byte [ebp - 4], 2
or edx, 0xffffffff
mov dword [ebp - 0x848], ebx
cmp dword [ebp - 0x83c], ebx
jle 0x40b819
lea ebx, [ebx]
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b6a0
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x844]
call fcn.0040fa60
test ebx, ebx
js 0x40b61e
cmp ebx, dword [ebp - 0x83c]
jge 0x40b61e
mov eax, dword [ebp - 0x840]
lea ecx, [ebp - 0x844]
mov eax, dword [eax + ebx*4]
push dword [eax - 0xc]
push eax
call fcn.0040ef00
lea ecx, [ebp - 0x628]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b6f7
sub ecx, edx
lea eax, [ebp - 0x628]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x834]
call fcn.0040fa60
cmp ebx, dword [ebp - 0x83c]
jge 0x40b61e
mov eax, dword [ebp - 0x840]
lea ecx, [ebp - 0x834]
mov eax, dword [eax + ebx*4]
push dword [eax - 0xc]
push eax
call fcn.0040ef00
mov esi, dword [ebp - 0x834]
push 0x5c
push esi
call fcn.00559a33
add esp, 8
test eax, eax
jne 0x40b757
or eax, 0xffffffff
jmp 0x40b75b
sub eax, esi
sar eax, 1
push eax
push 0
lea eax, [ebp - 0x850]
push eax
lea ecx, [ebp - 0x834]
call fcn.0040f370
mov byte [ebp - 4], 3
mov ebx, dword [ebp - 0x850]
mov ecx, ebx
call fcn.0042a3b0
mov edi, dword [ebp - 0x844]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b7dd
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b7a9
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push edi
mov dword [ebp - 0x84c], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x40b7dd
push dword [ebp - 0x84c]
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
add ebx, 0xfffffff0
mov byte [ebp - 4], 2
or edx, 0xffffffff
mov ecx, edx
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40b800
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
or edx, 0xffffffff
mov ebx, dword [ebp - 0x848]
inc ebx
mov dword [ebp - 0x848], ebx
cmp ebx, dword [ebp - 0x83c]
jl 0x40b690
add esi, 0xfffffff0
mov bl, 1
mov byte [ebp - 4], bl
mov ecx, edx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40b83a
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
or edx, 0xffffffff
add edi, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edi + 0xc]
lock xadd dword [eax], edx
dec edx
test edx, edx
jg 0x40b855
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
lea ecx, [ebp - 0x840]
call fcn.0040e110
mov al, bl
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.00557f7f
mov esp, ebp
pop ebp
ret