Function at 0x41f312
Capabilities:
Copy file
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x31c
and dword [ebp + 0x7c], 0x30000
push esi
mov dword [ebp + 0x68], ecx
push 0x19c8
lea ecx, [ebp + 0x4c]
call fcn.00444a2e
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x4c]
xor esi, esi
push 0x527
push dword [ebp + 0x78]
mov dword [ebp + 0x54], esi
call fcn.00445269
mov eax, dword [ebp + 0x54]
add esp, 0x10
cmp eax, esi
jne 0x41f36c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, esi
jne 0x41f365
xor eax, eax
inc eax
mov esi, eax
jmp 0x41f80d
mov ecx, dword [ebp + 0x4c]
push ebx
sub eax, ecx
push edi
sar eax, 1
mov ebx, eax
push ebx
lea edi, [ecx + 0xa50]
push ecx
push edi
mov dword [ebp + 0x48], ecx
mov dword [ebp + 0x64], edi
call fcn.00405988
lea eax, [edi + ebx*2]
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov dword [ebp + 0x38], eax
mov word [eax], si
lea eax, [edi + 0x14a0]
mov dword [ebp + 0x60], eax
add eax, 0xa50
mov dword [ebp + 0x58], eax
mov eax, dword [ebp + 0x68]
mov eax, dword [eax + 0xe0]
add esp, 0xc
cmp eax, esi
je 0x41f467
push eax
call ebx
mov ecx, eax
mov eax, dword [ebp + 0x68]
mov eax, dword [eax + 0xe0]
mov dword [ebp + 0x6c], ecx
mov cx, word [eax + ecx*2 - 2]
cmp cx, 0x5c
je 0x41f3e1
cmp cx, 0x2f
jne 0x41f3e4
dec dword [ebp + 0x6c]
push dword [ebp + 0x6c]
push eax
lea eax, [edi + 0xa50]
push eax
call fcn.00405988
mov eax, dword [ebp + 0x6c]
add eax, eax
push 0xc
mov dword [ebp + 0x5c], eax
lea eax, [eax + edi + 0xa50]
push 0x4c3cd8
push eax
call fcn.004143a0
push dword [ebp + 0x6c]
mov eax, dword [ebp + 0x68]
push dword [eax + 0xe0]
push dword [ebp + 0x60]
call fcn.00405988
mov ecx, dword [ebp + 0x60]
mov eax, dword [ebp + 0x5c]
push 0x26
add eax, ecx
push str.SYSTEM32DRIVERS_
push eax
call fcn.004143a0
push dword [ebp + 0x6c]
mov eax, dword [ebp + 0x68]
push dword [eax + 0xe0]
push dword [ebp + 0x58]
call fcn.00405988
mov ecx, dword [ebp + 0x58]
mov eax, dword [ebp + 0x5c]
push 0x16
add eax, ecx
push str.SYSTEM32_
push eax
call fcn.004143a0
add esp, 0x48
jmp 0x41f4d9
mov eax, dword [ebp + 0x64]
push 9
pop ecx
push 0x104
add eax, 0xa50
push 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]
push 0xf
pop ecx
mov esi, str._SystemRoot_SYSTEM32DRIVERS_
lea edi, [ebp - 0x5c]
rep movsd dword es:[edi], dword [esi]
push 0x104
push dword [ebp + 0x60]
lea eax, [ebp - 0x5c]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov eax, dword [ebp + 0x60]
push 0xb
pop ecx
mov esi, str._SystemRoot_SYSTEM32_
lea edi, [ebp - 0x1c]
rep movsd dword es:[edi], dword [esi]
push 0x104
add eax, 0xa50
push eax
lea eax, [ebp - 0x1c]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov edi, dword [ebp + 0x64]
xor esi, esi
add edi, 0xa50
push edi
call ebx
push dword [ebp + 0x60]
mov dword [ebp + 0x44], eax
call ebx
mov dword [ebp + 0x40], eax
mov eax, dword [ebp + 0x60]
add eax, 0xa50
push eax
call ebx
push dword [ebp + 0x54]
mov dword [ebp + 0x3c], eax
mov eax, dword [ebp + 0x44]
lea eax, [edi + eax*2]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.00444a2e
push dword [ebp + 0x78]
push str.ToSys:Copy___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.004ad528
mov ecx, dword [ebp + 0x68]
add esp, 0x10
push esi
push esi
push 0x11
push esi
push dword [ebp + 0x6c]
add ecx, 4
mov dword [ebp + 0x68], ecx
call fcn.0041afa3
lea ecx, [ebp + 0x6c]
call fcn.0043e48d
push esi
push edi
push dword [ebp + 0x78]
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [ebp + 0x7c], esi
je 0x41f5aa
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.00444a2e
push edi
push str.ToSys:TreatINF___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.004ad528
mov ecx, dword [ebp + 0x68]
add esp, 0x10
push esi
push esi
push 0x11
push esi
push dword [ebp + 0x6c]
call fcn.0041afa3
lea ecx, [ebp + 0x6c]
call fcn.0043e48d
push dword [ebp + 0x7c]
push edi
call fcn.00416e6a
pop ecx
pop ecx
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.00444a2e
push dword [ebp + 0x78]
push str.ToSys:END___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.004ad528
mov ecx, dword [ebp + 0x68]
add esp, 0x10
push esi
push esi
push 0x11
push esi
push dword [ebp + 0x6c]
call fcn.0041afa3
lea ecx, [ebp + 0x6c]
call fcn.0043e48d
push 8
push 0x4c3bb8
push dword [ebp + 0x54]
call fcn.004143a0
xor eax, eax
mov dword [ebp - 0x2ac], esi
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 + 0x50]
push eax
mov dword [ebp + 0x50], esi
call fcn.004ac6b1
add esp, 0x18
cmp dword [ebp + 0x50], esi
je 0x41f803
test byte [ebp - 0x2ac], 0x10
jne 0x41f7ec
cmp word [ebp - 0x280], 0x2e
jne 0x41f668
cmp word [ebp - 0x27e], si
je 0x41f7ec
cmp word [ebp - 0x27e], 0x2e
jne 0x41f668
cmp word [ebp - 0x27c], si
je 0x41f7ec
lea eax, [ebp - 0x280]
push eax
call ebx
inc eax
add eax, eax
push eax
lea eax, [ebp - 0x280]
push eax
push dword [ebp + 0x38]
call fcn.004143a0
add esp, 0xc
lea eax, [ebp - 0x280]
push eax
call ebx
cmp eax, 4
jge 0x41f698
push 4
pop eax
mov edi, dword [ebp + 0x3c]
lea ecx, [ebp + eax*2 - 0x288]
mov eax, dword [ebp + 0x60]
push 0x4c3bac
add eax, 0xa50
push ecx
mov dword [ebp + 0x48], ecx
mov dword [ebp + 0x78], eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
jne 0x41f6ce
mov eax, dword [ebp + 0x64]
mov edi, dword [ebp + 0x44]
add eax, 0xa50
mov dword [ebp + 0x78], eax
push str..SYS
push dword [ebp + 0x48]
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
jne 0x41f6e9
mov eax, dword [ebp + 0x60]
mov edi, dword [ebp + 0x40]
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.00444a2e
push dword [ebp + 0x64]
push str.ToSys:Copy___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.004ad528
mov ecx, dword [ebp + 0x68]
add esp, 0x10
push esi
push esi
push 0x11
push esi
push dword [ebp + 0x6c]
call fcn.0041afa3
lea ecx, [ebp + 0x6c]
call fcn.0043e48d
push esi
push dword [ebp + 0x78]
push dword [ebp + 0x64]
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
mov eax, dword [ebp + 0x64]
add eax, 0xa50
cmp eax, dword [ebp + 0x78]
jne 0x41f7ac
cmp dword [ebp + 0x7c], esi
je 0x41f7ac
push edi
lea ecx, [ebp + 0x58]
call fcn.00444a2e
mov eax, dword [ebp + 0x64]
add eax, 0xa50
push eax
push str.ToSys:TreatINF___s_
push 0x27ff
push dword [ebp + 0x58]
call fcn.004ad528
mov ecx, dword [ebp + 0x68]
add esp, 0x10
push esi
push esi
push 0x11
push esi
push dword [ebp + 0x58]
call fcn.0041afa3
lea ecx, [ebp + 0x58]
call fcn.0043e48d
mov eax, dword [ebp + 0x64]
push dword [ebp + 0x7c]
add eax, 0xa50
push eax
call fcn.00416e6a
pop ecx
pop ecx
push edi
lea ecx, [ebp + 0x5c]
call fcn.00444a2e
push dword [ebp + 0x64]
push str.ToSys:End___s_
push 0x27ff
push dword [ebp + 0x5c]
call fcn.004ad528
mov ecx, dword [ebp + 0x68]
add esp, 0x10
push esi
push esi
push 0x11
push esi
push dword [ebp + 0x5c]
call fcn.0041afa3
lea ecx, [ebp + 0x5c]
call fcn.0043e48d
mov word [ebp - 0x27c], si
lea eax, [ebp - 0x2ac]
push eax
lea ecx, [ebp + 0x50]
call fcn.00405aa0
test eax, eax
jne 0x41f62d
lea ecx, [ebp + 0x50]
call fcn.00402cea
pop edi
pop ebx
lea ecx, [ebp + 0x4c]
call fcn.0043e48d
mov eax, esi
pop esi
add ebp, 0x70
leave
ret 8