Function at 0x41ff66
Capabilities:
Copy file
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
and dword [ebp + 0xc], 0x30000
push esi
mov esi, ecx
push 0x19c8
lea ecx, [ebp - 0x1c]
call fcn.0043dd9c
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
push 0x527
push dword [ebp + 8]
call fcn.0043e52f
mov eax, dword [ebp - 0x14]
add esp, 0x10
test eax, eax
jne 0x41ffba
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x41ffb3
inc eax
mov esi, eax
jmp 0x420403
mov ecx, dword [ebp - 0x1c]
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 - 0x20], ecx
mov dword [ebp - 0xc], edi
call fcn.0040515a
lea eax, [edi + ebx*2]
and word [eax], 0
add edi, 0xa50
mov dword [ebp - 0x28], eax
lea ebx, [edi + 0xa50]
lea eax, [ebx + 0xa50]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x40]
add esp, 0xc
test eax, eax
je 0x42009d
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrlenW]
push eax
call ebx
mov ecx, eax
mov eax, dword [esi + 0x40]
mov dword [ebp - 8], ecx
mov cx, word [eax + ecx*2 - 2]
cmp cx, 0x5c
je 0x420028
cmp cx, 0x2f
jne 0x42002b
dec dword [ebp - 8]
push dword [ebp - 8]
push eax
push edi
call fcn.0040515a
mov eax, dword [ebp - 8]
add eax, eax
push 0xc
mov dword [ebp - 0x10], eax
add eax, edi
push 0x4aac24
push eax
call fcn.004128b6
push dword [ebp - 8]
lea eax, [edi + 0xa50]
push dword [esi + 0x40]
push eax
call fcn.0040515a
mov eax, dword [ebp - 0x10]
push 0x26
lea eax, [eax + edi + 0xa50]
push str.SYSTEM32DRIVERS_
push eax
call fcn.004128b6
push dword [ebp - 8]
push dword [esi + 0x40]
push dword [ebp - 4]
call fcn.0040515a
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
push 0x16
add eax, ecx
push str.SYSTEM32_
push eax
call fcn.004128b6
add esp, 0x48
jmp 0x4200d6
push 0x104
push edi
push str._SystemRoot_INF_
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
push 0x104
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
push str._SystemRoot_SYSTEM32DRIVERS_
call ebx
push 0x104
push dword [ebp - 4]
push str._SystemRoot_SYSTEM32_
call ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrlenW]
push edi
call ebx
mov dword [ebp - 0x24], eax
lea eax, [edi + 0xa50]
push eax
call ebx
push dword [ebp - 4]
mov dword [ebp - 0x2c], eax
call ebx
push dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x24]
lea eax, [edi + eax*2]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
push 0x2800
lea ecx, [ebp - 4]
call fcn.0043dd9c
push dword [ebp + 8]
mov ebx, 0x27ff
push str.ToSys:Copy___s_
push ebx
push dword [ebp - 4]
call fcn.00493438
mov ecx, dword [esi + 4]
add esp, 0x10
push 0
push 0x11
push 0
push dword [ebp - 4]
call fcn.0041b06a
lea ecx, [ebp - 4]
call fcn.00437e1a
push 0
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [ebp + 0xc], 0
je 0x42019a
push 0x2800
lea ecx, [ebp - 4]
call fcn.0043dd9c
push edi
push str.ToSys:TreatINF___s_
push ebx
push dword [ebp - 4]
call fcn.00493438
mov ecx, dword [esi + 4]
add esp, 0x10
push 0
push 0x11
push 0
push dword [ebp - 4]
call fcn.0041b06a
lea ecx, [ebp - 4]
call fcn.00437e1a
push dword [ebp + 0xc]
push edi
call fcn.0041493f
pop ecx
pop ecx
push 0x2800
lea ecx, [ebp - 4]
call fcn.0043dd9c
push dword [ebp + 8]
push str.ToSys:END___s_
push ebx
push dword [ebp - 4]
call fcn.00493438
mov ecx, dword [esi + 4]
add esp, 0x10
xor edi, edi
push edi
push 0x11
push edi
push dword [ebp - 4]
call fcn.0041b06a
lea ecx, [ebp - 4]
call fcn.00437e1a
push 8
push 0x4aab04
push dword [ebp - 0x14]
call fcn.004128b6
xor eax, eax
and dword [ebp - 0x18], eax
mov dword [ebp - 0x280], edi
mov ecx, 0x93
lea edi, [ebp - 0x27c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x280]
push eax
push dword [ebp - 0x20]
lea eax, [ebp - 0x18]
push eax
call fcn.004926a2
add esp, 0x18
cmp dword [ebp - 0x18], 0
je 0x4203f7
test byte [ebp - 0x280], 0x10
jne 0x4203e0
cmp word [ebp - 0x254], 0x2e
jne 0x420258
cmp word [ebp - 0x252], 0
je 0x4203e0
cmp word [ebp - 0x252], 0x2e
jne 0x420258
cmp word [ebp - 0x250], 0
je 0x4203e0
mov edi, dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea eax, [ebp - 0x254]
push eax
call edi
inc eax
add eax, eax
push eax
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x28]
call fcn.004128b6
add esp, 0xc
lea eax, [ebp - 0x254]
push eax
call edi
cmp eax, 4
jge 0x42028e
push 4
pop eax
mov edi, dword [ebp - 0x30]
lea ecx, [ebp + eax*2 - 0x25c]
mov eax, dword [ebp - 0xc]
push 0x4aaaf8
add eax, 0x1ef0
push ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
jne 0x4202c4
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x24]
add eax, 0xa50
mov dword [ebp + 8], eax
push str..SYS
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
jne 0x4202e4
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x2c]
add eax, 0x14a0
mov dword [ebp + 8], eax
lea eax, [ebp - 0x254]
push eax
mov eax, dword [ebp + 8]
lea eax, [eax + edi*2]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
mov edi, 0x2800
push edi
lea ecx, [ebp - 4]
call fcn.0043dd9c
push dword [ebp - 0xc]
push str.ToSys:Copy___s_
push ebx
push dword [ebp - 4]
call fcn.00493438
mov ecx, dword [esi + 4]
add esp, 0x10
push 0
push 0x11
push 0
push dword [ebp - 4]
call fcn.0041b06a
lea ecx, [ebp - 4]
call fcn.00437e1a
push 0
push dword [ebp + 8]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
mov eax, dword [ebp - 0xc]
add eax, 0xa50
cmp eax, dword [ebp + 8]
jne 0x4203a3
cmp dword [ebp + 0xc], 0
je 0x4203a3
push edi
lea ecx, [ebp - 8]
call fcn.0043dd9c
mov eax, dword [ebp - 0xc]
add eax, 0xa50
push eax
push str.ToSys:TreatINF___s_
push ebx
push dword [ebp - 8]
call fcn.00493438
mov ecx, dword [esi + 4]
add esp, 0x10
push 0
push 0x11
push 0
push dword [ebp - 8]
call fcn.0041b06a
lea ecx, [ebp - 8]
call fcn.00437e1a
mov eax, dword [ebp - 0xc]
push dword [ebp + 0xc]
add eax, 0xa50
push eax
call fcn.0041493f
pop ecx
pop ecx
push edi
lea ecx, [ebp - 0x10]
call fcn.0043dd9c
push dword [ebp - 0xc]
push str.ToSys:End___s_
push ebx
push dword [ebp - 0x10]
call fcn.00493438
mov ecx, dword [esi + 4]
add esp, 0x10
xor edi, edi
push edi
push 0x11
push edi
push dword [ebp - 0x10]
call fcn.0041b06a
lea ecx, [ebp - 0x10]
call fcn.00437e1a
mov word [ebp - 0x250], di
lea eax, [ebp - 0x280]
push eax
lea ecx, [ebp - 0x18]
call fcn.00405248
test eax, eax
jne 0x42021b
lea ecx, [ebp - 0x18]
call fcn.00402b8f
pop edi
xor esi, esi
pop ebx
lea ecx, [ebp - 0x1c]
call fcn.00437e1a
mov eax, esi
pop esi
leave
ret 8