Function at 0x1000498e
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 0x10019e3d
push 6
push dword [0x1000d8a2]
call sub.user32.dll_LoadStringA
push 0x10019e3d
call sym.dup2patcher.dll_AddMsg
push dword [esi + 0x401]
pop dword [ebp - 0x28]
test dword [esi + 0x401], 8
je 0x100049e3
call fcn.100040cf
push dword [esi + 0x401]
push 0
lea eax, [esi + 1]
push eax
call sym.dup2patcher.dll_LoadFileMapping
or eax, eax
jne 0x10004a01
mov byte [ebp - 5], 0
jmp 0x10004e7d
cmp dword [0x1000e519], 0x100000
jae 0x10004a14
mov eax, 0x100000
jmp 0x10004a1b
mov eax, dword [0x1000e519]
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 [0x1000e521]
cmp word [eax], 0xfeff
jne 0x10004aa2
add eax, 2
mov ecx, dword [0x1000e519]
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 0x1001a23d
push 0x18
push dword [0x1000d8a2]
call sub.user32.dll_LoadStringA
push 0x1001a23d
call sym.dup2patcher.dll_AddMsg
mov dword [ebp - 0x40], 1
jmp 0x10004abd
push dword [0x1000e519]
push dword [0x1000e521]
push dword [ebp - 0xc]
call sub.kernel32.dll_RtlMoveMemory
mov dword [ebp - 0x40], 0
add esi, 0x408
jmp 0x10004d6a
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.10006c90
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 0x10004b38
push 0x1000
push 0x1000f199
push dword [ebp - 0x2c]
call sub.kernel32.dll_ExpandEnvironmentStringsA
push 0x1000f199
call fcn.10006c90
mov dword [ebp - 0x38], eax
push 0x1000f199
pop dword [ebp - 0x2c]
test dword [ebp - 0x24], 0x100
je 0x10004b68
push 0x1000
push 0x10010199
push dword [ebp - 0x30]
call sub.kernel32.dll_ExpandEnvironmentStringsA
push 0x10010199
call fcn.10006c90
mov dword [ebp - 0x3c], eax
push 0x10010199
pop dword [ebp - 0x30]
jmp 0x10004d42
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.10003e20
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jl 0x10004bdc
test dword [ebp - 0x24], 2
je 0x10004bdc
mov dword [ebp - 0x1c], eax
cmp esi, dword [ebp - 0x14]
je 0x10004bbe
mov eax, esi
dec eax
push str.______________.:_____r_n_t
push eax
call fcn.10007300
or eax, eax
jne 0x10004bbe
mov dword [ebp - 0x1c], 0xffffffff
mov eax, esi
add eax, dword [ebp - 0x38]
push str.______________.:_____r_n_t
push eax
call fcn.10007300
or eax, eax
jne 0x10004bd9
mov dword [ebp - 0x1c], 0xffffffff
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x20], 0
jl 0x10004d1f
test dword [ebp - 0x24], 0x1000
je 0x10004c1a
push esi
lea eax, [ebp - 0x4c0]
push eax
push dword [ebp - 0x20]
push 0x10011199
push dword [ebp - 0x34]
call fcn.10003da0
push 0x10011199
pop dword [ebp - 0x30]
push dword [ebp - 0x30]
call fcn.10006c90
mov dword [ebp - 0x3c], eax
test dword [ebp - 0x24], 0x40
je 0x10004c75
lea eax, [ebp - 0x444]
cmp dword [0x1001e63d], eax
je 0x10004c75
push dword [ebp - 0x30]
pop dword [0x1001e63d]
lea eax, [ebp - 0x444]
push eax
push 0x100058b0
push dword [0x1000d8a6]
push 3
push dword [0x1000d8a2]
call sub.user32.dll_DialogBoxParamA
or eax, eax
je 0x10004c75
lea eax, [ebp - 0x444]
push eax
call fcn.10006c90
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x444]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x448]
jmp 0x10004c81
movsb byte es:[edi], byte [esi]
sub ecx, 1
or ecx, ecx
jne 0x10004c7d
test dword [ebp - 0x24], 8
je 0x10004c93
add esi, dword [ebp - 0x38]
jmp 0x10004d02
test dword [ebp - 0x24], 4
je 0x10004cb0
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 0x10004d02
test dword [ebp - 0x24], 0x10
je 0x10004cda
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 0x10004d02
test dword [ebp - 0x24], 0x20
je 0x10004d02
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]
cmp byte [esi], 0
je 0x10004d0f
mov eax, dword [ebp - 0x38]
sub dword [ebp - 0x18], eax
jmp 0x10004d16
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 1
jmp 0x10004d42
test dword [ebp - 0x24], 0x1000
je 0x10004d3e
mov ecx, dword [ebp - 0x18]
jmp 0x10004d31
movsb byte es:[edi], byte [esi]
sub ecx, 1
or ecx, ecx
jne 0x10004d2d
mov dword [ebp - 0x18], 0
jmp 0x10004d42
movsb byte es:[edi], byte [esi]
dec dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0
jne 0x10004b6d
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 0x10004ac8
push 0
push dword [ebp - 4]
call sym.dup2patcher.dll_CloseFileMapping
mov eax, dword [0x1000e511]
test eax, 1
je 0x10004d8d
sub eax, 1
push eax
push 0x1000d911
call sub.kernel32.dll_SetFileAttributesA
cmp dword [ebp - 0x40], 1
jne 0x10004ddf
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0xc], eax
jne 0x10004dab
mov ebx, dword [ebp - 0x10]
jmp 0x10004dae
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 [0x1000e529], eax
jmp 0x10004dec
push dword [ebp - 0x14]
call fcn.10006c90
mov dword [0x1000e529], eax
push dword [0x1000e529]
push dword [ebp - 0x14]
push 0x1000d911
call sym.dup2patcher.dll_write_disk_file
or eax, eax
jne 0x10004e09
mov byte [ebp - 5], 0
jmp 0x10004e5d
test dword [ebp - 0x28], 0x10
je 0x10004e5d
push 0
push 0x82
push 3
push 0
push 0
push 0xc0000000
push 0x1000d911
call sub.kernel32.dll_CreateFileA
mov dword [0x1000e515], eax
cmp eax, 0xffffffff
je 0x10004e5d
push 0x1000f191
push 0x1000f189
push 0x1000f181
push dword [0x1000e515]
call sub.kernel32.dll_SetFileTime
push dword [0x1000e515]
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 0x10004ea5
push 0x400
push 0x1001a63d
push 0xa
push dword [0x1000d8a2]
call sub.user32.dll_LoadStringA
mov eax, 0x1001a63d
mov byte [ebp - 5], 0
jmp 0x10004ec1
push 0x400
push 0x1001aa3d
push 0xb
push dword [0x1000d8a2]
call sub.user32.dll_LoadStringA
mov eax, 0x1001aa3d
push eax
call sym.dup2patcher.dll_AddMsg
mov esi, dword [ebp + 8]
test dword [esi + 0x401], 8
je 0x10004edb
call fcn.100040fa
movzx eax, byte [ebp - 5]
pop ebx
pop edi
pop esi
leave
ret 4