Function at 0x410271
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c4
mov eax, dword [0x46b880]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
push 0x800
call dword [sym.imp.KERNEL32.dll_SetDefaultDllDirectories]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetSearchPathMode]
xor ebx, ebx
mov edi, 0x46b234
push 7
pop ecx
test esi, esi
je 0x41067d
xor eax, eax
mov dword [ebp - 0x104], ebx
mov word [ebp - 0x114], ax
mov word [ebp - 0x15c], ax
mov word [ebp - 0xe4], ax
mov word [ebp - 0x12c], ax
lea eax, [ebp - 0x99c]
push eax
push esi
mov dword [ebp - 0x100], ecx
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x148], ecx
mov dword [ebp - 0xd4], ebx
mov dword [ebp - 0xd0], ecx
mov dword [ebp - 0x11c], ebx
mov dword [ebp - 0x118], ecx
mov dword [ebp - 0x99c], ebx
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
mov edi, ebx
mov dword [ebp - 0x9a0], esi
cmp dword [ebp - 0x99c], ebx
jle 0x41051a
push 0x44edb8
push dword [esi + edi*4]
call fcn.0042d2c3
pop ecx
pop ecx
test eax, eax
jne 0x410363
inc edi
cmp edi, dword [ebp - 0x99c]
jge 0x410363
mov esi, dword [esi + edi*4]
push esi
call fcn.0042d325
pop ecx
push eax
push esi
lea ecx, [ebp - 0x114]
call fcn.004092cf
mov esi, dword [ebp - 0x9a0]
push 0x44edc0
push dword [esi + edi*4]
call fcn.0042d2c3
pop ecx
pop ecx
test eax, eax
jne 0x41039c
inc edi
cmp edi, dword [ebp - 0x99c]
jge 0x41039c
mov esi, dword [esi + edi*4]
push esi
call fcn.0042d325
pop ecx
push eax
push esi
lea ecx, [ebp - 0x15c]
call fcn.004092cf
mov esi, dword [ebp - 0x9a0]
push str.__msi
push dword [esi + edi*4]
call fcn.0042d2c3
pop ecx
pop ecx
test eax, eax
jne 0x4103d5
inc edi
cmp edi, dword [ebp - 0x99c]
jge 0x4103d5
mov esi, dword [esi + edi*4]
push esi
call fcn.0042d325
pop ecx
push eax
push esi
lea ecx, [ebp - 0xe4]
call fcn.004092cf
mov esi, dword [ebp - 0x9a0]
push str.__msiparams
push dword [esi + edi*4]
call fcn.0042d2c3
pop ecx
pop ecx
test eax, eax
je 0x4103ff
push 0x44edec
push dword [esi + edi*4]
call fcn.0042d2c3
pop ecx
pop ecx
test eax, eax
jne 0x41049c
inc edi
cmp edi, dword [ebp - 0x99c]
jge 0x41049c
push dword [esi + edi*4]
lea ecx, [ebp - 0x18c]
call fcn.004090db
push 0x44edec
push dword [esi + edi*4]
call fcn.0042d2c3
pop ecx
pop ecx
test eax, eax
jne 0x410480
mov word [ebp - 0x144], ax
lea ecx, [ebp - 0x144]
mov eax, dword [ebp - 0x17c]
add eax, 0xfffffffc
mov dword [ebp - 0x134], ebx
push eax
push 3
lea eax, [ebp - 0x18c]
mov dword [ebp - 0x130], 7
push eax
call fcn.0040fed9
lea eax, [ebp - 0x144]
mov ecx, 0x46ed38
push eax
call fcn.0040d806
lea ecx, [ebp - 0x144]
call fcn.004086f1
jmp 0x410491
lea eax, [ebp - 0x18c]
mov ecx, 0x46ed38
push eax
call fcn.0040d806
lea ecx, [ebp - 0x18c]
call fcn.004086f1
push str.__log
push dword [esi + edi*4]
call fcn.0042d2c3
pop ecx
pop ecx
test eax, eax
jne 0x4104d5
inc edi
cmp edi, dword [ebp - 0x99c]
jge 0x4104d5
mov esi, dword [esi + edi*4]
push esi
call fcn.0042d325
pop ecx
push eax
push esi
lea ecx, [ebp - 0x12c]
call fcn.004092cf
mov esi, dword [ebp - 0x9a0]
push 0x44ee00
push dword [esi + edi*4]
call fcn.0042d2c3
pop ecx
pop ecx
test eax, eax
jne 0x41050d
inc edi
cmp edi, dword [ebp - 0x99c]
jge 0x41050d
mov esi, dword [esi + edi*4]
push esi
call fcn.0042d325
pop ecx
push eax
push esi
mov ecx, 0x46b234
call fcn.004092cf
mov esi, dword [ebp - 0x9a0]
inc edi
cmp edi, dword [ebp - 0x99c]
jl 0x41032a
cmp dword [ebp - 0x104], ebx
je 0x4105ea
cmp dword [ebp - 0x14c], ebx
jne 0x410560
push str..out.txt
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x18c]
push eax
call fcn.0040d592
add esp, 0xc
lea ecx, [ebp - 0x15c]
push eax
call fcn.0040a8d9
lea ecx, [ebp - 0x18c]
call fcn.004086f1
push 8
pop esi
cmp dword [ebp - 0x148], esi
lea eax, [ebp - 0x15c]
push 0x44ee1c
cmovae eax, dword [ebp - 0x15c]
push eax
call fcn.0042f1e7
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x410619
push 0xc8
lea eax, [ebp - 0xcc]
push ebx
push eax
call fcn.00425c30
mov eax, 0x44ee24
push eax
push 0x44ee28
push eax
push 0x44ee2c
lea eax, [ebp - 0xcc]
push 0x63
push eax
call fcn.00408fc5
cmp dword [ebp - 0x100], esi
lea ecx, [ebp - 0xcc]
push edi
lea eax, [ebp - 0x114]
cmovae eax, dword [ebp - 0x114]
push ecx
push eax
call fcn.0041c1b0
push edi
call fcn.0042d8da
add esp, 0x34
jmp 0x410619
cmp dword [ebp - 0xd4], ebx
je 0x41064c
cmp dword [ebp - 0x11c], ebx
je 0x41064c
lea eax, [ebp - 0x12c]
mov ecx, 0x46ecf0
push eax
push 0x46ed38
lea eax, [ebp - 0xe4]
push eax
call fcn.0041f2c9
mov ebx, eax
lea ecx, [ebp - 0x12c]
call fcn.004086f1
lea ecx, [ebp - 0xe4]
call fcn.004086f1
lea ecx, [ebp - 0x15c]
call fcn.004086f1
lea ecx, [ebp - 0x114]
call fcn.004086f1
mov eax, ebx
jmp 0x410eca
lea ecx, [ebp - 0x12c]
call fcn.004086f1
lea ecx, [ebp - 0xe4]
call fcn.004086f1
lea ecx, [ebp - 0x15c]
call fcn.004086f1
lea ecx, [ebp - 0x114]
call fcn.004086f1
mov edi, 0x46b234
mov ecx, dword [0x46b244]
push 8
pop esi
test ecx, ecx
je 0x410753
cmp dword [0x46b248], esi
mov eax, edi
push 0x3a
cmovae eax, dword [0x46b234]
push ebx
push ecx
push eax
call fcn.0040d6e0
add esp, 0x10
mov dword [ebp - 0x9a8], eax
cmp eax, 0xffffffff
je 0x4107a3
xor ecx, ecx
mov dword [ebp - 0xd4], ebx
push 0xffffffffffffffff
inc eax
mov word [ebp - 0xe4], cx
push eax
push edi
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xd0], 7
call fcn.0040fed9
cmp dword [ebp - 0xd0], esi
lea eax, [ebp - 0xe4]
cmovae eax, dword [ebp - 0xe4]
push eax
call fcn.0042f09f
pop ecx
lea ecx, [ebp - 0xe4]
mov dword [0x46ca20], eax
call fcn.004086f1
push dword [ebp - 0x9a8]
xor eax, eax
mov dword [ebp - 0x134], ebx
push ebx
push edi
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x130], 7
mov word [ebp - 0x144], ax
call fcn.0040fed9
lea eax, [ebp - 0x144]
mov ecx, edi
push eax
call fcn.0040a8d9
lea ecx, [ebp - 0x144]
call fcn.004086f1
jmp 0x4107a3
push 0x80c
lea eax, [ebp - 0x998]
push ebx
push eax
call fcn.00425c30
lea eax, [ebp - 0x998]
push eax
call fcn.00419fa6
add esp, 0x10
cmp dword [ebp - 0x998], ebx
je 0x4107a3
lea eax, [ebp - 0x994]
push eax
call fcn.0042d325
pop ecx
push eax
lea eax, [ebp - 0x994]
mov ecx, edi
push eax
call fcn.004092cf
mov eax, dword [ebp - 0x194]
mov dword [0x46ca20], eax
cmp dword [0x46b244], ebx
jne 0x4107c3
push str.forticlient.fortinet.net
call fcn.0042d325
pop ecx
push eax
push str.forticlient.fortinet.net
mov ecx, edi
call fcn.004092cf
cmp dword [0x46b248], esi
push dword [0x46ca20]
cmovae edi, dword [0x46b234]
push edi
push str.wWinMain
push str._ws____update_server_s__alt_port_d
call fcn.0040e08c
add esp, 0x10
call fcn.0041a17d
test eax, eax
jne 0x410ec8
call fcn.00418683
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x41086c
push ebx
lea eax, [ebp - 0x9a4]
mov dword [ebp - 0x9a0], ebx
push eax
lea eax, [ebp - 0x99c]
mov dword [ebp - 0x99c], ebx
push eax
lea eax, [ebp - 0x9a0]
mov dword [ebp - 0x9a4], ebx
push eax
call fcn.0041851d
imul eax, dword [ebp - 0x9a0], 0x64
add esp, 0x10
add eax, dword [ebp - 0x99c]
imul eax, eax, 0x64
add eax, dword [ebp - 0x9a4]
cmp eax, 0xc55c
jb 0x41086c
push str.FA_Scheduler
call fcn.0040c312
pop ecx
cmp eax, 2
je 0x4108f2
cmp eax, 4
je 0x4108f2
call fcn.00418448
cmp eax, 2
je 0x4108f2
call fcn.004184c6
cmp eax, 2
je 0x4108f2
call fcn.0040e275
test eax, eax
jne 0x410ec8
mov word [ebp - 0xe4], ax
lea eax, [ebp - 0xe4]
push 0x94
push eax
mov dword [ebp - 0xd4], ebx
mov dword [ebp - 0xd0], 7
call fcn.0041ead3
pop ecx
pop ecx
push 0x10
cmp dword [0x46ca38], esi
lea eax, [ebp - 0xe4]
mov ecx, 0x46ca24
cmovae ecx, dword [0x46ca24]
cmp dword [ebp - 0xd0], esi
push ecx
cmovae eax, dword [ebp - 0xe4]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [ebp - 0xe4]
jmp 0x410ec3
call fcn.00418683
mov edi, eax
mov dword [ebp - 0x9ac], ebx
push ebx
lea eax, [ebp - 0x9b4]
mov dword [ebp - 0x9b0], ebx
push eax
lea eax, [ebp - 0x9b0]
mov dword [ebp - 0x9b4], ebx
push eax
lea eax, [ebp - 0x9ac]
push eax
call fcn.0041851d
add esp, 0x10
test al, al
je 0x410982
mov edx, dword [ebp - 0x9ac]
cmp edx, 5
mov ecx, dword [ebp - 0x9b0]
sbb eax, eax
inc eax
cmp edx, 5
jae 0x4109f9
cmp edx, 4
jne 0x4109f9
cmp edi, 5
je 0x410963
cmp edi, 1
je 0x410963
cmp edi, edx
jne 0x4109f9
cmp ecx, 3
ja 0x4109f6
cmp ecx, 2
je 0x4109f6
cmp ecx, 3
jne 0x4109f9
cmp dword [ebp - 0x9b4], ecx
jb 0x4109f9
xor eax, eax
mov dword [ebp - 0xec], ebx
push 7
mov word [ebp - 0xfc], ax
lea eax, [ebp - 0xfc]
pop edi
push eax
mov dword [ebp - 0xe8], edi
call fcn.0040e4ef
xor eax, eax
mov dword [ebp - 0x164], ebx
mov word [ebp - 0x174], ax
lea eax, [ebp - 0x174]
push eax
mov dword [ebp - 0x160], edi
call fcn.0040e490
cmp dword [ebp - 0xe8], esi
lea eax, [ebp - 0xfc]
push str.services.exe
cmovae eax, dword [ebp - 0xfc]
push eax
call fcn.0042d3c8
add esp, 0x10
test eax, eax
jne 0x410a30
call fcn.004197b8
jmp 0x410eb2
xor eax, eax
inc eax
test eax, eax
jne 0x410982
push ecx
push edx
mov word [ebp - 0xe4], ax
lea eax, [ebp - 0xe4]
push 0x8c
push eax
mov dword [ebp - 0xd4], ebx
mov dword [ebp - 0xd0], 7
call fcn.0041ead3
add esp, 0x10
push ebx
jmp 0x4108b9
cmp dword [ebp - 0xec], ebx
je 0x410aed
cmp dword [ebp - 0x160], esi
lea ecx, [ebp - 0x174]
lea eax, [ebp - 0xfc]
cmovae ecx, dword [ebp - 0x174]
cmp dword [ebp - 0xe8], esi
push ecx
cmovae eax, dword [ebp - 0xfc]
push eax
call fcn.0042d3c8
pop ecx
pop ecx
test eax, eax
je 0x410aed
cmp dword [ebp - 0xec], ebx
je 0x410ae3
cmp dword [ebp - 0xe8], esi
lea eax, [ebp - 0xfc]
push str.FCDBLog.exe
cmovae eax, dword [ebp - 0xfc]
push eax
call fcn.0042d3c8
pop ecx
pop ecx
test eax, eax
je 0x410ae3
cmp dword [ebp - 0xe8], esi
lea eax, [ebp - 0xfc]
push str.update_task.exe
cmovae eax, dword [ebp - 0xfc]
push eax
call fcn.0042d3c8
pop ecx
pop ecx
test eax, eax
je 0x410ae3
cmp dword [ebp - 0xe8], esi
lea eax, [ebp - 0xfc]
push str.FCHelper.exe
cmovae eax, dword [ebp - 0xfc]
push eax
call fcn.0042d3c8
pop ecx
pop ecx
test eax, eax
jne 0x410aed
mov edi, ebx
mov dword [ebp - 0x9a0], ebx
jmp 0x410af6
xor edi, edi
inc edi
mov dword [ebp - 0x9a0], edi
call fcn.0041a131
test al, al
jne 0x410b2d
cmp dword [ebp - 0xe8], esi
lea eax, [ebp - 0xfc]
push str.FortiTray.exe
cmovae eax, dword [ebp - 0xfc]
push eax
call fcn.0042d3c8
mov dword [ebp - 0x9a4], 1
pop ecx
pop ecx
test eax, eax
je 0x410b33
mov dword [ebp - 0x9a4], ebx
push str.GlobalFC_22CD96BF_E5B0_41d8_83ED_C73F9BBF9FA8
call fcn.00410182
pop ecx
push ebx
push ebx
mov dword [ebp - 0x9bc], eax
mov dword [ebp - 0x99c], ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
push 0x44eb7c
push dword [ebp + 8]
mov ecx, 0x46ca40
push 0x46c9f4
call fcn.0040e70a
lea eax, [ebp - 0x9c4]
mov dword [ebp - 0x9c4], esi
push eax
mov dword [ebp - 0x9c0], 0x4020
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0xcc
push dword [0x46f61c]
call dword [sym.imp.USER32.dll_LoadIconW]
push 0xc9
push dword [0x46f61c]
mov dword [ebp - 0x9b8], eax
call dword [sym.imp.USER32.dll_LoadIconW]
mov dword [ebp - 0x9a8], eax
test edi, edi
jne 0x410be0
call fcn.00415c12
push 0xff00031f
push ebx
call fcn.00415acd
pop ecx
pop ecx
mov dword [ebp - 0x99c], eax
call fcn.0041972d
call fcn.0040ff4a
mov eax, dword [ebp - 0x9a8]
cmp dword [0x46ca38], esi
mov edi, 0x46ca24
mov ecx, edi
cmovae ecx, dword [0x46ca24]
push ecx
push dword [ebp - 0x9b8]
mov ecx, 0x46ecf0
push eax
push dword [ebp - 0x9a4]
push dword [ebp - 0x9a0]
call fcn.0041df52
push 0x46f178
call fcn.0042f11b
pop ecx
mov ecx, 0x46ecf0
call fcn.004210c2
call fcn.0040ffe8
mov eax, dword [0x46ed1c]
cmp eax, 2
jne 0x410d61
cmp dword [0x46ed8c], ebx
je 0x410e43
xor eax, eax
mov dword [ebp - 0x11c], ebx
cmp dword [0x46ca38], esi
push 7
cmovae edi, dword [0x46ca24]
pop ecx
push edi
mov word [ebp - 0x12c], ax
mov word [ebp - 0x114], ax
mov word [ebp - 0xe4], ax
lea eax, [ebp - 0x12c]
push 0x7e
push eax
mov dword [ebp - 0x118], ecx
mov dword [ebp - 0x104], ebx
mov dword [ebp - 0x100], ecx
mov dword [ebp - 0xd4], ebx
mov dword [ebp - 0xd0], ecx
call fcn.0041ead3
lea eax, [ebp - 0x114]
push 0x7f
push eax
call fcn.0041ead3
lea eax, [ebp - 0xe4]
push 0x80
push eax
call fcn.0041ead3
add esp, 0x1c
lea ecx, [ebp - 0x114]
cmp dword [ebp - 0x100], esi
lea eax, [ebp - 0x12c]
cmovae ecx, dword [ebp - 0x114]
cmp dword [ebp - 0x118], esi
push 4
cmovae eax, dword [ebp - 0x12c]
push ecx
push eax
push dword [0x46ecf4]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
jne 0x410d3b
call fcn.00410035
test eax, eax
jne 0x410d3b
cmp dword [ebp - 0x100], esi
lea ecx, [ebp - 0x114]
push ebx
cmovae ecx, dword [ebp - 0x114]
lea eax, [ebp - 0xe4]
cmp dword [ebp - 0xd0], esi
push ecx
cmovae eax, dword [ebp - 0xe4]
push eax
push dword [0x46ecf4]
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [ebp - 0xe4]
call fcn.004086f1
lea ecx, [ebp - 0x114]
call fcn.004086f1
lea ecx, [ebp - 0x12c]
call fcn.004086f1
jmp 0x410e43
cmp dword [0x46ed88], ebx
je 0x410da8
xor eax, eax
mov dword [ebp - 0xd4], ebx
cmp dword [0x46ca38], esi
mov word [ebp - 0xe4], ax
mov eax, edi
cmovae eax, dword [0x46ca24]
push eax
lea eax, [ebp - 0xe4]
mov dword [ebp - 0xd0], 7
push 0x88
push eax
call fcn.0041ead3
add esp, 0xc
jmp 0x410df3
cmp eax, 4
jne 0x410e43
xor eax, eax
mov dword [ebp - 0xd4], ebx
cmp dword [0x46ca38], esi
mov word [ebp - 0xe4], ax
mov eax, edi
cmovae eax, dword [0x46ca24]
push 0x46f178
push eax
lea eax, [ebp - 0xe4]
mov dword [ebp - 0xd0], 7
push 0x86
push eax
call fcn.0041ead3
add esp, 0x10
cmp dword [ebp - 0x9a0], ebx
jne 0x410e34
cmp dword [0x46ca38], esi
lea eax, [ebp - 0xe4]
push 4
cmovae edi, dword [0x46ca24]
cmp dword [ebp - 0xd0], esi
push edi
cmovae eax, dword [ebp - 0xe4]
push eax
push dword [0x46ecf4]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
push 1
pop eax
cmove ebx, eax
lea ecx, [ebp - 0xe4]
call fcn.004086f1
test ebx, ebx
jne 0x410e57
call fcn.00419904
mov ecx, 0x46ecf0
call fcn.00420a64
call fcn.0040ff17
push dword [0x46ecf4]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [ebp - 0x99c]
test eax, eax
je 0x410e74
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x9b8]
test eax, eax
je 0x410e85
push eax
call dword [sym.imp.USER32.dll_DestroyIcon]
mov eax, dword [ebp - 0x9a8]
test eax, eax
je 0x410e96
push eax
call dword [sym.imp.USER32.dll_DestroyIcon]
mov ecx, 0x46ca40
call fcn.0040f9e2
call dword [sym.imp.ole32.dll_CoUninitialize]
push dword [ebp - 0x9bc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x174]
call fcn.004086f1
lea ecx, [ebp - 0xfc]
call fcn.004086f1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00423dc5
mov esp, ebp
pop ebp
ret 0x10