Function at 0x1000499e
Capabilities:
Query environment variable
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffb40
push esi
push edi
push ebx
mov dword [ebp - 4], 0
mov byte [ebp - 5], 1
mov esi, dword [ebp + 8]
push 0x400
push 0x10019e1d
push 6
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
push 0x10019e1d
call sym.dup2patcher.dll_AddMsg
push dword [esi + 0x401]
pop dword [ebp - 0x28]
test dword [esi + 0x401], 8
je 0x100049f3
call fcn.100040df
push dword [esi + 0x401]
push 0
lea eax, [esi + 1]
push eax
call sym.dup2patcher.dll_LoadFileMapping
or eax, eax
jne 0x10004a11
mov byte [ebp - 5], 0
jmp 0x10004e7f
cmp dword [0x1000e4f9], 0x100000
jae 0x10004a24
mov eax, 0x100000
jmp 0x10004a2b
mov eax, dword [0x1000e4f9]
shl eax, 1
mov dword [ebp - 0x44], eax
push 4
push 0x1000
push dword [ebp - 0x44]
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
push 4
push 0x1000
push dword [ebp - 0x44]
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 0x10], eax
mov eax, dword [0x1000e501]
cmp word [eax], 0xfeff
jne 0x10004ab2
add eax, 2
mov ecx, dword [0x1000e4f9]
sub ecx, 2
shr ecx, 1
push 0
push 0
push dword [ebp - 0x44]
push dword [ebp - 0xc]
push ecx
push eax
push 0
push 0
call sub.kernel32.dll_WideCharToMultiByte
push 0x400
push 0x1001a21d
push 0x18
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
push 0x1001a21d
call sym.dup2patcher.dll_AddMsg
mov dword [ebp - 0x40], 1
jmp 0x10004acd
push dword [0x1000e4f9]
push dword [0x1000e501]
push dword [ebp - 0xc]
call sub.kernel32.dll_RtlMoveMemory
mov dword [ebp - 0x40], 0
add esi, 0x408
jmp 0x10004d6c
push dword [esi]
pop dword [ebp - 0x24]
add esi, 8
mov dword [ebp - 0x2c], esi
push dword [esi - 4]
pop dword [ebp - 0x38]
add esi, dword [esi - 4]
add esi, 5
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], esi
push dword [esi - 4]
pop dword [ebp - 0x3c]
push dword [ebp - 0x14]
call fcn.10006cf0
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
push dword [ebp - 0x44]
push edi
call sub.kernel32.dll_RtlZeroMemory
push dword [ebp - 0x30]
test dword [ebp - 0x24], 0x80
je 0x10004b48
push 0x1000
push 0x1000f179
push dword [ebp - 0x2c]
call sub.kernel32.dll_ExpandEnvironmentStringsA
push 0x1000f179
call fcn.10006cf0
mov dword [ebp - 0x38], eax
push 0x1000f179
pop dword [ebp - 0x2c]
test dword [ebp - 0x24], 0x100
je 0x10004b78
push 0x1000
push 0x10010179
push dword [ebp - 0x30]
call sub.kernel32.dll_ExpandEnvironmentStringsA
push 0x10010179
call fcn.10006cf0
mov dword [ebp - 0x3c], eax
push 0x10010179
pop dword [ebp - 0x30]
jmp 0x10004d44
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0x4c0]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x24]
push esi
push dword [ebp - 0x2c]
call fcn.10003e30
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jl 0x10004bec
test dword [ebp - 0x24], 2
je 0x10004bec
mov dword [ebp - 0x1c], eax
cmp esi, dword [ebp - 0x14]
je 0x10004bce
mov eax, esi
dec eax
push str.______________.:_____r_n_t
push eax
call fcn.10007360
or eax, eax
jne 0x10004bce
mov dword [ebp - 0x1c], 0xffffffff
mov eax, esi
add eax, dword [ebp - 0x38]
push str.______________.:_____r_n_t
push eax
call fcn.10007360
or eax, eax
jne 0x10004be9
mov dword [ebp - 0x1c], 0xffffffff
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x20], 0
jl 0x10004d21
test dword [ebp - 0x24], 0x1000
je 0x10004c2a
push esi
lea eax, [ebp - 0x4c0]
push eax
push dword [ebp - 0x20]
push 0x10011179
push dword [ebp - 0x34]
call fcn.10003db0
push 0x10011179
pop dword [ebp - 0x30]
push dword [ebp - 0x30]
call fcn.10006cf0
mov dword [ebp - 0x3c], eax
test dword [ebp - 0x24], 0x40
je 0x10004c85
lea eax, [ebp - 0x444]
cmp dword [0x1001e61d], eax
je 0x10004c85
push dword [ebp - 0x30]
pop dword [0x1001e61d]
lea eax, [ebp - 0x444]
push eax
push 0x10005910
push dword [0x1000d886]
push 3
push dword [0x1000d882]
call sub.user32.dll_DialogBoxParamA
or eax, eax
je 0x10004c85
lea eax, [ebp - 0x444]
push eax
call fcn.10006cf0
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x444]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x448]
jmp 0x10004c91
movsb byte es:[edi], byte [esi]
sub ecx, 1
or ecx, ecx
jne 0x10004c8d
test dword [ebp - 0x24], 8
je 0x10004ca3
add esi, dword [ebp - 0x38]
jmp 0x10004d12
test dword [ebp - 0x24], 4
je 0x10004cc0
push dword [ebp - 0x3c]
push dword [ebp - 0x30]
push edi
call sub.kernel32.dll_RtlMoveMemory
add edi, dword [ebp - 0x3c]
add esi, dword [ebp - 0x38]
jmp 0x10004d12
test dword [ebp - 0x24], 0x10
je 0x10004cea
push dword [ebp - 0x38]
push esi
push edi
call sub.kernel32.dll_RtlMoveMemory
add edi, dword [ebp - 0x38]
add esi, dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [ebp - 0x30]
push edi
call sub.kernel32.dll_RtlMoveMemory
add edi, dword [ebp - 0x3c]
jmp 0x10004d12
test dword [ebp - 0x24], 0x20
je 0x10004d12
push dword [ebp - 0x3c]
push dword [ebp - 0x30]
push edi
call sub.kernel32.dll_RtlMoveMemory
add edi, dword [ebp - 0x3c]
push dword [ebp - 0x38]
push esi
push edi
call sub.kernel32.dll_RtlMoveMemory
add edi, dword [ebp - 0x38]
add esi, dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
sub dword [ebp - 0x18], eax
mov dword [ebp - 4], 1
jmp 0x10004d44
test dword [ebp - 0x24], 0x1000
je 0x10004d40
mov ecx, dword [ebp - 0x18]
jmp 0x10004d33
movsb byte es:[edi], byte [esi]
sub ecx, 1
or ecx, ecx
jne 0x10004d2f
mov dword [ebp - 0x18], 0
jmp 0x10004d44
movsb byte es:[edi], byte [esi]
dec dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0
jne 0x10004b7d
pop dword [ebp - 0x30]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
pop dword [ebp - 0xc]
pop dword [ebp - 0x10]
push dword [ebp - 0xc]
pop dword [ebp - 0x14]
mov esi, dword [ebp - 0x30]
add esi, dword [esi - 4]
add esi, 1
cmp dword [esi + 4], 0
jne 0x10004ad8
push 0
push dword [ebp - 4]
call sym.dup2patcher.dll_CloseFileMapping
mov eax, dword [0x1000e4f1]
test eax, 1
je 0x10004d8f
sub eax, 1
push eax
push 0x1000d8f1
call sub.kernel32.dll_SetFileAttributesA
cmp dword [ebp - 0x40], 1
jne 0x10004de1
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0xc], eax
jne 0x10004dad
mov ebx, dword [ebp - 0x10]
jmp 0x10004db0
mov ebx, dword [ebp - 0xc]
mov word [ebx], 0xfeff
add ebx, 2
push dword [ebp - 0x44]
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x14]
push 0
push 0
call sub.kernel32.dll_MultiByteToWideChar
sub ebx, 2
mov dword [ebp - 0x14], ebx
push dword [ebp - 0x14]
call sub.kernel32.dll_lstrlenW
shl eax, 1
mov dword [0x1000e509], eax
jmp 0x10004dee
push dword [ebp - 0x14]
call fcn.10006cf0
mov dword [0x1000e509], eax
push dword [0x1000e509]
push dword [ebp - 0x14]
push 0x1000d8f1
call sym.dup2patcher.dll_write_disk_file
or eax, eax
jne 0x10004e0b
mov byte [ebp - 5], 0
jmp 0x10004e5f
test dword [ebp - 0x28], 0x10
je 0x10004e5f
push 0
push 0x82
push 3
push 0
push 0
push 0xc0000000
push 0x1000d8f1
call sub.kernel32.dll_CreateFileA
mov dword [0x1000e4f5], eax
cmp eax, 0xffffffff
je 0x10004e5f
push 0x1000f171
push 0x1000f169
push 0x1000f161
push dword [0x1000e4f5]
call sub.kernel32.dll_SetFileTime
push dword [0x1000e4f5]
call sub.kernel32.dll_CloseHandle
push 0x4000
push dword [ebp - 0x44]
push dword [ebp - 0xc]
call sub.kernel32.dll_VirtualFree
push 0x4000
push dword [ebp - 0x44]
push dword [ebp - 0x10]
call sub.kernel32.dll_VirtualFree
cmp dword [ebp - 4], 0
jne 0x10004ea7
push 0x400
push 0x1001a61d
push 0xa
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
mov eax, 0x1001a61d
mov byte [ebp - 5], 0
jmp 0x10004ec3
push 0x400
push 0x1001aa1d
push 0xb
push dword [0x1000d882]
call sub.user32.dll_LoadStringA
mov eax, 0x1001aa1d
push eax
call sym.dup2patcher.dll_AddMsg
mov esi, dword [ebp + 8]
test dword [esi + 0x401], 8
je 0x10004edd
call fcn.1000410a
movzx eax, byte [ebp - 5]
pop ebx
pop edi
pop esi
leave
ret 4