Function at 0x1004a660
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10163903
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x10ac
call fcn.10148b90
mov eax, dword [0x10438fc0]
xor eax, esp
mov dword [esp + 0x10a8], eax
push ebx
push esi
push edi
mov eax, dword [0x10438fc0]
xor eax, esp
push eax
lea eax, [esp + 0x10c0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push 0
push 0
push 0
lea esi, [esp + 0x24]
mov ebx, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], 0
call fcn.100163a0
mov dword [esp + 0x10c8], 0
test edi, edi
je 0x1004a6e0
mov eax, esi
call fcn.10016670
jmp 0x1004a72d
lea ecx, [ebx + 0xc]
push ecx
lea esi, [esp + 0x14]
call fcn.100177a0
mov esi, eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004a704
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, dword [esi]
inc dword [eax - 0xc]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1004a72d
lea edx, [eax - 0xc]
test edx, edx
je 0x1004a72d
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004a72d
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
add ebx, 0xc
push ebx
lea ecx, [esp + 0x20]
call fcn.10017430
push 0
mov edi, 0x101e9724
lea eax, [esp + 0x14]
mov byte [esp + 0x10cc], 1
call fcn.100164f0
push 0
lea eax, [esp + 0x8a8]
push eax
lea ecx, [esp + 0x6a4]
push ecx
lea edx, [esp + 0x6a0]
mov byte [esp + 0x10d4], 2
mov eax, dword [esp + 0x28]
push edx
push eax
call dword [sym.imp.MSVCR100.dll__wsplitpath]
mov esi, dword [esp + 0x24]
push esi
lea ecx, [esp + 0x8bc]
push ecx
lea edx, [esp + 0x6b8]
push edx
lea eax, [esp + 0x6b4]
push eax
lea ecx, [esp + 0xac8]
push ecx
call dword [sym.imp.MSVCR100.dll__wmakepath]
add esp, 0x28
lea edi, [esp + 0xaa4]
lea eax, [esp + 0x1c]
call fcn.10016670
mov byte [esp + 0x10c8], 1
test esi, esi
je 0x1004a7e2
lea edx, [esi - 0xc]
test edx, edx
je 0x1004a7e2
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne 0x1004a7e2
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
lea eax, [esp + 0x1c]
push eax
lea esi, [esp + 0x24]
call fcn.100176f0
mov edi, eax
push 1
lea ecx, [esp + 0x20]
push ecx
lea esi, [esp + 0x30]
mov byte [esp + 0x10d0], 3
call fcn.100175b0
mov edx, dword [edi]
mov ecx, dword [eax]
lea ebx, [esp + 0x2c]
mov dword [esp + 0x2c], 0xffffffff
mov byte [esp + 0x280], 1
call fcn.10023da0
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1004a847
lea edx, [eax - 0xc]
test edx, edx
je 0x1004a847
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004a847
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov byte [esp + 0x10c8], 5
mov eax, dword [esp + 0x20]
test eax, eax
je 0x1004a86f
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x1004a86f
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004a86f
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov ecx, dword [esp + 0x2c]
cmp ecx, 0xffffffff
je 0x1004abee
cmp byte [esp + 0x280], 0
je 0x1004a88a
mov al, 1
jmp 0x1004a89f
lea edx, [esp + 0x30]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ecx, dword [esp + 0x2c]
test eax, eax
setne al
mov byte [esp + 0x280], 0
test al, al
je 0x1004abc4
mov ebx, dword [esp + 0x24]
xor edi, edi
mov dword [esp + 0x14], edi
cmp ebx, edi
je 0x1004a8d3
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x1004a8c2
sub eax, edx
sar eax, 1
mov edi, eax
push 0
push 0
push edi
lea esi, [esp + 0x20]
call fcn.100163a0
mov edx, dword [esp + 0x14]
test ebx, ebx
je 0x1004a8ff
mov esi, edx
mov eax, ebx
sub esi, ebx
nop
movzx ecx, word [eax]
mov word [eax + esi], cx
add eax, 2
test cx, cx
jne 0x1004a8f0
mov dword [edx - 4], edi
mov ebx, edi
mov byte [esp + 0x10c8], 6
cmp ebx, 2
jne 0x1004a939
cmp word [edx + 2], 0x3a
jne 0x1004a939
push 0
push 1
lea edi, [ebx + 1]
push edi
lea esi, [esp + 0x20]
call fcn.100163a0
mov edx, dword [esp + 0x14]
mov eax, 0x5c
mov word [edx + ebx*2], ax
mov dword [edx - 4], edi
push 0x104
push edx
lea ecx, [esp + 0x6a4]
push ecx
call dword [sym.imp.MSVCR100.dll__wfullpath]
lea eax, [esp + 0x6a8]
add esp, 0xc
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1004a960
sub eax, edx
push 0
sar eax, 1
mov ebx, eax
push 0
push ebx
lea esi, [esp + 0x20]
call fcn.100163a0
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x69c]
mov edx, esi
mov ecx, eax
sub edx, ecx
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
test cx, cx
jne 0x1004a990
mov dword [esi - 4], ebx
mov byte [esp + 0x10c8], 7
movzx eax, word [esi + ebx*2 - 2]
cmp eax, 0x5c
je 0x1004a9c8
cmp eax, 0x2f
je 0x1004a9c8
lea edx, [esp + 0x14]
push edx
mov eax, 0x10197e18
call fcn.10016730
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
call fcn.10016730
lea eax, [esp + 0x5c]
mov dword [esp + 0x10], 0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1004a9e5
sub eax, edx
push 0
sar eax, 1
mov ebx, eax
push 0
push ebx
lea esi, [esp + 0x1c]
call fcn.100163a0
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x5c]
mov edx, esi
mov ecx, eax
sub edx, ecx
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
test cx, cx
jne 0x1004aa12
mov dword [esi - 4], ebx
mov ecx, ebx
xor eax, eax
mov byte [esp + 0x10c8], 8
test ecx, ecx
jle 0x1004aa40
cmp word [esi + eax*2], 0x2e
je 0x1004aa43
inc eax
cmp eax, ecx
jl 0x1004aa34
or eax, 0xffffffff
push eax
lea edx, [esp + 0x698]
push edx
or eax, 0xffffffff
lea ebx, [esp + 0x18]
call fcn.10016e20
lea ecx, [esp + 0x14]
mov byte [esp + 0x10c8], 9
mov eax, dword [eax]
push ecx
call fcn.10016730
mov byte [esp + 0x10c8], 8
mov eax, dword [esp + 0x694]
test eax, eax
je 0x1004aa9b
lea edx, [eax - 0xc]
test edx, edx
je 0x1004aa9b
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004aa9b
mov edi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
push eax
call edi
add esp, 4
jmp 0x1004aaa1
mov edi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea eax, [esp + 0x48a]
push eax
lea ecx, [esp + 0x286]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x286]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov ebx, dword [esp + 0x14]
push 0
push ebx
lea ecx, [esp + 0x28a]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x1004ab27
lea edx, [esi - 0xc]
test edx, edx
je 0x1004aaf8
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne 0x1004aaf8
push eax
call edi
add esp, 4
mov byte [esp + 0x10c8], 5
test ebx, ebx
je 0x1004a86f
lea eax, [ebx - 0xc]
test eax, eax
je 0x1004a86f
dec dword [ebx - 0xc]
lea eax, [ebx - 0xc]
jne 0x1004a86f
push eax
call edi
jmp 0x1004a86c
call fcn.10023ad0
test eax, eax
jle 0x1004ab3a
and eax, 0xffff
or eax, 0x80070000
lea ecx, [esi - 0xc]
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x1004ab52
add esi, 0xfffffff4
dec dword [esi]
jne 0x1004ab52
push esi
call edi
add esp, 4
test ebx, ebx
je 0x1004ab6a
lea edx, [ebx - 0xc]
test edx, edx
je 0x1004ab6a
add ebx, 0xfffffff4
dec dword [ebx]
jne 0x1004ab6a
push ebx
call edi
add esp, 4
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x1004ab86
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x1004ab86
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1004aba2
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x1004aba2
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004aba2
push eax
call edi
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1004abbe
lea edx, [eax - 0xc]
test edx, edx
je 0x1004abbe
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004abbe
push eax
call edi
add esp, 4
mov eax, dword [esp + 0x10]
jmp 0x1004ac30
cmp ecx, 0xffffffff
je 0x1004abee
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
push ecx
call esi
test eax, eax
jne 0x1004abe6
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x1004abee
push eax
call esi
test eax, eax
je 0x1004abee
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1004ac0e
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x1004ac0e
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004ac0e
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1004ac2e
lea edx, [eax - 0xc]
test edx, edx
je 0x1004ac2e
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004ac2e
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x10c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10a8]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret 8