Function at 0x510bc0
Capabilities:
Accept command line arguments
Create thread
Get disk information
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f0b74
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x69001c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x28], ebx
lea ecx, [ebx + 0x1c]
mov dword [ebp - 0x3c], 0
push 0x1b
call fcn.00527b80
mov dword [ebp - 0x30], eax
test eax, eax
je 0x510c77
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
call fcn.0058f657
push 0
push 0x2710
push 0
push esi
mov ebx, eax
mov edi, edx
call fcn.005910e0
sub ebx, eax
push 0
push 0x989680
sbb edi, edx
push edi
push ebx
call fcn.005afd90
mov esi, dword [ebp - 0x30]
mov edi, eax
mov ebx, edx
mov ecx, dword [esi + 4]
cmp dword [ecx - 4], 1
jle 0x510c58
push dword [ecx - 0xc]
lea ecx, [esi + 4]
call fcn.004095d0
mov ecx, dword [esi + 4]
push ecx
call fcn.00599654
cdq
add esp, 4
cmp ebx, edx
jg 0x510c74
jl 0x510c6c
cmp edi, eax
ja 0x510c74
or eax, 0xffffffff
jmp 0x511625
mov ebx, dword [ebp - 0x28]
push 3
lea ecx, [ebx + 0x1c]
mov byte [ebp - 0x29], 0
call fcn.00527b80
or edi, 0xffffffff
mov dword [ebp - 0x14], eax
mov ecx, ebx
test eax, eax
je 0x510d8e
lea esi, [eax + 4]
call fcn.005155a0
mov edx, eax
mov ecx, esi
call fcn.0040e730
test al, al
je 0x510cb6
mov ecx, ebx
call fcn.005146b0
jmp 0x511625
lea ecx, [ebx + 0x30]
push esi
call fcn.00518a30
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.004feff0
mov dword [ebp - 4], 0
mov ecx, 0x697f80
push eax
call fcn.0041b220
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x510cfc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x697f80]
mov edx, dword [eax - 0xc]
test edx, edx
jle 0x510d2e
lea esi, [edx - 1]
test esi, esi
js 0x511643
cmp esi, edx
jg 0x511643
cmp word [eax + esi*2], 0x5c
je 0x510d2e
push 0x5c
mov ecx, 0x697f80
call fcn.0041b3b0
mov ecx, ebx
call fcn.005155a0
lea ecx, [ebp - 0x28]
push dword [eax]
call fcn.00416940
mov dword [ebp - 4], 2
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebx + 0x140]
call fcn.0050f1e0
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x510d76
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x14]
lea ecx, [ebx + 4]
add eax, 4
push eax
call fcn.0041b220
mov byte [ebp - 0x29], 1
lea esi, [ebx + 0x30]
jmp 0x510d9e
lea esi, [ebx + 0x30]
call fcn.005155a0
push eax
mov ecx, esi
call fcn.00518a30
lea eax, [ebx + 0x28]
push eax
lea ecx, [esi + 0x74]
call fcn.0041b220
cmp byte [0x697f7c], 0
je 0x510ed9
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51164d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x28]
push 0x12
push str.Full_command_line:
call fcn.0041a840
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
test edx, edx
je 0x510e19
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x510e00
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.0041a840
lea eax, [ebp - 0x28]
mov ecx, 0x697f44
push eax
call fcn.00531fd0
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x510e48
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [0x697f7c], 0
je 0x510ed9
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51164d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 0xb
lea ecx, [ebp - 0x28]
push 0x1c
push str.Command_line_to_pass_to_MSI:
call fcn.0041a840
mov esi, dword [ebx + 0x28]
test esi, esi
je 0x510eaa
mov edx, esi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x510e91
sub edx, ecx
lea ecx, [ebp - 0x28]
sar edx, 1
push edx
push esi
call fcn.0041a840
lea eax, [ebp - 0x28]
mov ecx, 0x697f44
push eax
call fcn.00531fd0
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x510ed9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea esi, [ebx + 0x90]
lea ecx, [ebx + 0x188]
push esi
call fcn.0051f2b0
mov edx, esi
lea ecx, [ebp - 0x14]
call fcn.004feff0
mov dword [ebp - 4], 0xe
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x510f25
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebx + 0x30]
call fcn.00518f60
mov dword [ebp - 0x30], eax
lea ecx, [ebx + 0x30]
test eax, eax
je 0x510f9f
mov dword [ebp - 4], 0x10
mov ecx, dword [ecx + 0xd4]
sub ecx, 0x10
call fcn.00409460
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x30]
mov ecx, ebx
mov dword [ebp - 0x3c], 4
call fcn.00515480
mov eax, 4
mov dword [ebp - 0x3c], eax
and eax, 0xfffffffb
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x510f95
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
jmp 0x511625
lea esi, [ebx + 0x204]
mov dword [ebp - 0x54], 0x630ad0
lea eax, [ebp - 0x54]
mov dword [esi + 0x70], ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x54], 0x630d4c
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 4], 0x15
test byte [ebx + 0x74], 2
je 0x51106f
push eax
mov ecx, ebx
call fcn.00511710
lea eax, [ebp - 0x54]
mov ecx, esi
push eax
call fcn.005073b0
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x24]
push ecx
mov esi, esp
mov dword [ebp - 0x14], esp
mov dword [ebp - 0x30], esi
mov ecx, dword [eax]
sub ecx, 0x10
call fcn.00409460
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0x17
mov byte [ebp - 4], 0x15
lea ecx, [ebx + 0x30]
call fcn.00518b80
lea esi, [ebx + 0x204]
mov ecx, esi
call fcn.00506f90
push eax
lea ecx, [ebx + 0x30]
call fcn.0051d020
lea eax, [ebx + 0x260]
push eax
lea ecx, [ebx + 0x10c]
call fcn.0041b220
lea eax, [ebx + 0x24c]
mov ecx, ebx
push eax
call fcn.00514620
push 0x1a
lea ecx, [ebx + 0x1c]
call fcn.00527b80
test eax, eax
je 0x51106f
mov byte [ebx + 0x128], 1
push 6
lea ecx, [ebx + 0x1c]
call fcn.00527b80
mov dword [ebp - 0x28], eax
test eax, eax
je 0x51108b
push 1
mov ecx, esi
call fcn.00506aa0
jmp 0x5110c3
push 7
lea ecx, [ebx + 0x1c]
call fcn.00527b80
mov dword [ebp - 0x28], eax
test eax, eax
je 0x5110a0
push 1
jmp 0x5110bc
push 8
lea ecx, [ebx + 0x1c]
call fcn.00527b80
mov dword [ebp - 0x28], eax
test eax, eax
je 0x5110c3
push 0
mov ecx, esi
call fcn.00506aa0
push 0
mov ecx, esi
call fcn.00506ce0
cmp byte [ebp + 8], 0
je 0x5110da
mov dword [ebx + 0xc0], 3
xor esi, esi
jmp 0x511607
mov ecx, esi
call fcn.005069b0
test al, al
mov byte [ebx + 0x1f8], al
mov ecx, ebx
sete byte [0x690c04]
call fcn.00511890
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51164d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 0x18
mov eax, str.Advinst_
lea ecx, [ebp - 0x38]
test eax, 0xffff0000
jne 0x51112f
movzx eax, ax
push eax
call fcn.004091a0
jmp 0x51113b
push 8
push str.Advinst_
call fcn.004097d0
mov byte [ebp - 4], 0x19
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebx + 0x30]
call fcn.00519180
mov byte [ebp - 4], 0x1a
lea ecx, [ebp - 0x38]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0041a840
mov byte [ebp - 4], 0x19
mov eax, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51117b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x38]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [0x691468]
mov esi, eax
mov eax, ecx
cmp esi, ecx
je 0x5111b0
mov edx, dword [0x691464]
mov ecx, 0x691464
call dword [edx + 4]
mov ecx, esi
mov eax, esi
mov dword [0x691468], ecx
test eax, eax
je 0x5111d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x691468]
cmp eax, 0xb7
jne 0x5111d7
push ecx
mov byte [0x69146c], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x51122c
cmp byte [0x69146c], 0
je 0x5111e9
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x51122c
test ecx, ecx
je 0x51122c
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0
push 0x691460
push 0x528930
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
cmp esi, dword [0x691474]
je 0x51122c
mov edx, dword [0x691470]
mov ecx, 0x691470
call dword [edx + 4]
mov dword [0x691474], esi
cmp dword [ebp - 0x28], 0
jne 0x511288
cmp byte [0x69146c], 0
je 0x511288
mov edx, 0xcc
mov dword [ebx + 0xc0], 3
lea ecx, [ebp - 0x28]
call fcn.005273f0
mov byte [ebp - 4], 0x1c
mov dl, 1
lea ecx, [ebp - 0x28]
call fcn.00509060
mov byte [ebp - 4], 0x19
mov eax, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51127e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, 1
jmp 0x5115eb
mov ecx, ebx
call fcn.005131b0
push ecx
push 0
lea esi, [ebx + 0x188]
push 0xdc
mov ecx, esi
call fcn.0051f350
test byte [ebx + 0x74], 2
je 0x5112ed
cmp byte [ebx + 0x1f8], 0
mov dword [ebp - 0x18], 0x62d6e4
mov dword [ebp - 0x14], ebx
je 0x5112cb
push 0
push 0
lea ecx, [ebp - 0x18]
call fcn.00510270
jmp 0x5112ed
push ecx
lea ecx, [ebp - 0x18]
call fcn.0041bb10
movzx eax, al
mov ecx, esi
push eax
push 0xdc
call fcn.0051f350
lea eax, [ebp - 0x18]
push eax
call fcn.0051f5d0
cmp byte [ebx + 0x1dc], 0
jne 0x5113fd
push 0x12
lea ecx, [ebx + 0x1c]
call fcn.00527b80
test eax, eax
jne 0x5113fd
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x511657
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 0x1f
lea eax, [ebp - 0x14]
push eax
push 0x12
lea ecx, [ebx + 0x1c]
call fcn.00527a90
mov byte [ebp - 4], 0x19
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x511353
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx + 0x21c]
mov dword [ebp - 0x30], 0x62d654
cmp dword [eax - 0xc], 0
je 0x5113f7
cmp byte [ebx + 0x1f8], 0
jne 0x5113f7
mov edx, 0x691484
lea ecx, [ebp - 0x30]
call fcn.0052a720
lea esi, [ebx + 0x188]
test al, al
je 0x5113fd
cmp byte [ebx + 0x1f8], 0
lea eax, [ebx + 0x220]
mov dword [ebp - 0x1c], eax
lea eax, [ebx + 0x21c]
mov dword [ebp - 0x24], 0x62d6f4
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
je 0x5113c8
push 0
push 0
lea ecx, [ebp - 0x24]
call fcn.005101e0
jmp 0x5113ea
push ecx
lea ecx, [ebp - 0x24]
call fcn.00427e00
movzx eax, al
mov ecx, esi
push eax
push 0x101
call fcn.0051f350
lea eax, [ebp - 0x24]
push eax
call fcn.0051f5d0
cmp dword [ebp - 0x14], 1
jne 0x5113fd
xor esi, esi
jmp 0x5115eb
lea esi, [ebx + 0x188]
test byte [ebx + 0x74], 4
je 0x511456
cmp byte [ebx + 0x1f8], 0
mov dword [ebp - 0x1c], 0x62d6ec
mov dword [ebp - 0x18], ebx
je 0x511424
push 0
push 0
lea ecx, [ebp - 0x1c]
call fcn.00510390
jmp 0x511446
push ecx
lea ecx, [ebp - 0x1c]
call fcn.0041bb10
movzx eax, al
mov ecx, esi
push eax
push 0x8a
call fcn.0051f350
lea eax, [ebp - 0x1c]
push eax
call fcn.0051f5d0
cmp byte [ebp - 0x14], 0
je 0x511456
mov esi, 1
jmp 0x5115eb
mov ecx, ebx
call fcn.00511b70
cmp byte [ebp - 0x29], 0
jne 0x5114dd
mov eax, dword [ebx + 0x74]
test al, 1
je 0x5114dd
test eax, 0x2000
jne 0x5114dd
mov ecx, ebx
call fcn.005155a0
mov edx, eax
mov eax, dword [edx]
cmp dword [eax - 0xc], 3
jl 0x5114dd
cmp word [eax], 0x5c
jne 0x511496
cmp word [eax + 2], 0x5c
jne 0x511496
cmp word [eax + 4], 0x5c
jne 0x5114dd
xor ecx, ecx
test ecx, ecx
js 0x511643
mov eax, dword [edx]
cmp ecx, dword [eax - 0xc]
jg 0x511643
mov ax, word [eax + ecx*2]
mov word [ebp + ecx*2 - 0x18], ax
inc ecx
cmp ecx, 3
jl 0x511498
xor eax, eax
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x5114dd
mov ecx, ebx
call fcn.005146b0
mov esi, eax
jmp 0x5115eb
mov ecx, ebx
call fcn.00511c00
mov ecx, dword [ebx + 0x28]
sub ecx, 0x10
call fcn.00409460
add eax, 0x10
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 0x22
mov eax, dword [ebp - 0x34]
cmp dword [eax - 0xc], 0
jne 0x51154c
lea eax, [ebx + 0x214]
push eax
lea ecx, [ebp - 0x34]
call fcn.0041b220
push 0
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x14]
call fcn.00520a60
add esp, 4
mov byte [ebp - 4], 0x23
lea ecx, [ebp - 0x34]
push eax
call fcn.0041b220
mov byte [ebp - 4], 0x22
mov eax, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51154c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebx + 0x194]
call fcn.00518060
mov eax, dword [ebx + 0x23c]
mov ecx, ebx
mov dword [ebx + 0xc0], eax
mov al, byte [ebx + 0x240]
mov byte [ebx + 0xc4], al
lea eax, [ebp - 0x34]
push eax
call fcn.00512000
mov ecx, ebx
mov esi, eax
call fcn.00516370
cmp byte [ebx + 0x1f8], 0
lea eax, [ebx + 0x30]
mov dword [ebp - 0x44], 0x62d6dc
mov dword [ebp - 0x40], eax
je 0x5115a7
push 0
push 0
lea ecx, [ebp - 0x44]
call fcn.00510490
jmp 0x5115cd
push ecx
lea ecx, [ebp - 0x44]
call fcn.0041bb10
movzx eax, al
lea ecx, [ebx + 0x188]
push eax
push 0x10a
call fcn.0051f350
lea eax, [ebp - 0x44]
push eax
call fcn.0051f5d0
mov byte [ebp - 4], 0x19
mov eax, edi
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x5115eb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x15
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x511607
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x54]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.00517b60
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059046a
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00409920
push 0x80004005
call fcn.00409920
push 0x80004005
call fcn.00409920
int3