Function at 0x401000
Capabilities:
Accept command line arguments
Get common file path
Get disk size
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x964
mov eax, dword [0x40f284]
xor eax, esp
mov dword [esp + 0x960], eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov ecx, eax
xor eax, eax
push str.AGENTGWLIST
xor ebx, ebx
push ecx
mov dword [esp + 0x1c], ecx
mov dword [0x410a58], eax
mov dword [0x410a5c], eax
mov dword [0x410a60], eax
mov dword [0x410a64], eax
mov dword [0x410a68], eax
mov dword [0x410a6c], eax
mov dword [0x410a70], eax
mov dword [0x410a74], eax
mov dword [0x410a78], eax
mov dword [0x410a7c], eax
mov dword [esp + 0x20], ebx
call fcn.004020c0
add esp, 8
test eax, eax
je 0x40107d
mov dword [esp + 0x18], 1
lea eax, [esp + 0x168]
push eax
push 0x202
mov dword [esp + 0x14], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x1c], eax
call fcn.00401b30
push 0x9c
lea ecx, [esp + 0x4c]
push ebx
push ecx
call fcn.004076b0
add esp, 0xc
lea edx, [esp + 0x48]
push edx
mov dword [esp + 0x4c], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
xor edi, edi
push 0xc
test eax, eax
je 0x40112e
cmp dword [esp + 0x5c], 2
jne 0x401101
push 0x1d4d6
mov ecx, str.Platform_check_passed
call fcn.004019a0
add esp, 8
mov ebx, 0x40da76
xor esi, esi
mov edi, str.SetEnv
call fcn.00401aa0
xor ebx, ebx
jmp 0x4011bc
push 0x1d4d5
mov ecx, str.This_machine_is_not_running_NT_Service_Pack_6_or_higher
call fcn.004019a0
add esp, 8
mov ebx, 0x40da76
mov esi, 0xbc1
mov edi, str.SetEnv
call fcn.00401aa0
xor ebx, ebx
jmp 0x4011b4
push 0x1d4d5
mov ecx, str.This_machine_is_not_running_NT_Service_Pack_6_or_higher
call fcn.004019a0
push 0x200
lea eax, [esp + 0x174]
push ebx
push eax
call fcn.004076b0
add esp, 0x14
push 0x40da76
push 0xbc1
push str.SetEnv
lea ecx, [esp + 0x174]
push str._step__n____key__s__key__n____rc__u__rc__n____msg__s__msg__n__step__n
push ecx
call fcn.00401ff7
lea edx, [esp + 0x17c]
add esp, 0x14
push edx
call fcn.00402146
add eax, 0x20
push eax
call fcn.0040267b
call fcn.00402146
add eax, 0x20
push eax
call fcn.00402485
mov eax, dword [0x410a80]
add esp, 0xc
mov dword [eax*4 + 0x410a58], 0xbc1
inc eax
mov dword [0x410a80], eax
mov dword [esp + 0xc], 1
push 0x400
lea eax, [esp + 0x56c]
push ebx
push eax
call fcn.004076b0
add esp, 0xc
push 0x400
lea ecx, [esp + 0x56c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor eax, eax
push 3
lea edx, [esp + 0x56c]
mov word [esp + 0x14], ax
mov byte [esp + 0x16], al
push edx
lea eax, [esp + 0x18]
push eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0040aeb4
add esp, 4
mov edi, eax
push 0x40dab8
push edi
call fcn.004025be
add esp, 8
cmp eax, ebx
je 0x401249
cmp esi, ebx
jne 0x401249
push eax
call fcn.00402787
add esp, 4
push 0x40dab8
push ebx
mov esi, eax
call fcn.004025be
add esp, 8
cmp eax, ebx
jne 0x401228
mov eax, esi
cdq
and edx, 0x3ff
lea esi, [edx + eax]
sar esi, 0xa
cmp esi, ebx
jne 0x401261
mov esi, 0x64
push edi
call fcn.0040207b
add esp, 4
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
shrd eax, ecx, 0x14
shrd edi, edx, 0x14
shr ecx, 0x14
shr edx, 0x14
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edx
cmp edi, esi
jae 0x4013e2
push 0x200
lea eax, [esp + 0x16c]
push ebx
push eax
call fcn.004076b0
add esp, 0xc
push 0x40
lea ecx, [esp + 0x12c]
push ebx
push ecx
call fcn.004076b0
add esp, 0xc
push 0x40
lea edx, [esp + 0xec]
push ebx
push edx
call fcn.004076b0
add esp, 0xc
push esi
lea eax, [esp + 0x12c]
push 0x40dabc
push eax
call fcn.00401ff7
add esp, 0xc
push edi
lea ecx, [esp + 0xec]
push 0x40dabc
push ecx
call fcn.00401ff7
add esp, 0xc
push edi
push esi
lea edx, [esp + 0x170]
push str.There_is_not_enough_disk_space_to_complete_the_n_installation.__uMB_is_required__and_only__uMB_is_available.
push edx
call fcn.00401ff7
lea ecx, [esp + 0xf8]
lea eax, [esp + 0x138]
mov dword [esp + 0x48], ecx
push 0xd
push 0x1d4d8
lea edi, [esp + 0x4c]
lea ecx, [esp + 0x180]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x54], ebx
call fcn.004019a0
push 0x200
lea edx, [esp + 0x384]
push ebx
push edx
call fcn.004076b0
add esp, 0x24
lea eax, [esp + 0x168]
push eax
push 0x3e80
push str.DiskSpace
lea ecx, [esp + 0x374]
push str._step__n____key__s__key__n____rc__u__rc__n____msg__s__msg__n__step__n
push ecx
call fcn.00401ff7
lea edx, [esp + 0x37c]
add esp, 0x14
push edx
call fcn.00402146
add eax, 0x20
push eax
call fcn.0040267b
call fcn.00402146
add eax, 0x20
push eax
call fcn.00402485
mov eax, dword [0x410a80]
mov dword [eax*4 + 0x410a58], 0x3e80
mov dword [esp + 0x18], 1
jmp 0x40145b
push 0xd
push 0x1d4d4
xor edi, edi
mov ecx, str.Disk_space_check_passed
call fcn.004019a0
push 0x200
lea eax, [esp + 0x374]
push ebx
push eax
call fcn.004076b0
add esp, 0x14
push 0x40da76
push ebx
push str.DiskSpace
lea ecx, [esp + 0x374]
push str._step__n____key__s__key__n____rc__u__rc__n____msg__s__msg__n__step__n
push ecx
call fcn.00401ff7
lea edx, [esp + 0x37c]
add esp, 0x14
push edx
call fcn.00402146
add eax, 0x20
push eax
call fcn.0040267b
call fcn.00402146
add eax, 0x20
push eax
call fcn.00402485
mov eax, dword [0x410a80]
mov dword [eax*4 + 0x410a58], ebx
inc eax
add esp, 0xc
mov dword [0x410a80], eax
cmp dword [esp + 0x18], ebx
jne 0x401800
cmp dword [esp + 0x1c], ebx
je 0x4016dd
mov ecx, 0x3ec
mov edx, str.spin
call fcn.00401dc0
xor edi, edi
dec eax
je 0x40150a
dec eax
push 0x14
je 0x4014da
dec eax
je 0x4014aa
push 0x1d4c4
mov ecx, str.Error_when_attempting_to_contact_the_Data_Access_Engine
call fcn.004019a0
mov esi, 0x2eea
jmp 0x4014ee
push 0x1d4c3
mov ecx, str.Unsuccessful_name_resolution_for_the_Data_Access_Engine
call fcn.004019a0
add esp, 8
mov ebx, 0x40da76
mov esi, 0x1b62
mov edi, str.SpinResolv
call fcn.00401aa0
mov dword [esp + 0xc], 1
jmp 0x40154c
push 0x1d4c0
mov ecx, str.Unable_to_connect_to_the_Data_Access_Engine_on_port_1004
call fcn.004019a0
mov esi, 0x2eeb
mov ebx, 0x40da76
add esp, 8
mov edi, str.SpinPort
call fcn.00401aa0
mov dword [esp + 0xc], 1
jmp 0x40154c
push 0xf
push 0x1d4c2
mov ecx, str.Successful_name_resolution_for_the_Data_Access_Engine
call fcn.004019a0
push 0x14
push 0x1d4c1
xor edi, edi
mov ecx, str.Successfully_connected_to_the_Data_Access_Engine_on_port_1004
call fcn.004019a0
add esp, 0x10
mov ebx, 0x40da76
xor esi, esi
mov edi, str.SpinResolv
call fcn.00401aa0
mov edi, str.SpinPort
call fcn.00401aa0
mov ecx, 0x3fa
mov edx, 0x40dc94
call fcn.00401dc0
xor edi, edi
dec eax
je 0x4015de
dec eax
push 0x1e
je 0x4015ae
dec eax
je 0x40157e
push 0x1d4cd
mov ecx, str.Error_when_attempting_to_contact_the_Command_Engine
call fcn.004019a0
mov esi, 0x32d2
jmp 0x4015c2
push 0x1d4cc
mov ecx, str.Unsuccessful_name_resolution_for_the_Command_Engine
call fcn.004019a0
add esp, 8
mov ebx, 0x40da76
mov esi, 0x1f4a
mov edi, str.WayResolv
call fcn.00401aa0
mov dword [esp + 0xc], 1
jmp 0x401620
push 0x1d4ca
mov ecx, str.Unable_to_connect_to_the_Command_Engine_on_port_1018
call fcn.004019a0
mov esi, 0x32d3
mov ebx, 0x40da76
add esp, 8
mov edi, str.WayPort
call fcn.00401aa0
mov dword [esp + 0xc], 1
jmp 0x401620
push 0x19
push 0x1d4ce
mov ecx, str.Succesful_name_resolution_for_the_Command_Engine
call fcn.004019a0
push 0x1e
push 0x1d4cb
xor edi, edi
mov ecx, str.Successfully_connected_to_the_Command_Engine_on_port_1018
call fcn.004019a0
add esp, 0x10
mov ebx, 0x40da76
xor esi, esi
mov edi, str.WayResolv
call fcn.00401aa0
mov edi, str.WayPort
call fcn.00401aa0
mov ecx, 0x3eb
mov edx, str.theword
call fcn.00401dc0
xor edi, edi
dec eax
je 0x401696
dec eax
push 0x28
je 0x401678
dec eax
je 0x40165a
push 0x1d4c8
mov ecx, str.Error_when_attempting_to_contact_the_Software_Repository
call fcn.004019a0
mov esi, 0x36ba
mov edi, str.WordPort
jmp 0x4018b8
push 0x1d4c7
mov ecx, str.Unsuccessful_name_resolution_for_the_Software_Repository
call fcn.004019a0
mov esi, 0x271a
mov edi, str.WordResolv
jmp 0x4018b8
push 0x1d4c5
mov ecx, str.Unable_to_connect_to_the_Software_Repository_on_port_1003
call fcn.004019a0
mov esi, 0x36bb
mov edi, str.WordPort
jmp 0x4018b8
push 0x23
push 0x1d4c9
mov ecx, str.Successful_name_resolution_for_the_Software_Repository
call fcn.004019a0
push 0x28
push 0x1d4c6
xor edi, edi
mov ecx, str.Successfully_connected_to_the_Software_Repository_on_port_1003
call fcn.004019a0
add esp, 0x10
mov ebx, 0x40da76
xor esi, esi
mov edi, str.WordResolv
call fcn.00401aa0
mov edi, str.WordPort
call fcn.00401aa0
jmp 0x4018cd
push 0x14
push 0x1d4c4
xor edi, edi
mov ecx, str.Error_when_attempting_to_contact_the_Data_Access_Engine
call fcn.004019a0
mov ebx, 0x40da76
mov esi, 0x2eea
mov edi, str.SpinPort
call fcn.00401aa0
push 0x1e
push 0x1d4cd
xor edi, edi
mov ecx, str.Error_when_attempting_to_contact_the_Command_Engine
call fcn.004019a0
mov esi, 0x32d2
mov edi, str.WayPort
call fcn.00401aa0
push 0x28
push 0x1d4c8
xor edi, edi
mov ecx, str.Error_when_attempting_to_contact_the_Software_Repository
call fcn.004019a0
add esp, 0x18
mov esi, 0x36ba
mov edi, str.WordPort
call fcn.00401aa0
push 0x32
push 0x1d4d1
xor edi, edi
mov ecx, str.Unable_to_determine_if_local_port_1002_is_available
call fcn.004019a0
push 0x200
lea ecx, [esp + 0x374]
push edi
push ecx
call fcn.004076b0
add esp, 0x14
push 0x40da76
push 0x2b03
push str.AgentPort
lea edx, [esp + 0x374]
push str._step__n____key__s__key__n____rc__u__rc__n____msg__s__msg__n__step__n
push edx
call fcn.00401ff7
lea eax, [esp + 0x37c]
add esp, 0x14
push eax
call fcn.00402146
add eax, 0x20
push eax
call fcn.0040267b
call fcn.00402146
add eax, 0x20
push eax
call fcn.00402485
mov eax, dword [0x410a80]
add esp, 0xc
mov dword [eax*4 + 0x410a58], 0x2b03
inc eax
mov dword [0x410a80], eax
mov dword [esp + 0xc], 1
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x96c]
pop edi
neg eax
pop esi
sbb eax, eax
pop ebx
xor ecx, esp
call fcn.00401fe8
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
push str._AGENTGWLIST
push eax
call fcn.004020c0
add eax, 0xd
push 0x40df20
push eax
call fcn.004025be
push 0xff
lea ecx, [esp + 0x17d]
push ebx
push ecx
mov edi, eax
mov byte [esp + 0x184], bl
call fcn.004076b0
add esp, 0x1c
cmp edi, ebx
je 0x40189b
push 0x100
lea edx, [esp + 0x16c]
push ebx
push edx
call fcn.004076b0
lea eax, [esp + 0x20]
add esp, 0xc
push eax
lea ecx, [esp + 0x16c]
call fcn.00401c40
add esp, 4
test eax, eax
je 0x401887
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x168]
call fcn.00401dc0
cmp eax, 1
je 0x401919
push 0x40df20
push ebx
call fcn.004025be
mov edi, eax
add esp, 8
cmp edi, ebx
jne 0x401840
push 0x2d
push 0x1d4d3
xor edi, edi
mov ecx, str.Gateway_reachability_check_failed
call fcn.004019a0
mov esi, 0x4277
mov edi, str.GatewayCheck
add esp, 8
mov ebx, 0x40da76
call fcn.00401aa0
mov dword [esp + 0xc], 1
cmp dword [esp + 0x1c], 0
je 0x40174b
mov ecx, 0x3ea
xor edx, edx
call fcn.00401dc0
xor edi, edi
dec eax
push 0x32
je 0x40196a
dec eax
je 0x401942
push 0x1d4d1
mov ecx, str.Unable_to_determine_if_local_port_1002_is_available
call fcn.004019a0
add esp, 8
mov ebx, 0x40da76
mov esi, 0x2b03
mov edi, str.AgentPort
call fcn.00401aa0
jmp 0x4017d5
push 0x2d
push 0x1d4d2
xor edi, edi
mov ecx, str.Gateway_reachability_check_passed
call fcn.004019a0
add esp, 8
mov ebx, 0x40da76
xor esi, esi
mov edi, str.GatewayCheck
call fcn.00401aa0
jmp 0x4018cd
push 0x1d4cf
mov ecx, str.Local_port_1002_is_available_for_the_agents_use
call fcn.004019a0
add esp, 8
mov ebx, 0x40da76
xor esi, esi
mov edi, str.AgentPort
call fcn.00401aa0
jmp 0x4017dd
push 0x1d4d0
mov ecx, str.Local_port_1002_is_currently_in_use
call fcn.004019a0
add esp, 8
mov ebx, 0x40da76
mov esi, 0x2b02
mov edi, str.AgentPort
call fcn.00401aa0
jmp 0x4017d5