Function at 0x4fb1a0
Capabilities:
Copy file
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53a834
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x59a0a0]
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 dword [ebp - 4], 1
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4fb1f1
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fb206
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x4fb20a
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x228], eax
push 0x20a
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.0049e130
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0x105
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4fb250
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x228]
call fcn.00402d50
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4fb28e
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fb2a3
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x4fb2a7
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x224], eax
mov byte [ebp - 4], 3
lea eax, [ebp - 0x224]
push dword [ebp + 0xc]
push dword [ebp + 8]
push str._sDownloader_s
push eax
call fcn.004023f0
mov edi, dword [ebp - 0x224]
add esp, 0x10
push 0
push edi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4fb2fb
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fb310
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x4fb314
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x220], eax
push edi
lea eax, [ebp - 0x220]
mov byte [ebp - 4], 4
push str._sSetup.exe
push eax
call fcn.004023f0
mov esi, dword [ebp - 0x220]
add esp, 0xc
mov ebx, dword [ebp - 0x228]
push 0
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea edx, [esi - 0x10]
mov dword [ebp - 0x22c], eax
or esi, 0xffffffff
mov byte [ebp - 4], 3
mov ecx, esi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
jg 0x4fb3a5
mov eax, dword [edx]
push edx
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov dword [ebp - 0x220], edi
mov edi, dword [ebp - 0x224]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fb397
mov eax, dword [edx]
push 0
mov eax, dword [eax + 4]
push dword [eax + 4]
call ecx
jmp 0x4fb39f
mov ecx, dword [edx]
call dword [ebp - 0x220]
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 2
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4fb3e7
mov edx, dword [edi]
push edi
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x220], ebx
mov ebx, dword [ebp - 0x228]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fb3df
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ecx
jmp 0x4fb3e7
mov ecx, edx
call dword [ebp - 0x220]
mov byte [ebp - 4], 1
add ebx, 0xfffffff0
mov eax, esi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x4fb41d
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fb41b
mov eax, dword [ecx + 4]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call edi
jmp 0x4fb423
call edx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0
mov eax, esi
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4fb458
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fb454
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call edi
jmp 0x4fb458
mov ecx, edx
call ebx
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x4fb48e
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fb48a
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call edi
jmp 0x4fb48e
mov ecx, edx
call esi
mov eax, dword [ebp - 0x22c]
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.0049aa22
mov esp, ebp
pop ebp
ret 8