Function at 0x1001fe6f
Capabilities:
Copy file
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x31c
and dword [ebp + 0x7c], 0x30000
push esi
push edi
mov edi, ecx
push 0x19c8
lea ecx, [ebp + 0x4c]
mov dword [ebp + 0x3c], edi
call fcn.10046141
and dword [ebp + 0x54], 0
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x4c]
push 0x527
push dword [ebp + 0x78]
call fcn.100469ca
mov eax, dword [ebp + 0x54]
add esp, 0x10
test eax, eax
jne 0x1001fec9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1001fec2
inc eax
mov esi, eax
jmp 0x1002035f
mov ecx, dword [ebp + 0x4c]
sub eax, ecx
push ebx
sar eax, 1
mov ebx, eax
push ebx
lea esi, [ecx + 0xa50]
push ecx
push esi
mov dword [ebp + 0x48], ecx
mov dword [ebp + 0x64], esi
call fcn.10005b3b
lea eax, [esi + ebx*2]
and word [eax], 0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp + 0x44], eax
lea eax, [esi + 0x14a0]
mov dword [ebp + 0x60], eax
add eax, 0xa50
mov dword [ebp + 0x50], eax
mov eax, dword [edi + 0xe0]
add esp, 0xc
test eax, eax
je 0x1001ffb6
push eax
call ebx
mov ecx, eax
mov eax, dword [edi + 0xe0]
mov dword [ebp + 0x68], ecx
mov cx, word [eax + ecx*2 - 2]
cmp cx, 0x5c
je 0x1001ff38
cmp cx, 0x2f
jne 0x1001ff3b
dec dword [ebp + 0x68]
push dword [ebp + 0x68]
push eax
lea eax, [esi + 0xa50]
push eax
call fcn.10005b3b
mov eax, dword [ebp + 0x68]
add eax, eax
push 0xc
mov dword [ebp + 0x64], eax
lea eax, [eax + esi + 0xa50]
push 0x100cae48
push eax
call fcn.100144ff
push dword [ebp + 0x68]
push dword [edi + 0xe0]
push dword [ebp + 0x60]
call fcn.10005b3b
mov ecx, dword [ebp + 0x60]
mov eax, dword [ebp + 0x64]
push 0x26
add eax, ecx
push str.SYSTEM32DRIVERS_
push eax
call fcn.100144ff
push dword [ebp + 0x68]
push dword [edi + 0xe0]
mov edi, dword [ebp + 0x50]
push edi
call fcn.10005b3b
mov eax, dword [ebp + 0x64]
push 0x16
add eax, edi
push str.SYSTEM32_
push eax
call fcn.100144ff
add esp, 0x48
jmp 0x10020029
mov eax, dword [ebp + 0x64]
push 9
pop ecx
add eax, 0xa50
push 0x104
push eax
mov dword [ebp + 0x5c], eax
lea eax, [ebp + 0x14]
mov esi, str._SystemRoot_INF_
lea edi, [ebp + 0x14]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov eax, dword [ebp + 0x5c]
push 0xf
pop ecx
mov esi, str._SystemRoot_SYSTEM32DRIVERS_
lea edi, [ebp - 0x5c]
rep movsd dword es:[edi], dword [esi]
push 0x104
add eax, 0xa50
push eax
lea eax, [ebp - 0x5c]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xb
pop ecx
mov esi, str._SystemRoot_SYSTEM32_
lea edi, [ebp - 0x1c]
rep movsd dword es:[edi], dword [esi]
push 0x104
push dword [ebp + 0x50]
lea eax, [ebp - 0x1c]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, dword [ebp + 0x64]
lea edi, [esi + 0xa50]
push edi
call ebx
mov dword [ebp + 0x5c], eax
lea eax, [edi + 0xa50]
push eax
call ebx
push dword [ebp + 0x50]
mov dword [ebp + 0x38], eax
call ebx
push dword [ebp + 0x54]
mov dword [ebp + 0x40], eax
mov eax, dword [ebp + 0x5c]
lea eax, [edi + eax*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.10046141
push dword [ebp + 0x78]
push str.ToSys:Copy___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.100b46b8
mov ecx, dword [ebp + 0x3c]
add esp, 0x10
xor eax, eax
push eax
push eax
push 0x11
push eax
push dword [ebp + 0x6c]
add ecx, 4
mov dword [ebp + 0x68], ecx
call fcn.1001b361
lea ecx, [ebp + 0x6c]
call fcn.1003f96c
push 0
push edi
push dword [ebp + 0x78]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp + 0x7c], 0
je 0x100200fe
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.10046141
push edi
push str.ToSys:TreatINF___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.100b46b8
mov ecx, dword [ebp + 0x68]
add esp, 0x10
xor eax, eax
push eax
push eax
push 0x11
push eax
push dword [ebp + 0x6c]
call fcn.1001b361
lea ecx, [ebp + 0x6c]
call fcn.1003f96c
push dword [ebp + 0x7c]
push edi
call fcn.1001745d
pop ecx
pop ecx
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.10046141
push dword [ebp + 0x78]
push str.ToSys:END___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.100b46b8
mov ecx, dword [ebp + 0x68]
add esp, 0x10
xor edi, edi
push edi
push edi
push 0x11
push edi
push dword [ebp + 0x6c]
call fcn.1001b361
lea ecx, [ebp + 0x6c]
call fcn.1003f96c
push 8
push 0x100cad28
push dword [ebp + 0x54]
call fcn.100144ff
xor eax, eax
and dword [ebp + 0x58], eax
mov dword [ebp - 0x2ac], edi
mov ecx, 0x93
lea edi, [ebp - 0x2a8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2ac]
push eax
push dword [ebp + 0x48]
lea eax, [ebp + 0x58]
push eax
call fcn.100b37d1
add esp, 0x18
cmp dword [ebp + 0x58], 0
je 0x10020354
test byte [ebp - 0x2ac], 0x10
jne 0x1002033d
cmp word [ebp - 0x280], 0x2e
jne 0x100201c1
cmp word [ebp - 0x27e], 0
je 0x1002033d
cmp word [ebp - 0x27e], 0x2e
jne 0x100201c1
cmp word [ebp - 0x27c], 0
je 0x1002033d
lea eax, [ebp - 0x280]
push eax
call ebx
inc eax
add eax, eax
push eax
lea eax, [ebp - 0x280]
push eax
push dword [ebp + 0x44]
call fcn.100144ff
add esp, 0xc
lea eax, [ebp - 0x280]
push eax
call ebx
cmp eax, 4
jge 0x100201f1
push 4
pop eax
mov ecx, dword [ebp + 0x50]
mov edi, dword [ebp + 0x40]
lea eax, [ebp + eax*2 - 0x288]
push 0x100cad1c
push eax
mov dword [ebp + 0x48], eax
mov dword [ebp + 0x78], ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x10020220
mov edi, dword [ebp + 0x5c]
lea eax, [esi + 0xa50]
mov dword [ebp + 0x78], eax
push str..SYS
push dword [ebp + 0x48]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1002023e
mov edi, dword [ebp + 0x38]
lea eax, [esi + 0x14a0]
mov dword [ebp + 0x78], eax
lea eax, [ebp - 0x280]
push eax
mov eax, dword [ebp + 0x78]
lea eax, [eax + edi*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edi, 0x2800
push edi
lea ecx, [ebp + 0x6c]
call fcn.10046141
push esi
push str.ToSys:Copy___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.100b46b8
mov ecx, dword [ebp + 0x68]
add esp, 0x10
xor eax, eax
push eax
push eax
push 0x11
push eax
push dword [ebp + 0x6c]
call fcn.1001b361
lea ecx, [ebp + 0x6c]
call fcn.1003f96c
push 0
push dword [ebp + 0x78]
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [esi + 0xa50]
cmp eax, dword [ebp + 0x78]
jne 0x100202fd
cmp dword [ebp + 0x7c], 0
je 0x100202fd
push edi
lea ecx, [ebp + 0x64]
call fcn.10046141
lea eax, [esi + 0xa50]
push eax
push str.ToSys:TreatINF___s_
push 0x27ff
push dword [ebp + 0x64]
call fcn.100b46b8
mov ecx, dword [ebp + 0x68]
add esp, 0x10
xor eax, eax
push eax
push eax
push 0x11
push eax
push dword [ebp + 0x64]
call fcn.1001b361
lea ecx, [ebp + 0x64]
call fcn.1003f96c
push dword [ebp + 0x7c]
lea eax, [esi + 0xa50]
push eax
call fcn.1001745d
pop ecx
pop ecx
push edi
lea ecx, [ebp + 0x60]
call fcn.10046141
push esi
push str.ToSys:End___s_
push 0x27ff
push dword [ebp + 0x60]
call fcn.100b46b8
mov ecx, dword [ebp + 0x68]
add esp, 0x10
xor edi, edi
push edi
push edi
push 0x11
push edi
push dword [ebp + 0x60]
call fcn.1001b361
lea ecx, [ebp + 0x60]
call fcn.1003f96c
mov word [ebp - 0x27c], di
lea eax, [ebp - 0x2ac]
push eax
lea ecx, [ebp + 0x58]
call fcn.10005c13
test eax, eax
jne 0x10020184
lea ecx, [ebp + 0x58]
call fcn.10002d8b
xor esi, esi
pop ebx
lea ecx, [ebp + 0x4c]
call fcn.1003f96c
pop edi
mov eax, esi
pop esi
add ebp, 0x70
leave
ret 8