Function at 0x41f640
Capabilities:
Check if file exists
Copy file
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a59a
mov eax, dword fs:[0]
push eax
sub esp, 0x250
mov eax, dword [0x551758]
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
mov dword [ebp - 0x240], esi
xor eax, eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x230], eax
lea eax, [esi + 0x40]
push 0
push dword [eax]
mov dword [esi + 0x28], 2
push 0
mov dword [ebp - 0x258], eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
xor ebx, ebx
mov dword [ebp - 0x224], str.update.exe
lea eax, [esi + 0x34]
mov dword [ebp - 0x220], str.UtilModule.dll
mov dword [ebp - 0x21c], str.curlnet.dll
mov dword [ebp - 0x254], ebx
mov dword [ebp - 0x25c], eax
nop
push 0x515d14
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.0040e020
add esp, 0xc
mov ebx, dword [ebp + ebx*4 - 0x224]
mov dword [ebp - 4], 0
mov dword [ebp - 0x250], ebx
test ebx, ebx
jne 0x41f701
xor ecx, ecx
jmp 0x41f715
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41f706
sub ecx, edx
sar ecx, 1
mov eax, dword [ebp - 0x228]
mov edx, ebx
sub edx, eax
mov dword [ebp - 0x22c], ebx
sar edx, 1
mov dword [ebp - 0x244], edx
mov esi, dword [eax - 0xc]
mov dword [ebp - 0x234], esi
test ecx, ecx
js 0x41fcef
test ebx, ebx
jne 0x41f746
xor edi, edi
jmp 0x41f758
push ecx
push ebx
call fcn.004e33f8
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x228]
mov ecx, SysReAllocString
sub ecx, edi
cmp ecx, esi
jl 0x41fcef
add esi, edi
js 0x41fcef
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or edx, ecx
jge 0x41f792
push esi
lea ecx, [ebp - 0x228]
call fcn.00405570
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0x244]
mov edx, dword [ebp - 0x234]
cmp ecx, edx
lea ecx, [eax + ecx*2]
jbe 0x41f7ab
mov ecx, dword [ebp - 0x22c]
push edi
push ecx
lea eax, [eax + edx*2]
push edi
push eax
call fcn.00404bc0
mov eax, dword [ebp - 0x228]
add esp, 0x10
cmp esi, dword [eax - 8]
jg 0x41fcef
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp - 0x228]
push ebx
push dword [ebp - 0x258]
mov word [eax + esi*2], cx
lea eax, [ebp - 0x23c]
push eax
call fcn.0040e020
add esp, 0xc
push dword [ebp - 0x228]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41f9a1
mov eax, dword [ebp - 0x240]
mov eax, dword [eax + 0x34]
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x41f81b
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x41f827
call fcn.00404ec0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov byte [ebp - 4], 3
test eax, eax
je 0x41fce5
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
mov byte [ebp - 4], 2
lea esi, [eax + 0x10]
mov eax, dword [ebp - 0x230]
or eax, 4
mov dword [ebp - 0x248], esi
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x238], eax
test ebx, ebx
jne 0x41f864
xor edi, edi
jmp 0x41f87f
mov edi, ebx
lea ecx, [edi + 2]
nop dword [eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x41f870
sub edi, ecx
sar edi, 1
mov eax, dword [ebp - 0x240]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x22c], eax
mov edx, dword [eax - 0xc]
mov dword [ebp - 0x244], edx
lea ebx, [edi + edx]
test ebx, ebx
js 0x41fcef
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x41f8cb
push ebx
lea ecx, [ebp - 0x248]
call fcn.00405570
mov esi, dword [ebp - 0x248]
mov edx, dword [ebp - 0x244]
push edx
push dword [ebp - 0x22c]
push edx
push esi
call fcn.00404bc0
mov eax, dword [ebp - 0x244]
push edi
push dword [ebp - 0x250]
lea eax, [esi + eax*2]
push edi
push eax
call fcn.00404bc0
lea edi, [esi - 0x10]
add esp, 0x20
cmp ebx, dword [edi + 8]
jg 0x41fcef
mov dword [edi + 4], ebx
xor eax, eax
mov word [esi + ebx*2], ax
mov ebx, dword [ebp - 0x228]
add ebx, 0xfffffff0
cmp edi, ebx
je 0x41f961
mov eax, dword [ebx + 0xc]
shr eax, 0x1f
test al, al
jne 0x41f952
mov eax, dword [edi]
cmp eax, dword [ebx]
jne 0x41f952
push edi
call fcn.0040dbe0
add esp, 4
lea edx, [ebx + 0xc]
mov esi, eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41f947
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [esi + 0x10]
mov dword [ebp - 0x228], eax
jmp 0x41f961
push dword [edi + 4]
lea ecx, [ebp - 0x228]
push esi
call fcn.004056b0
mov ebx, dword [ebp - 0x230]
or eax, 0xffffffff
and ebx, 0xfffffffb
mov dword [ebp - 0x230], ebx
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x234], ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x41f991
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x228]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41f9ac
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x41fbfd
mov edi, dword [ebp - 0x240]
mov eax, dword [edi + 0x34]
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x41f9c5
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x41f9d1
call fcn.00404ec0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov byte [ebp - 4], 5
test eax, eax
je 0x41fce5
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
or ebx, 8
mov byte [ebp - 4], 4
mov dword [ebp - 0x238], ebx
lea esi, [eax + 0x10]
mov eax, dword [edi + 0x34]
mov dword [ebp - 0x24c], esi
mov dword [ebp - 0x22c], eax
mov edi, dword [eax - 0xc]
lea ebx, [edi + 6]
test ebx, ebx
js 0x41fcef
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x41fa34
push ebx
lea ecx, [ebp - 0x24c]
call fcn.00405570
mov esi, dword [ebp - 0x24c]
push edi
push dword [ebp - 0x22c]
push edi
push esi
call fcn.00404bc0
lea ecx, [esi + edi*2]
add esp, 0x10
test ecx, ecx
jne 0x41fa5e
call fcn.004e32c3
mov dword [eax], 0x16
call fcn.004e31e9
jmp 0x41fa72
movq xmm0, qword [str.Utils]
movq qword [ecx], xmm0
mov eax, dword [0x515d2c]
mov dword [ecx + 8], eax
cmp ebx, dword [esi - 8]
lea edi, [esi - 0x10]
jg 0x41fcef
mov dword [edi + 4], ebx
xor eax, eax
mov word [esi + ebx*2], ax
mov ebx, dword [ebp - 0x228]
add ebx, 0xfffffff0
cmp edi, ebx
je 0x41fae0
mov eax, dword [ebx + 0xc]
shr eax, 0x1f
test al, al
jne 0x41fad1
mov eax, dword [edi]
cmp eax, dword [ebx]
jne 0x41fad1
push edi
call fcn.0040dbe0
add esp, 4
lea edx, [ebx + 0xc]
mov esi, eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41fac6
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [esi + 0x10]
mov dword [ebp - 0x228], eax
jmp 0x41fae0
push dword [edi + 4]
lea ecx, [ebp - 0x228]
push esi
call fcn.004056b0
mov eax, dword [ebp - 0x234]
and eax, 0xfffffff7
mov byte [ebp - 4], 1
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x238], eax
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x41fb0e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x250]
test ebx, ebx
jne 0x41fb1c
xor ecx, ecx
jmp 0x41fb30
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41fb21
sub ecx, edx
sar ecx, 1
mov eax, dword [ebp - 0x228]
mov edx, ebx
sub edx, eax
sar edx, 1
mov dword [ebp - 0x22c], edx
mov esi, dword [eax - 0xc]
mov dword [ebp - 0x234], esi
test ecx, ecx
js 0x41fcef
test ebx, ebx
jne 0x41fb5b
xor edi, edi
jmp 0x41fb6d
push ecx
push ebx
call fcn.004e33f8
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x228]
mov ecx, SysReAllocString
sub ecx, edi
cmp ecx, esi
jl 0x41fcef
add esi, edi
js 0x41fcef
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x41fba7
push esi
lea ecx, [ebp - 0x228]
call fcn.00405570
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x234]
cmp ecx, edx
ja 0x41fbba
lea ebx, [eax + ecx*2]
push edi
push ebx
lea eax, [eax + edx*2]
push edi
push eax
call fcn.00404bc0
mov eax, dword [ebp - 0x228]
add esp, 0x10
cmp esi, dword [eax - 8]
jg 0x41fcef
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp - 0x228]
mov word [eax + esi*2], cx
push dword [ebp - 0x228]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x41fc0d
push 0
push dword [ebp - 0x23c]
push dword [ebp - 0x228]
call esi
mov edx, dword [ebp - 0x23c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41fc2b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x228]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41fc50
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x254]
mov eax, dword [ebp - 0x25c]
inc ebx
mov dword [ebp - 0x254], ebx
cmp ebx, 3
jb 0x41f6d0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004dfe60
mov ebx, dword [ebp - 0x240]
lea eax, [ebp - 0x218]
add esp, 0xc
push dword [ebx + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.adbk_update.ini
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0
lea eax, [ebp - 0x218]
push eax
push dword [ebx + 0x38]
call esi
xor eax, eax
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.0049e374
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00404b90
push 0x80070057
call fcn.00404b90
int3