Function at 0x47f540
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x52009b
push eax
mov eax, 0x1a84
mov dword fs:[0], esp
call fcn.0051d1f0
push ebx
push ebp
push esi
mov ebx, ecx
push edi
xor esi, esi
mov ecx, 0x411
xor eax, eax
lea edi, [esp + 0xa4e]
mov word [esp + 0xa4c], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [0x5381a0]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], eax
mov ecx, dword [ebx + 4]
lea edx, [esp + 0xa4c]
push ecx
push 0x5394a4
push 0x823
push edx
mov dword [esp + 0x1aac], esi
call dword [sym.imp.MSVCRT.dll__snwprintf]
mov ecx, dword [ebx + 4]
mov ebp, dword [sym.imp.WININET.dll_GetUrlCacheEntryInfoW]
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push esi
push ecx
call ebp
mov eax, dword [esp + 0x18]
cmp eax, esi
jne 0x47f60c
mov eax, dword [esp + 0x10]
mov ecx, dword [0x538120]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x47f605
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x47f605
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.0051d19a
add esp, 4
xor eax, eax
jmp 0x47fa85
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, dword [esp + 0x1c]
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x18]
lea ecx, [esp + 0xa4c]
push eax
push ebx
push ecx
call ebp
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x47f688
push 8
lea edx, [esp + 0xa50]
push str.file:___
push edx
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x47f6f6
lea eax, [esp + 0xa4c]
push eax
call fcn.0041da30
lea ecx, [esp + 0xa60]
add esp, 4
mov dword [ebx + 8], ecx
mov dword [esp + 0x14], 1
mov edi, dword [ebx + 8]
cmp word [edi], si
je 0x47f6f6
cmp edi, esi
jne 0x47f698
xor ebp, ebp
jmp 0x47f6a1
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
mov edx, dword [esp + 0x10]
cmp dword [edx - 0xc], 1
jg 0x47f6b0
cmp ebp, dword [edx - 4]
jle 0x47f6cb
lea ecx, [esp + 0x10]
call fcn.00405210
push ebp
lea ecx, [esp + 0x14]
call fcn.00405010
cmp eax, esi
je 0x47f6f6
mov edx, dword [esp + 0x10]
lea eax, [ebp + ebp]
mov esi, edi
mov ecx, eax
mov edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
xor esi, esi
mov dword [ecx - 8], ebp
mov edx, dword [esp + 0x10]
mov word [eax + edx], 0
cmp ebx, esi
je 0x47f704
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x22e]
mov word [esp + 0x22c], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x26]
mov word [esp + 0x24], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp dword [esp + 0x14], esi
je 0x47fa52
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], esi
je 0x47f85f
mov edi, dword [sym.imp.MSVCRT.dll_wcsrchr]
push 0x5c
push eax
call edi
add esp, 8
cmp eax, esi
jne 0x47f767
mov eax, dword [esp + 0x10]
push 0x2f
push eax
call edi
add esp, 8
add eax, 2
je 0x47f85f
cmp word [eax], si
je 0x47f85f
mov ebp, dword [sym.imp.MSVCRT.dll__snwprintf]
push eax
push 0x5394a4
lea ecx, [esp + 0x234]
push 0x103
push ecx
call ebp
lea edx, [esp + 0x23c]
push edx
call fcn.0047f4f0
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x44a]
mov word [esp + 0x448], si
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x1ab8]
add esp, 0x14
stosw word es:[edi], ax
cmp dword [esp + 0x1aa8], esi
jne 0x47f8d0
mov edi, dword [esp + 0x1c]
push ebx
mov ecx, edi
call fcn.00480010
push esi
lea eax, [esp + 0x438]
push 0x104
push eax
mov ecx, edi
call fcn.0047fb60
lea ecx, [esp + 0x434]
push 1
push ecx
call fcn.0043f2a0
lea edx, [esp + 0x43c]
push edx
call fcn.0043f530
add esp, 0xc
lea eax, [esp + 0x22c]
lea ecx, [esp + 0x434]
lea edx, [esp + 0x24]
push eax
push ecx
push 0x539c6c
push 0x103
push edx
call ebp
lea eax, [esp + 0x38]
push esi
push eax
call fcn.0043f2a0
lea ecx, [esp + 0x40]
push esi
push ecx
call fcn.0043f120
add esp, 0x24
test eax, eax
je 0x47f86a
mov eax, dword [0x5a0ad4]
sub eax, esi
je 0x47f899
dec eax
je 0x47f86a
dec eax
je 0x47f8d0
cmp dword [esp + 0x14], 3
je 0x47faa0
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x24]
push esi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x24]
test edx, edx
mov dword [esp + 0x14], eax
lea ebx, [ecx + 8]
jne 0x47f9c1
xor ebp, ebp
jmp 0x47f9ce
lea edx, [esp + 0x22c]
push 0x103
push edx
lea eax, [esp + 0x2c]
push esi
push eax
call fcn.0043fa70
add esp, 0x10
test eax, eax
je 0x47f86a
lea ecx, [esp + 0x22c]
lea edx, [esp + 0x24]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
jmp 0x47f86a
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x63e]
mov word [esp + 0x63c], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x846]
mov word [esp + 0x844], si
rep stosd dword es:[edi], eax
mov ecx, dword [0x58d1a0]
push 0x104
stosw word es:[edi], ax
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [esp + 0x848]
push eax
push 0x19
push ecx
call edi
mov eax, dword [0x58d1a0]
lea edx, [esp + 0x63c]
push 0x104
push edx
push 0x1a
push eax
call edi
lea ecx, [esp + 0x63c]
push ecx
call fcn.0043f750
lea edx, [esp + 0x230]
push 0x2e
push edx
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 0xc
cmp eax, esi
je 0x47f962
add eax, 2
jmp 0x47f967
mov eax, 0x56d150
lea ecx, [esp + 0x434]
lea edx, [esp + 0x22c]
push ecx
push esi
push 0x80c02
push eax
lea eax, [esp + 0x64c]
push edx
mov edx, dword [0x58d1a4]
lea ecx, [esp + 0x858]
push eax
push ecx
push ebx
push edx
call fcn.0043f900
add esp, 0x24
test eax, eax
je 0x47faa0
lea eax, [esp + 0x22c]
lea ecx, [esp + 0x24]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
jmp 0x47f86a
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
mov eax, dword [ebx]
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
cmp edx, 1
jg 0x47f9e0
cmp ebp, dword [eax - 4]
jle 0x47fa1a
mov edx, dword [0x538120]
add eax, 0xfffffff4
cmp eax, edx
je 0x47fa0e
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x47fa06
mov ecx, dword [ebx]
sub ecx, 0xc
push ecx
call fcn.0051d19a
add esp, 4
mov edx, dword [0x5381a0]
mov dword [ebx], edx
push ebp
mov ecx, ebx
call fcn.00405010
cmp eax, esi
je 0x47fa43
mov edi, dword [ebx]
lea eax, [ebp + ebp]
mov ecx, eax
lea esi, [esp + 0x24]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
xor esi, esi
mov dword [ecx - 8], ebp
mov edx, dword [ebx]
mov word [edx + eax], 0
mov ecx, dword [esp + 0x14]
xor eax, eax
cmp ecx, esi
setne al
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
mov edx, dword [0x538120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47fa81
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x47fa81
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.0051d19a
add esp, 4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1a94]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1a90
ret 8
mov eax, dword [esp + 0x10]
mov edx, dword [0x538120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47facf
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x47facf
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.0051d19a
add esp, 4
mov eax, 3
jmp 0x47fa85