Function at 0x404340
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [ebp - 4], eax
cmp byte [0x429a48], 0x31
jne 0x4047a8
cmp byte [0x427d54], 1
jne 0x4044ab
mov eax, dword [ebp - 4]
sub eax, dword [0x4203c8]
xor edx, edx
div dword [0x404a60]
cmp eax, dword [0x427d57]
jb 0x4044ab
cmp byte [0x4203d5], 0
jne 0x4044ab
mov byte [0x4203d5], 1
push 0x420850
push str.Alert_PowerFail
call fcn.00414acf
mov byte [0x4203e1], 1
mov byte [0x4203da], 1
cmp byte [0x427d55], 1
jne 0x4043e3
push 0
push 0
push dword [0x431600]
push 0x404a64
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp byte [0x427d60], 1
jne 0x4043f6
mov eax, dword [0x427d61]
call fcn.00412142
cmp byte [0x427d5b], 0
jne 0x404428
cmp byte [0x427d5c], 0
jne 0x404428
cmp byte [0x427d5d], 0
jne 0x404428
cmp byte [0x427d5e], 0
jne 0x404428
cmp byte [0x428175], 0
jne 0x404428
jmp 0x4044ab
push 0x1c
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
test eax, eax
je 0x4044ab
mov ebx, eax
mov al, byte [0x427d5b]
mov byte [ebx], al
mov al, byte [0x427d5c]
mov byte [ebx + 1], al
mov al, byte [0x427d5d]
mov byte [ebx + 2], al
mov al, byte [0x427d5e]
mov byte [ebx + 3], al
mov al, byte [0x427d5f]
mov byte [ebx + 0x10], al
mov eax, dword [str.Powered_by_batteries]
mov dword [ebx + 4], eax
lea eax, [0x427d65]
mov dword [ebx + 8], eax
lea eax, [0x427f6d]
mov dword [ebx + 0xc], eax
mov al, byte [0x428175]
mov byte [ebx + 0x13], al
mov eax, dword [0x428178]
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], 0x6000b
push 0
push 0
push ebx
push 0x404b90
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp byte [0x42817c], 1
jne 0x4044c1
mov eax, dword [0x42987c]
cmp eax, dword [0x428180]
jb 0x40451e
cmp byte [0x42817d], 1
jne 0x4044ff
mov al, byte [0x42040c]
or al, byte [0x42040d]
or al, byte [0x42040e]
or al, byte [0x42040f]
or al, byte [0x420416]
je 0x4044ff
cmp byte [0x4203e0], 1
jne 0x4044ff
mov eax, dword [0x429878]
cmp eax, dword [0x428184]
jb 0x40451e
cmp byte [0x42817e], 1
jne 0x40464a
mov eax, dword [0x429874]
cmp eax, dword [0x428188]
jb 0x40451e
jmp 0x40464a
cmp byte [0x4203d8], 0
jne 0x40464a
mov byte [0x4203d8], 1
push 0x420850
push str.Alert_BatteryLevel
call fcn.00414acf
mov byte [0x4203e1], 1
mov byte [0x4203da], 1
cmp byte [0x428191], 1
jne 0x404578
push 0
push 0
push dword [0x431618]
push 0x404a64
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp byte [0x42819d], 1
jne 0x40458b
mov eax, dword [0x42819e]
call fcn.00412142
mov eax, dword [str.Battery_level_is_below_the_limit]
call fcn.004080cb
cmp byte [0x428198], 0
jne 0x4045c7
cmp byte [0x428199], 0
jne 0x4045c7
cmp byte [0x42819a], 0
jne 0x4045c7
cmp byte [0x42819b], 0
jne 0x4045c7
cmp byte [0x4285b2], 0
jne 0x4045c7
jmp 0x40464a
push 0x1c
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
test eax, eax
je 0x40464a
mov ebx, eax
mov al, byte [0x428198]
mov byte [ebx], al
mov al, byte [0x428199]
mov byte [ebx + 1], al
mov al, byte [0x42819a]
mov byte [ebx + 2], al
mov al, byte [0x42819b]
mov byte [ebx + 3], al
mov al, byte [0x42819c]
mov byte [ebx + 0x10], al
mov eax, dword [str.Battery_level_is_below_the_limit]
mov dword [ebx + 4], eax
lea eax, [0x4281a2]
mov dword [ebx + 8], eax
lea eax, [0x4283aa]
mov dword [ebx + 0xc], eax
mov al, byte [0x4285b2]
mov byte [ebx + 0x13], al
mov eax, dword [0x4285b4]
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], 0x6000b
push 0
push 0
push ebx
push 0x404b90
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp byte [0x4285b8], 1
jne 0x404909
cmp byte [0x429a84], 0x31
jne 0x404909
mov eax, dword [ebp - 4]
sub eax, dword [0x4203cc]
xor edx, edx
div dword [0x404a60]
cmp eax, dword [0x4285bc]
jb 0x404909
cmp byte [0x4203d6], 0
jne 0x404909
mov byte [0x4203d6], 1
push 0x420850
push str.Alert_BatteryLow
call fcn.00414acf
mov byte [0x4203e1], 1
mov byte [0x4203da], 1
cmp byte [0x4285b9], 1
jne 0x4046db
push 0
push 0
push dword [0x431608]
push 0x404a64
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp byte [0x4285c5], 1
jne 0x4046ee
mov eax, dword [0x4285c6]
call fcn.00412142
cmp byte [0x4285c0], 0
jne 0x404720
cmp byte [0x4285c1], 0
jne 0x404720
cmp byte [0x4285c2], 0
jne 0x404720
cmp byte [0x4285c3], 0
jne 0x404720
cmp byte [0x4289da], 0
jne 0x404720
jmp 0x4047a3
push 0x1c
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
test eax, eax
je 0x4047a3
mov ebx, eax
mov al, byte [0x4285c0]
mov byte [ebx], al
mov al, byte [0x4285c1]
mov byte [ebx + 1], al
mov al, byte [0x4285c2]
mov byte [ebx + 2], al
mov al, byte [0x4285c3]
mov byte [ebx + 3], al
mov al, byte [0x4285c4]
mov byte [ebx + 0x10], al
mov eax, dword [str.The_battery_is_low]
mov dword [ebx + 4], eax
lea eax, [0x4285ca]
mov dword [ebx + 8], eax
lea eax, [0x4287d2]
mov dword [ebx + 0xc], eax
mov al, byte [0x4289da]
mov byte [ebx + 0x13], al
mov eax, dword [0x4289dc]
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], 0x6000b
push 0
push 0
push ebx
push 0x404b90
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x404909
cmp byte [0x4289e0], 1
jne 0x404909
cmp byte [0x4203d9], 0
je 0x404909
mov eax, dword [ebp - 4]
sub eax, dword [0x4203dc]
xor edx, edx
div dword [0x404a60]
cmp eax, dword [0x4289e4]
jb 0x404909
mov byte [0x4203d9], 0
cmp byte [0x4289e2], 0
je 0x4047fc
cmp byte [0x4203da], 0
je 0x404909
mov byte [0x4203da], 0
push 0x420850
push str.Alert_PowerRestore
call fcn.00414acf
mov byte [0x4203e1], 1
cmp byte [0x4289e1], 1
jne 0x404842
push 0
push 0
push dword [0x431620]
push 0x404a64
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp byte [0x4289ed], 1
jne 0x404850
call fcn.0041213a
cmp byte [0x4289e8], 0
jne 0x404882
cmp byte [0x4289e9], 0
jne 0x404882
cmp byte [0x4289ea], 0
jne 0x404882
cmp byte [0x4289eb], 0
jne 0x404882
cmp byte [0x428e02], 0
jne 0x404882
jmp 0x404909
push 0x1c
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
test eax, eax
je 0x404909
mov ebx, eax
mov al, byte [0x4289e8]
mov byte [ebx], al
mov al, byte [0x4289e9]
mov byte [ebx + 1], al
mov al, byte [0x4289ea]
mov byte [ebx + 2], al
mov al, byte [0x4289eb]
mov byte [ebx + 3], al
mov al, byte [0x4289ec]
mov byte [ebx + 0x10], al
mov eax, dword [str.Mains_power_is_restored]
mov dword [ebx + 4], eax
lea eax, [0x4289f2]
mov dword [ebx + 8], eax
lea eax, [0x428bfa]
mov dword [ebx + 0xc], eax
movzx eax, byte [0x428e02]
shl al, 7
mov byte [ebx + 0x13], al
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
push 0
push 0
push ebx
push 0x404b90
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp byte [0x428e04], 1
jne 0x404a5b
cmp byte [0x429afc], 0x31
jne 0x404a5b
mov eax, dword [ebp - 4]
sub eax, dword [0x4203d0]
xor edx, edx
div dword [0x404a60]
cmp eax, dword [0x428e08]
jb 0x404a5b
cmp byte [0x4203d7], 0
jne 0x404a5b
mov byte [0x4203d7], 1
push 0x420850
push str.Alert_UPS_Error
call fcn.00414acf
mov byte [0x4203e1], 1
cmp byte [0x428e05], 1
jne 0x404993
push 0
push 0
push dword [0x431610]
push 0x404a64
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp byte [0x428e11], 1
jne 0x4049a6
mov eax, dword [0x428e12]
call fcn.00412142
cmp byte [0x428e0c], 0
jne 0x4049d8
cmp byte [0x428e0d], 0
jne 0x4049d8
cmp byte [0x428e0e], 0
jne 0x4049d8
cmp byte [0x428e0f], 0
jne 0x4049d8
cmp byte [0x429226], 0
jne 0x4049d8
jmp 0x404a5b
push 0x1c
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
test eax, eax
je 0x404a5b
mov ebx, eax
mov al, byte [0x428e0c]
mov byte [ebx], al
mov al, byte [0x428e0d]
mov byte [ebx + 1], al
mov al, byte [0x428e0e]
mov byte [ebx + 2], al
mov al, byte [0x428e0f]
mov byte [ebx + 3], al
mov al, byte [0x428e10]
mov byte [ebx + 0x10], al
mov eax, dword [str.Error_UPS]
mov dword [ebx + 4], eax
lea eax, [0x428e16]
mov dword [ebx + 8], eax
lea eax, [0x42901e]
mov dword [ebx + 0xc], eax
mov al, byte [0x429226]
mov byte [ebx + 0x13], al
mov eax, dword [0x429228]
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], 0x6000c
push 0
push 0
push ebx
push 0x404b90
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret