Function at 0x46c280
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e2238
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x66c0e0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.004b5c24
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x46c2c6
push 0x80004005
call fcn.004047e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], edi
call fcn.004b5c24
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x46c2f2
push 0x80004005
call fcn.004047e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
call fcn.004b5c24
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x46c31f
push 0x80004005
call fcn.004047e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1c], eax
push 0xa
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.004c3ccb
mov ebx, dword [ebp + 8]
push ebx
mov ecx, esi
mov byte [ebp - 4], 3
mov dword [ebp - 0x14], edi
call fcn.0046bff0
mov ecx, dword [esi + 0x650]
push edi
push edi
push 0xf0
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, 1
jne 0x46c374
push str.appdisp
lea ecx, [ebp - 0x54]
call fcn.004c401f
push str.format
lea ecx, [ebp - 0x54]
call fcn.004c401f
mov edi, dword [esi + 0x98]
test edi, edi
je 0x46c46f
mov eax, edi
test edi, edi
je 0x46c463
mov ecx, dword [eax + 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [edi]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x46c3f4
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x46c3e7
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x46c3e7
push eax
call fcn.00405fe0
mov dword [ebp - 0x20], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x46c3dc
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x20]
add ecx, 0x10
mov dword [ebp - 0x10], ecx
jmp 0x46c3f4
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00406350
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x1c]
push edx
push eax
call fcn.0041eab0
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp + 8]
push ecx
push ebx
lea edx, [ebp - 0x18]
push str._s_s
push edx
call fcn.004065c0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
add esp, 0x18
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x46c468
mov edx, dword [ebp - 0x1c]
inc dword [ebp - 0x14]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
lea eax, [ebp - 0x10]
push str.copy__s
push eax
call fcn.004065c0
add esp, 0xc
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x54]
call fcn.004c3f16
test edi, edi
jne 0x46c38f
jmp 0x46c46f
call fcn.004a815b
mov dword [ebp - 0x14], 0xffffffff
push str.reset
lea ecx, [ebp - 0x54]
call fcn.004c401f
mov esi, dword [ebp - 0x14]
test esi, esi
jle 0x46c568
push str.usbscp.txt
push ebx
lea edx, [ebp - 0x18]
push str._s_s
push edx
call fcn.004065c0
add esp, 0x10
lea ecx, [ebp - 0x38]
call fcn.004c0de6
mov eax, dword [ebp - 0x18]
push 0
push 0x5011
push eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 4
call fcn.004c0cc4
test eax, eax
je 0x46c55c
mov edi, dword [ebp - 0x50]
test edi, edi
je 0x46c553
mov eax, edi
test edi, edi
je 0x46c463
mov ecx, dword [eax + 8]
mov esi, dword [ebp - 0x10]
mov edi, dword [edi]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x46c531
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x46c524
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x46c524
push eax
call fcn.00405fe0
mov dword [ebp + 8], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x46c519
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp + 8]
add ecx, 0x10
mov dword [ebp - 0x10], ecx
jmp 0x46c531
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00406350
push 1
push 0x5fa3fc
lea ecx, [ebp - 0x10]
call fcn.00408d70
mov edx, dword [ebp - 0x10]
push edx
lea ecx, [ebp - 0x38]
call fcn.004c0ec1
test edi, edi
jne 0x46c4d0
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x38]
call fcn.004c1085
inc esi
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.004c10c3
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.004c3df9
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46c597
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46c5ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46c5e0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4