Function at 0x406340
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1444
call fcn.0040b050
mov eax, dword [0x428530]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
push 0x1a
push str.WinMain
push str._s:_d_Enter_WinMain.
mov dword [ebp - 0x141c], eax
call fcn.00405ee0
lea ecx, [ebp - 0x1408]
xor ebx, ebx
push ecx
mov dword [ebp - 0x1408], ebx
call fcn.004060d0
add esp, 0x10
test al, al
je 0x406444
mov esi, dword [ebp - 0x1408]
push esi
push 0x1f
push str.WinMain
push str._s:_d_uVer:_d.
call fcn.00405ee0
add esp, 0x10
cmp esi, 0x190d
jb 0x406444
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, eax
mov eax, 0x10624dd3
mul edx
mov esi, edx
shr esi, 6
push esi
push 0x12c
push 0xc0
push str.IsComputerReboot
push str._s:_d_dwTimeLimit:_d__dwStartupTime:_d.
call fcn.00405ee0
mov eax, 0x12c
cmp eax, esi
sbb esi, esi
inc esi
call fcn.00403740
mov edi, eax
push edi
push esi
push 0x26
push str.WinMain
push str._s:_d_bNeedUpgrade:_d__bIsServer:_d.
call fcn.00405ee0
add esp, 0x28
cmp esi, ebx
jne 0x406430
cmp edi, ebx
jne 0x406430
push 0x2b
push str.WinMain
push str._s:_d_No_need_upgrade.
call fcn.00405ee0
add esp, 0xc
jmp 0x406839
push 0x2f
push str.WinMain
push str._s:_d_start.
call fcn.00405ee0
add esp, 0xc
push 1
push ebx
push ebx
push 0x421f40
call fcn.004089b8
add esp, 0x10
push ebx
push str._inl
call sub.KERNEL32.dll_GetCommandLineA
push eax
call fcn.00407d4c
add esp, 0xc
test al, al
je 0x406536
push 0x7ff
lea ecx, [ebp - 0x1403]
push ebx
push ecx
mov byte [ebp - 0x1404], bl
call fcn.00409be0
push 0x3ff
lea edx, [ebp - 0xc03]
push ebx
push edx
mov byte [ebp - 0xc04], bl
call fcn.00409be0
push 0x3ff
lea eax, [ebp - 0x403]
push ebx
push eax
mov byte [ebp - 0x404], bl
call fcn.00409be0
add esp, 0x24
lea ecx, [ebp - 0x404]
push ecx
push 0x421b28
call sub.KERNEL32.dll_GetCommandLineA
push eax
call fcn.00407d4c
add esp, 0xc
test al, al
jne 0x4064f2
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409bc8
mov esp, ebp
pop ebp
ret 0x10
lea edx, [ebp - 0xc04]
push edx
call fcn.00406de2
lea eax, [ebp - 0x404]
push eax
lea ecx, [ebp - 0xc04]
push ecx
lea edx, [ebp - 0x1404]
push str.__s___ins__sr___s_
push edx
call fcn.0040afc4
push ebx
push ebx
push 0x20
lea eax, [ebp - 0x1404]
push ebx
push eax
call fcn.00406eba
add esp, 0x28
jmp 0x406839
push ebx
push str._ins
call sub.KERNEL32.dll_GetCommandLineA
push eax
call fcn.00407d4c
add esp, 0xc
test al, al
je 0x406643
push str.GlobalSIM_38257560_0ED7_4BB2_87BB_8F73EEA803D4
call fcn.00406d3b
add esp, 4
test eax, eax
jne 0x406839
push 0x3ff
lea ecx, [ebp - 0x403]
push ebx
push ecx
mov byte [ebp - 0x404], bl
call fcn.00409be0
lea edx, [ebp - 0x404]
push 0x400
push edx
call section..text
lea eax, [ebp - 0x404]
add esp, 0x14
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4065a0
mov ecx, dword [str._bmploader.log.1]
mov edx, dword [0x421ed8]
mov dword [eax], ecx
mov ecx, dword [0x421edc]
mov dword [eax + 4], edx
mov edx, dword [0x421ee0]
mov dword [eax + 8], ecx
mov cl, byte [0x421ee4]
mov dword [eax + 0xc], edx
push 0x2c
mov byte [eax + 0x10], cl
call fcn.0040adca
add esp, 4
cmp eax, ebx
je 0x4065ed
mov ecx, eax
call fcn.00404910
mov esi, eax
jmp 0x4065ef
xor esi, esi
lea edx, [ebp - 0x404]
push edx
mov ecx, esi
call fcn.00405aa0
mov dword [0x429d3c], esi
call sub.KERNEL32.dll_GetCommandLineA
push eax
call fcn.00401c90
mov ecx, eax
call fcn.00403200
push 1
push ebx
push str.GlobalFF844264_D119_416A_8CB5_981A498343D1
lea ecx, [ebp - 0x1408]
call fcn.00407d2e
lea ecx, [ebp - 0x1408]
call fcn.00407bb5
lea ecx, [ebp - 0x1408]
call fcn.00407c14
jmp 0x406839
push 0x3ff
lea eax, [ebp - 0x803]
push ebx
push eax
mov byte [ebp - 0x804], bl
call fcn.00409be0
lea ecx, [ebp - 0x804]
push 0x400
push ecx
call section..text
lea eax, [ebp - 0x804]
add esp, 0x14
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x406676
mov edx, dword [str._bmploader.log]
mov ecx, dword [0x421ec8]
mov dword [eax], edx
mov edx, dword [0x421ecc]
mov dword [eax + 4], ecx
mov cx, word [0x421ed0]
mov dword [eax + 8], edx
mov dl, byte [0x421ed2]
mov word [eax + 0xc], cx
push 0x2c
mov byte [eax + 0xe], dl
call fcn.0040adca
add esp, 4
cmp eax, ebx
je 0x4066c5
mov ecx, eax
call fcn.00404910
mov esi, eax
jmp 0x4066c7
xor esi, esi
lea eax, [ebp - 0x804]
push eax
mov ecx, esi
call fcn.00405aa0
push str.SIM_D95AF572_67E0_4751_9F03_547DE35B77B9
mov dword [0x429d3c], esi
call fcn.00406d3b
add esp, 4
test eax, eax
jne 0x406839
lea ecx, [ebp - 0x1410]
call fcn.00407fd3
lea ecx, [ebp - 0x1410]
call fcn.00407ffc
lea ecx, [ebp - 0x1418]
call fcn.00407fd3
lea ecx, [ebp - 0x1418]
push ecx
lea ecx, [ebp - 0x1410]
call fcn.00408063
push ebx
lea edx, [ebp - 0x1410]
push edx
lea ecx, [ebp - 0x1428]
call fcn.0040801f
lea ecx, [ebp - 0x1428]
call fcn.0040803c
push str.Global95FE2FDD_F0F3_4CCD_AD3D_5E7D6F5C3539
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x429d38], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406818
call fcn.00401c90
mov esi, eax
cmp esi, ebx
jne 0x4067bd
push str._create_bmploader_failed_
push 0x42160c
push 0x429d3c
call fcn.00408b57
add esp, 0xc
lea ecx, [ebp - 0x1428]
call fcn.00407e55
lea ecx, [ebp - 0x1418]
call fcn.0040807c
lea ecx, [ebp - 0x1410]
call fcn.0040805e
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409bc8
mov esp, ebp
pop ebp
ret 0x10
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push ebx
push ebx
push ebx
lea eax, [ebp - 0x1444]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
mov ecx, dword [ebp - 0x141c]
push ecx
mov ecx, esi
call fcn.00401a30
test eax, eax
jne 0x406801
mov ecx, esi
call fcn.00401cd0
test eax, eax
je 0x406818
push str._start_upgrade_process_failed_
jmp 0x406806
push str._BmpLoader_initialize_failed_
push 0x42160c
push 0x429d3c
call fcn.00408b57
add esp, 0xc
lea ecx, [ebp - 0x1428]
call fcn.00407e55
lea ecx, [ebp - 0x1418]
call fcn.0040807c
lea ecx, [ebp - 0x1410]
call fcn.0040805e
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00409bc8
mov esp, ebp
pop ebp
ret 0x10