Function at 0x421306
Capabilities:
Copy file
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x284
and dword [ebp + 0x7c], 0x30000
push ebx
push esi
mov esi, ecx
push 0x19c8
lea ecx, [ebp + 0x4c]
call fcn.0043fdb8
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x4c]
xor ebx, ebx
push 0x527
push dword [ebp + 0x78]
mov dword [ebp + 0x54], ebx
call fcn.004404f6
mov eax, dword [ebp + 0x54]
add esp, 0x10
cmp eax, ebx
jne 0x421360
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jne 0x421359
xor eax, eax
inc eax
mov ebx, eax
jmp 0x4217af
mov ecx, dword [ebp + 0x4c]
push edi
sub eax, ecx
sar eax, 1
push eax
lea edi, [ecx + 0xa50]
push ecx
push edi
mov dword [ebp + 0x5c], ecx
mov dword [ebp + 0x68], edi
mov dword [ebp + 0x58], eax
call fcn.0040542c
mov eax, dword [ebp + 0x58]
lea eax, [edi + eax*2]
add edi, 0xa50
mov dword [ebp + 0x48], eax
mov word [eax], bx
lea eax, [edi + 0x14a0]
mov dword [ebp + 0x60], eax
mov eax, dword [esi + 0x40]
add esp, 0xc
cmp eax, ebx
je 0x42143d
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, eax
mov eax, dword [esi + 0x40]
mov dword [ebp + 0x6c], ecx
mov cx, word [eax + ecx*2 - 2]
cmp cx, 0x5c
je 0x4213c8
cmp cx, 0x2f
jne 0x4213cb
dec dword [ebp + 0x6c]
push dword [ebp + 0x6c]
push eax
push edi
call fcn.0040542c
mov eax, dword [ebp + 0x6c]
add eax, eax
push 0xc
mov dword [ebp + 0x64], eax
add eax, edi
push 0x4b2f14
push eax
call fcn.00413203
push dword [ebp + 0x6c]
lea eax, [edi + 0xa50]
push dword [esi + 0x40]
push eax
call fcn.0040542c
mov eax, dword [ebp + 0x64]
push 0x26
lea eax, [eax + edi + 0xa50]
push str.SYSTEM32DRIVERS_
push eax
call fcn.00413203
push dword [ebp + 0x6c]
push dword [esi + 0x40]
push dword [ebp + 0x60]
call fcn.0040542c
mov ecx, dword [ebp + 0x60]
mov eax, dword [ebp + 0x64]
push 0x16
add eax, ecx
push str.SYSTEM32_
push eax
call fcn.00413203
add esp, 0x48
jmp 0x421478
push 0x104
push edi
push str._SystemRoot_INF_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x104
lea eax, [edi + 0xa50]
push eax
push str._SystemRoot_SYSTEM32DRIVERS_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x104
push dword [ebp + 0x60]
push str._SystemRoot_SYSTEM32_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp + 0x58], eax
lea eax, [edi + 0xa50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [ebp + 0x60]
mov dword [ebp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [ebp + 0x54]
mov dword [ebp + 0x3c], eax
mov eax, dword [ebp + 0x58]
lea eax, [edi + eax*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.0043fdb8
push dword [ebp + 0x78]
push str.ToSys:Copy___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.0049ae18
mov ecx, dword [esi + 4]
add esp, 0x10
push ebx
push ebx
push 0x11
push ebx
push dword [ebp + 0x6c]
call fcn.0041c2d3
lea ecx, [ebp + 0x6c]
call fcn.00439cfd
push ebx
push edi
push dword [ebp + 0x78]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp + 0x7c], ebx
je 0x421547
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.0043fdb8
push edi
push str.ToSys:TreatINF___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.0049ae18
mov ecx, dword [esi + 4]
add esp, 0x10
push ebx
push ebx
push 0x11
push ebx
push dword [ebp + 0x6c]
call fcn.0041c2d3
lea ecx, [ebp + 0x6c]
call fcn.00439cfd
push dword [ebp + 0x7c]
push edi
call fcn.00415a14
pop ecx
pop ecx
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.0043fdb8
push dword [ebp + 0x78]
push str.ToSys:END___s_
push 0x27ff
push dword [ebp + 0x6c]
call fcn.0049ae18
mov ecx, dword [esi + 4]
add esp, 0x10
push ebx
push ebx
push 0x11
push ebx
push dword [ebp + 0x6c]
call fcn.0041c2d3
lea ecx, [ebp + 0x6c]
call fcn.00439cfd
push 8
push 0x4b2df4
push dword [ebp + 0x54]
call fcn.00413203
xor eax, eax
mov dword [ebp - 0x214], ebx
mov ecx, 0x93
lea edi, [ebp - 0x210]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x214]
push eax
push dword [ebp + 0x5c]
lea eax, [ebp + 0x50]
push eax
mov dword [ebp + 0x50], ebx
call fcn.00499fd5
add esp, 0x18
cmp dword [ebp + 0x50], ebx
je 0x4217a6
test byte [ebp - 0x214], 0x10
jne 0x42178f
cmp word [ebp - 0x1e8], 0x2e
jne 0x421605
cmp word [ebp - 0x1e6], bx
je 0x42178f
cmp word [ebp - 0x1e6], 0x2e
jne 0x421605
cmp word [ebp - 0x1e4], bx
je 0x42178f
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x1e8]
push eax
call edi
inc eax
add eax, eax
push eax
lea eax, [ebp - 0x1e8]
push eax
push dword [ebp + 0x48]
call fcn.00413203
add esp, 0xc
lea eax, [ebp - 0x1e8]
push eax
call edi
cmp eax, 4
jge 0x42163b
push 4
pop eax
mov ecx, dword [ebp + 0x60]
mov edi, dword [ebp + 0x3c]
lea eax, [ebp + eax*2 - 0x1f0]
push 0x4b2de8
push eax
mov dword [ebp + 0x44], eax
mov dword [ebp + 0x78], ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x42166c
mov eax, dword [ebp + 0x68]
mov edi, dword [ebp + 0x58]
add eax, 0xa50
mov dword [ebp + 0x78], eax
push str..SYS
push dword [ebp + 0x44]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x42168c
mov eax, dword [ebp + 0x68]
mov edi, dword [ebp + 0x40]
add eax, 0x14a0
mov dword [ebp + 0x78], eax
lea eax, [ebp - 0x1e8]
push eax
mov eax, dword [ebp + 0x78]
lea eax, [eax + edi*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x2800
lea ecx, [ebp + 0x6c]
call fcn.0043fdb8
push dword [ebp + 0x68]
mov edi, 0x27ff
push str.ToSys:Copy___s_
push edi
push dword [ebp + 0x6c]
call fcn.0049ae18
mov ecx, dword [esi + 4]
add esp, 0x10
push ebx
push ebx
push 0x11
push ebx
push dword [ebp + 0x6c]
call fcn.0041c2d3
lea ecx, [ebp + 0x6c]
call fcn.00439cfd
push ebx
push dword [ebp + 0x78]
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [ebp + 0x68]
add eax, 0xa50
cmp eax, dword [ebp + 0x78]
jne 0x42174f
cmp dword [ebp + 0x7c], ebx
je 0x42174f
push 0x2800
lea ecx, [ebp + 0x5c]
call fcn.0043fdb8
mov eax, dword [ebp + 0x68]
add eax, 0xa50
push eax
push str.ToSys:TreatINF___s_
push edi
push dword [ebp + 0x5c]
call fcn.0049ae18
mov ecx, dword [esi + 4]
add esp, 0x10
push ebx
push ebx
push 0x11
push ebx
push dword [ebp + 0x5c]
call fcn.0041c2d3
lea ecx, [ebp + 0x5c]
call fcn.00439cfd
mov eax, dword [ebp + 0x68]
push dword [ebp + 0x7c]
add eax, 0xa50
push eax
call fcn.00415a14
pop ecx
pop ecx
push 0x2800
lea ecx, [ebp + 0x64]
call fcn.0043fdb8
push dword [ebp + 0x68]
push str.ToSys:End___s_
push edi
push dword [ebp + 0x64]
call fcn.0049ae18
mov ecx, dword [esi + 4]
add esp, 0x10
push ebx
push ebx
push 0x11
push ebx
push dword [ebp + 0x64]
call fcn.0041c2d3
lea ecx, [ebp + 0x64]
call fcn.00439cfd
mov word [ebp - 0x1e4], bx
lea eax, [ebp - 0x214]
push eax
lea ecx, [ebp + 0x50]
call fcn.0040553a
test eax, eax
jne 0x4215ca
lea ecx, [ebp + 0x50]
call fcn.00402c90
pop edi
lea ecx, [ebp + 0x4c]
call fcn.00439cfd
pop esi
mov eax, ebx
pop ebx
add ebp, 0x70
leave
ret 8