Function at 0x41fb46
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.0043d49b
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
push 0x527
push dword [ebp + 8]
call fcn.0043dbbd
mov eax, dword [ebp - 0x14]
add esp, 0x10
test eax, eax
jne 0x41fb9a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x41fb93
inc eax
mov esi, eax
jmp 0x41ffe3
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.00405064
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 0x41fc7d
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 0x41fc08
cmp cx, 0x2f
jne 0x41fc0b
dec dword [ebp - 8]
push dword [ebp - 8]
push eax
push edi
call fcn.00405064
mov eax, dword [ebp - 8]
add eax, eax
push 0xc
mov dword [ebp - 0x10], eax
add eax, edi
push 0x4a7d54
push eax
call fcn.004125f9
push dword [ebp - 8]
lea eax, [edi + 0xa50]
push dword [esi + 0x40]
push eax
call fcn.00405064
mov eax, dword [ebp - 0x10]
push 0x26
lea eax, [eax + edi + 0xa50]
push str.SYSTEM32DRIVERS_
push eax
call fcn.004125f9
push dword [ebp - 8]
push dword [esi + 0x40]
push dword [ebp - 4]
call fcn.00405064
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
push 0x16
add eax, ecx
push str.SYSTEM32_
push eax
call fcn.004125f9
add esp, 0x48
jmp 0x41fcb6
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.0043d49b
push dword [ebp + 8]
mov ebx, 0x27ff
push str.ToSys:Copy___s_
push ebx
push dword [ebp - 4]
call fcn.0048ff98
mov ecx, dword [esi + 4]
add esp, 0x10
push 0
push 0x11
push 0
push dword [ebp - 4]
call fcn.0041abe7
lea ecx, [ebp - 4]
call fcn.00437960
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 0x41fd7a
push 0x2800
lea ecx, [ebp - 4]
call fcn.0043d49b
push edi
push str.ToSys:TreatINF___s_
push ebx
push dword [ebp - 4]
call fcn.0048ff98
mov ecx, dword [esi + 4]
add esp, 0x10
push 0
push 0x11
push 0
push dword [ebp - 4]
call fcn.0041abe7
lea ecx, [ebp - 4]
call fcn.00437960
push dword [ebp + 0xc]
push edi
call fcn.0041462f
pop ecx
pop ecx
push 0x2800
lea ecx, [ebp - 4]
call fcn.0043d49b
push dword [ebp + 8]
push str.ToSys:END___s_
push ebx
push dword [ebp - 4]
call fcn.0048ff98
mov ecx, dword [esi + 4]
add esp, 0x10
xor edi, edi
push edi
push 0x11
push edi
push dword [ebp - 4]
call fcn.0041abe7
lea ecx, [ebp - 4]
call fcn.00437960
push 8
push 0x4a7c34
push dword [ebp - 0x14]
call fcn.004125f9
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.0048f048
add esp, 0x18
cmp dword [ebp - 0x18], 0
je 0x41ffd7
test byte [ebp - 0x280], 0x10
jne 0x41ffc0
cmp word [ebp - 0x254], 0x2e
jne 0x41fe38
cmp word [ebp - 0x252], 0
je 0x41ffc0
cmp word [ebp - 0x252], 0x2e
jne 0x41fe38
cmp word [ebp - 0x250], 0
je 0x41ffc0
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.004125f9
add esp, 0xc
lea eax, [ebp - 0x254]
push eax
call edi
cmp eax, 4
jge 0x41fe6e
push 4
pop eax
mov edi, dword [ebp - 0x30]
lea ecx, [ebp + eax*2 - 0x25c]
mov eax, dword [ebp - 0xc]
push 0x4a7c28
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 0x41fea4
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 0x41fec4
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.0043d49b
push dword [ebp - 0xc]
push str.ToSys:Copy___s_
push ebx
push dword [ebp - 4]
call fcn.0048ff98
mov ecx, dword [esi + 4]
add esp, 0x10
push 0
push 0x11
push 0
push dword [ebp - 4]
call fcn.0041abe7
lea ecx, [ebp - 4]
call fcn.00437960
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 0x41ff83
cmp dword [ebp + 0xc], 0
je 0x41ff83
push edi
lea ecx, [ebp - 8]
call fcn.0043d49b
mov eax, dword [ebp - 0xc]
add eax, 0xa50
push eax
push str.ToSys:TreatINF___s_
push ebx
push dword [ebp - 8]
call fcn.0048ff98
mov ecx, dword [esi + 4]
add esp, 0x10
push 0
push 0x11
push 0
push dword [ebp - 8]
call fcn.0041abe7
lea ecx, [ebp - 8]
call fcn.00437960
mov eax, dword [ebp - 0xc]
push dword [ebp + 0xc]
add eax, 0xa50
push eax
call fcn.0041462f
pop ecx
pop ecx
push edi
lea ecx, [ebp - 0x10]
call fcn.0043d49b
push dword [ebp - 0xc]
push str.ToSys:End___s_
push ebx
push dword [ebp - 0x10]
call fcn.0048ff98
mov ecx, dword [esi + 4]
add esp, 0x10
xor edi, edi
push edi
push 0x11
push edi
push dword [ebp - 0x10]
call fcn.0041abe7
lea ecx, [ebp - 0x10]
call fcn.00437960
mov word [ebp - 0x250], di
lea eax, [ebp - 0x280]
push eax
lea ecx, [ebp - 0x18]
call fcn.00405192
test eax, eax
jne 0x41fdfb
lea ecx, [ebp - 0x18]
call fcn.00402b8f
pop edi
xor esi, esi
pop ebx
lea ecx, [ebp - 0x1c]
call fcn.00437960
mov eax, esi
pop esi
leave
ret 8