Function at 0x402130
Capabilities:
Accept command line arguments
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
lea eax, [ebp - 8]
xor esi, esi
push eax
push 8
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402177
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 4
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push 0x14
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
cmovne esi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
test eax, eax
je 0x402185
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4023e4
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
test eax, eax
je 0x4023e4
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, dword [ebp - 0x14]
mov ebx, eax
test edi, edi
jle 0x4023e4
xor esi, esi
nop dword [eax]
push 0x413fa8
push dword [ebx + esi*4]
call fcn.00402c93
add esp, 8
test eax, eax
je 0x4021d9
inc esi
cmp esi, edi
jl 0x4021c0
lea eax, [edi - 1]
cmp esi, eax
jge 0x4023e4
mov edi, dword [ebx + esi*4 + 4]
test edi, edi
je 0x4023da
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4021f5
sub ecx, edx
sar ecx, 1
je 0x4023da
lea ebx, [ecx + ecx]
lea eax, [ebx + 2]
push eax
call fcn.00402f3f
mov esi, eax
add esp, 4
test esi, esi
je 0x4023da
push ebx
push edi
push esi
call fcn.0040a4b0
add esp, 0xc
mov dword [0x417398], esi
xor eax, eax
mov word [ebx + esi], ax
call fcn.004017a0
mov esi, eax
test esi, esi
je 0x4023e4
push 0
push esi
push dword [0x417398]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [0x417398]
mov edi, eax
test ecx, ecx
je 0x40226d
push ecx
call fcn.00402db6
add esp, 4
mov dword [0x417398], esi
test edi, edi
je 0x4023e4
mov ecx, esi
call fcn.004011a0
test eax, eax
je 0x4023c9
mov esi, dword [0x417398]
test esi, esi
je 0x4023c9
call fcn.00402710
test al, al
je 0x4023c9
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
xor ebx, ebx
push ebx
push esi
mov esi, dword [0x4173b4]
mov ecx, esi
mov dword [ebp - 8], ebx
call dword [0x40f180]
call esi
test eax, eax
jne 0x4022d8
mov ecx, dword [ebp - 0xc]
call fcn.004028c0
mov ebx, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4022f0
mov esi, dword [0x4173a8]
mov ecx, esi
push eax
call dword [0x40f180]
call esi
test ebx, ebx
je 0x4023c9
mov esi, str.5.0.0.1
mov byte [ebp - 1], 0
mov edi, ebx
mov dword [ebp - 0x10], esi
push 0x2e
push edi
call fcn.0040a23c
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x402336
mov eax, edi
lea edx, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402320
sub eax, edx
mov byte [ebp - 1], 1
sar eax, 1
lea ebx, [edi + eax*2]
push 0x2e
push esi
call fcn.0040a23c
mov esi, eax
add esp, 8
test esi, esi
jne 0x402366
mov ecx, dword [ebp - 0x10]
mov edx, ecx
lea esi, [edx + 2]
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x402350
sub edx, esi
mov byte [ebp - 1], 1
sar edx, 1
lea esi, [ecx + edx*2]
mov edx, ebx
mov ecx, edi
sub edx, edi
sar edx, 1
call fcn.00402ac0
mov ecx, dword [ebp - 0x10]
mov edx, esi
sub edx, dword [ebp - 0x10]
mov edi, eax
sar edx, 1
call fcn.00402ac0
cmp edi, eax
ja 0x40239d
jb 0x4023bd
add esi, 2
lea edi, [ebx + 2]
cmp byte [ebp - 1], 0
mov dword [ebp - 0x10], esi
je 0x402306
mov eax, dword [ebp - 8]
push eax
call fcn.00402db6
add esp, 4
call fcn.00401ed0
test al, al
je 0x4023c9
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 8]
push eax
call fcn.00402db6
add esp, 4
call fcn.00402090
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov dword [0x417398], 0
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 0x10