Function at 0x401150
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c138f
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x4f4214]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_free]
mov dword [ebp - 0x20], 1
xor esi, esi
push esi
push 6
lea eax, [ebp - 0x18]
push eax
push ebx
mov dword [ebp - 0x18], esi
call dword [sym.imp.sqlite3.dll_sqlite3_open_v2]
add esp, 0x10
test eax, eax
je 0x4011b9
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.sqlite3.dll_sqlite3_errmsg]
push eax
push str.Cant_open_database:__s_n
call fcn.00487d90
add esp, 0xc
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x10]
push edx
push str.SELECT__FROM_appiteminfo
push eax
mov dword [ebp - 0x1c], esi
call dword [sym.imp.sqlite3.dll_sqlite3_get_table]
add esp, 0x18
cmp eax, esi
je 0x401270
mov edx, dword [ebp - 0x18]
lea ecx, [ebp - 0x1c]
push ecx
push esi
push esi
push str.create_table_appiteminfo__id_varchar_48___PRIMARY_KEY___version_varchar_32___osversion_varchar_32___bid_varchar_48_____name_varchar_256___category_varchar_32___deviceType_INT__dlstatus_INT__authType_INT__ipasize_INT__iconpathname_varchar_260___ipapathname_varchar_260___
push edx
call dword [sym.imp.sqlite3.dll_sqlite3_exec]
add esp, 0x14
test eax, eax
je 0x401a4f
mov eax, dword [ebp - 0x1c]
cmp eax, esi
je 0x401230
push eax
push 0xc9
push str.OpenSerial
push str._s__d__database_error_s_n
call fcn.00487d90
mov eax, dword [ebp - 0x1c]
push eax
call edi
add esp, 0x14
mov dword [ebp - 0x1c], esi
jmp 0x40124c
push str.create_table_appiteminfo__id_varchar_48___PRIMARY_KEY___version_varchar_32___osversion_varchar_32___bid_varchar_48_____name_varchar_256___category_varchar_32___deviceType_INT__dlstatus_INT__authType_INT__ipasize_INT__iconpathname_varchar_260___ipapathname_varchar_260___
push 0xcf
push str.OpenSerial
push str._s__d__database_error_sql_s_errmsg__NULL_n
call fcn.00487d90
add esp, 0x10
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.sqlite3.dll_sqlite3_close]
push ebx
call fcn.0049c9fe
add esp, 8
cmp dword [ebp - 0x20], esi
je 0x401a3b
mov dword [ebp - 0x20], esi
jmp 0x401187
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
push edx
push eax
push 0x74
push str.OpenSerial
push str._s__d__nRow___d_nColumn___d_n
call fcn.00487d90
mov ecx, dword [ebp - 0x24]
add esp, 0x14
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x2c], esi
cmp dword [ebp - 0x28], esi
jle 0x401a08
mov edi, edi
push 0x25c
call fcn.0049caff
mov ebx, eax
add esp, 4
mov dword [ebp - 0x30], ebx
cmp ebx, esi
je 0x4012eb
push ebx
call fcn.00401b00
mov dword [ebp - 4], esi
mov edx, dword [0x4f41d4]
mov eax, dword [edx + 0xc]
lea edi, [ebx + 0x22c]
mov ecx, 0x4f41d4
mov dword [ebp - 0x20], edi
call eax
add eax, 0x10
mov dword [edi], eax
mov dword [ebp - 4], 0xffffffff
mov edi, ebx
mov dword [ebp - 0x20], edi
jmp 0x4012f0
mov dword [ebp - 0x20], esi
mov edi, esi
mov ecx, dword [edi]
lea eax, [ecx - 0x10]
mov dword [edi + 0x234], esi
mov dword [edi + 0x238], esi
mov dword [edi + 0x240], esi
mov dword [edi + 0x23c], esi
mov dword [edi + 0x244], esi
mov dword [edi + 0x248], esi
mov dword [edi + 0x24c], esi
mov dword [edi + 0x250], esi
mov dword [edi + 0x254], esi
mov dword [edi + 0x258], esi
mov ebx, dword [eax]
cmp dword [eax + 4], esi
je 0x401379
cmp dword [eax + 0xc], esi
lea edx, [eax + 0xc]
jge 0x401355
cmp dword [ecx - 8], esi
jl 0x401a31
mov dword [ecx - 0xc], esi
mov ecx, dword [edi]
xor edx, edx
mov word [ecx], dx
jmp 0x401379
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40136b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
mov ecx, ebx
call eax
add eax, 0x10
mov dword [edi], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ebx, dword [edx + eax*4]
lea ecx, [ebp - 0x34]
push ecx
call fcn.00435470
add esp, 4
mov dword [ebp - 4], 3
mov ecx, dword [eax]
mov esi, dword [edi]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x4013e4
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x4013da
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4013da
call fcn.004027b0
mov dword [ebp - 0x30], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4013d0
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x30]
add ecx, 0x10
mov dword [edi], ecx
jmp 0x4013e4
mov ebx, dword [ecx - 0xc]
push ecx
push edi
call fcn.004026a0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40140a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [edi + 4]
cmp dword [ecx - 0xc], 0
mov esi, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
je 0x401462
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x40143d
cmp dword [ecx - 8], 0
jl 0x401a31
mov dword [ecx - 0xc], 0
mov ecx, dword [edi + 4]
xor edx, edx
mov word [ecx], dx
jmp 0x401462
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401453
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [edi + 4], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ebx, dword [edx + eax*4 + 4]
lea ecx, [ebp - 0x38]
push ecx
call fcn.00435470
add esp, 4
mov dword [ebp - 4], 5
mov ecx, dword [eax]
mov esi, dword [edi + 4]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x4014d3
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x4014c6
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4014c6
call fcn.004027b0
mov dword [ebp - 0x30], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4014bb
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x30]
add ecx, 0x10
mov dword [edi + 4], ecx
jmp 0x4014d3
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [edi + 4]
push eax
call fcn.004026a0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4014f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [edi + 8]
cmp dword [ecx - 0xc], 0
mov esi, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
je 0x401551
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x40152c
cmp dword [ecx - 8], 0
jl 0x401a31
mov dword [ecx - 0xc], 0
mov ecx, dword [edi + 8]
xor edx, edx
mov word [ecx], dx
jmp 0x401551
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401542
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [edi + 8], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ebx, dword [edx + eax*4 + 8]
lea ecx, [ebp - 0x3c]
push ecx
call fcn.00435470
add esp, 4
mov dword [ebp - 4], 7
mov ecx, dword [eax]
mov esi, dword [edi + 8]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x4015c2
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x4015b5
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4015b5
call fcn.004027b0
mov dword [ebp - 0x30], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4015aa
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x30]
add ecx, 0x10
mov dword [edi + 8], ecx
jmp 0x4015c2
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [edi + 8]
push eax
call fcn.004026a0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4015e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [edi + 0xc]
cmp dword [ecx - 0xc], 0
mov esi, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
je 0x401640
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x40161b
cmp dword [ecx - 8], 0
jl 0x401a31
mov dword [ecx - 0xc], 0
mov ecx, dword [edi + 0xc]
xor edx, edx
mov word [ecx], dx
jmp 0x401640
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401631
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [edi + 0xc], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ebx, dword [edx + eax*4 + 0xc]
lea ecx, [ebp - 0x40]
push ecx
call fcn.00435470
add esp, 4
mov dword [ebp - 4], 9
mov ecx, dword [eax]
mov esi, dword [edi + 0xc]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x4016b1
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x4016a4
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4016a4
call fcn.004027b0
mov dword [ebp - 0x30], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x401699
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x30]
add ecx, 0x10
mov dword [edi + 0xc], ecx
jmp 0x4016b1
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [edi + 0xc]
push eax
call fcn.004026a0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x40]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4016d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [edi + 0x10]
cmp dword [ecx - 0xc], 0
mov esi, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
je 0x40172f
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x40170a
cmp dword [ecx - 8], 0
jl 0x401a31
mov dword [ecx - 0xc], 0
mov ecx, dword [edi + 0x10]
xor edx, edx
mov word [ecx], dx
jmp 0x40172f
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401720
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [edi + 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ebx, dword [edx + eax*4 + 0x10]
lea ecx, [ebp - 0x44]
push ecx
call fcn.00435470
add esp, 4
mov dword [ebp - 4], 0xb
mov ecx, dword [eax]
mov esi, dword [edi + 0x10]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x4017a0
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x401793
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x401793
call fcn.004027b0
mov dword [ebp - 0x30], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x401788
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x30]
add ecx, 0x10
mov dword [edi + 0x10], ecx
jmp 0x4017a0
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [edi + 0x10]
push eax
call fcn.004026a0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x44]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4017c6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [edi + 0x14]
cmp dword [ecx - 0xc], 0
mov esi, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
je 0x40181e
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x4017f9
cmp dword [ecx - 8], 0
jl 0x401a31
mov dword [ecx - 0xc], 0
mov ecx, dword [edi + 0x14]
xor edx, edx
mov word [ecx], dx
jmp 0x40181e
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40180f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [edi + 0x14], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ebx, dword [edx + eax*4 + 0x14]
lea ecx, [ebp - 0x48]
push ecx
call fcn.00435470
add esp, 4
mov dword [ebp - 4], 0xd
mov ecx, dword [eax]
mov esi, dword [edi + 0x14]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x40188f
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x401882
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x401882
call fcn.004027b0
mov dword [ebp - 0x30], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x401877
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x30]
add ecx, 0x10
mov dword [edi + 0x14], ecx
jmp 0x40188f
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [edi + 0x14]
push eax
call fcn.004026a0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x48]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4018b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x14]
xor ebx, ebx
mov dword [edi + 0x1c], ebx
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + esi*4 + 0x18]
push edx
call fcn.0049c870
mov dword [edi + 0x1c], eax
mov dword [edi + 0x230], ebx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + esi*4 + 0x1c]
push ecx
call fcn.0049c870
mov dword [edi + 0x230], eax
mov dword [edi + 0x20], ebx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + esi*4 + 0x20]
push eax
call fcn.0049c870
mov dword [edi + 0x20], eax
mov dword [edi + 0x234], ebx
mov eax, dword [ebp - 0x10]
add esp, 0xc
cmp dword [eax + esi*4 + 0x24], ebx
je 0x40191e
mov ecx, dword [eax + esi*4 + 0x24]
push ecx
call fcn.0049c870
add esp, 4
mov dword [edi + 0x234], eax
push 0x104
lea ebx, [edi + 0x24]
push 0
push ebx
call fcn.0049f910
mov eax, dword [ebp - 0x10]
add esp, 0xc
cmp dword [eax + esi*4 + 0x28], 0
je 0x4019a3
mov edx, dword [ebp - 0x14]
mov ecx, dword [eax + edx*4 + 0x28]
mov edx, ebx
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x401944
lea esi, [edi + 0x18]
call fcn.004025b0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov ebx, dword [ecx + edx*4 + 0x28]
lea eax, [ebp - 0x4c]
push eax
call fcn.00435470
add esp, 4
mov dword [ebp - 4], 0xf
mov edi, esi
call fcn.00402630
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4019a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x20]
push 0x104
lea esi, [edi + 0x128]
push 0
push esi
call fcn.0049f910
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
add esp, 0xc
cmp dword [eax + ebx*4 + 0x2c], 0
je 0x4019da
mov ecx, dword [eax + ebx*4 + 0x2c]
mov edx, esi
lea esp, [esp]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x4019d0
mov ecx, fcn.0041a120
test ecx, ecx
je 0x4019f0
mov edx, dword [ebp + 8]
push edi
push edx
call fcn.0041a120
add esp, 8
mov eax, dword [ebp - 0x2c]
add ebx, dword [ebp - 0x24]
inc eax
xor esi, esi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], eax
cmp eax, dword [ebp - 0x28]
jl 0x4012a0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.sqlite3.dll_sqlite3_free_table]
push 0xc
call fcn.0049c7c6
mov edi, eax
add esp, 8
mov dword [edi + 8], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 4], eax
mov ecx, dword [ebp - 0x18]
mov dword [edi], ecx
jmp 0x401a6c
push 0x80070057
call fcn.00401000
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xc
call fcn.0049c7c6
mov edi, eax
add esp, 4
mov dword [edi + 8], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 4], eax
mov edx, dword [ebp - 0x18]
mov dword [edi], edx
mov eax, edi
mov dword [0x4f9608], edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret