Function at 0x4a41b1
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
je 0x4a444b
cmp dword [ebp + 0xc], ebx
je 0x4a444b
cmp dword [ebp + 0x10], ebx
je 0x4a444b
mov eax, 0x639894
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
sub eax, ebx
push edi
je 0x4a4422
dec eax
dec eax
je 0x4a41fe
push 0xa
pop eax
jmp 0x4a4448
push ebx
push dword [ebp + 0x10]
lea eax, [ebp - 0x10]
push str.SELECT_payloadID_FROM_ribs_payload_constraint_WHERE_payloadIDb___q_AND_constraintType_d
push eax
push dword [esi]
call fcn.004a50de
add esp, 0x14
cmp eax, ebx
jne 0x4a4264
xor edi, edi
mov ecx, dword [ebp - 0x10]
cmp dword [edi + ecx], ebx
je 0x4a426b
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 8]
push dword [edi + eax]
push 2
push esi
call fcn.004a3aaf
add esp, 0x10
cmp eax, ebx
jne 0x4a4257
mov ecx, dword [ebp + 8]
xor edx, edx
cmp dword [ecx], ebx
je 0x4a4252
inc edx
cmp dword [ecx + edx*4], ebx
jne 0x4a4245
cmp edx, ebx
jle 0x4a4252
push 0x10
pop eax
add edi, 4
jmp 0x4a425e
cmp eax, 8
jne 0x4a425e
xor eax, eax
cmp eax, ebx
je 0x4a421b
jmp 0x4a426b
cmp eax, 8
jne 0x4a426b
xor eax, eax
cmp eax, ebx
jne 0x4a4448
push ebx
push dword [ebp + 0x10]
lea eax, [ebp - 8]
push str.SELECT_payloadIDb_FROM_ribs_payload_constraint_WHERE_payloadID___q_AND_constraintType_d
push eax
push dword [esi]
call fcn.004a50de
add esp, 0x14
cmp eax, ebx
jne 0x4a42d6
xor edi, edi
mov ecx, dword [ebp - 8]
add ecx, edi
cmp dword [ecx], ebx
je 0x4a42dd
lea eax, [ebp + 8]
push eax
push dword [ecx]
push 2
push esi
call fcn.004a3aaf
add esp, 0x10
cmp eax, ebx
jne 0x4a42c6
mov ecx, dword [ebp + 8]
xor edx, edx
cmp dword [ecx], ebx
je 0x4a42cd
inc edx
cmp dword [ecx + edx*4], ebx
jne 0x4a42b7
cmp edx, ebx
jle 0x4a42cd
push 0x10
pop eax
jmp 0x4a42cd
cmp eax, 8
jne 0x4a42cd
xor eax, eax
add edi, 4
cmp eax, ebx
je 0x4a4290
jmp 0x4a42dd
cmp eax, 8
jne 0x4a42dd
xor eax, eax
cmp eax, ebx
jne 0x4a4448
push 1
push dword [ebp + 0x10]
lea eax, [ebp - 0xc]
push str.SELECT_payloadID_FROM_ribs_payload_constraint_WHERE_payloadIDb___q_AND_constraintType_d
push eax
push dword [esi]
call fcn.004a50de
add esp, 0x14
cmp eax, ebx
jne 0x4a4359
mov byte [ebp + 0xb], bl
xor edi, edi
mov ecx, dword [ebp - 0xc]
add ecx, edi
cmp dword [ecx], ebx
je 0x4a4360
cmp byte [ebp + 0xb], bl
jne 0x4a4360
lea eax, [ebp - 0x14]
push eax
push dword [ecx]
push 2
push esi
call fcn.004a3aaf
add esp, 0x10
cmp eax, ebx
jne 0x4a4349
mov eax, dword [ebp - 0xc]
push dword [edi + eax]
push dword [ebp + 0x10]
push str.INSERT_OR_REPLACE_INTO_upgraded_payloads__payloadIDOriginal__payloadIDUpgraded__VALUES___q___q_
push dword [esi]
call fcn.004a4e09
add esp, 0x10
cmp eax, ebx
sete byte [ebp + 0xb]
jmp 0x4a4350
cmp eax, 8
jne 0x4a4350
xor eax, eax
add edi, 4
cmp eax, ebx
je 0x4a4306
jmp 0x4a4360
cmp eax, 8
jne 0x4a4360
xor eax, eax
cmp eax, ebx
jne 0x4a4448
push 1
push dword [ebp + 0x10]
lea eax, [ebp - 4]
push str.SELECT_payloadIDb_FROM_ribs_payload_constraint_WHERE_payloadID___q_AND_constraintType_d
push eax
push dword [esi]
call fcn.004a50de
add esp, 0x14
cmp eax, ebx
jne 0x4a441d
xor edi, edi
mov ecx, dword [ebp - 4]
add ecx, edi
cmp dword [ecx], ebx
je 0x4a4424
push dword [ecx]
push dword [ebp + 0x10]
push str.UPDATE_upgraded_payloads_SET_payloadIDUpgraded___q_WHERE_payloadIDUpgraded___q
push dword [esi]
call fcn.004a4e09
add esp, 0x10
cmp eax, ebx
jne 0x4a4409
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp + 8], ebx
push dword [edi + eax]
push 2
push esi
call fcn.004a3aaf
add esp, 0x10
cmp eax, ebx
jne 0x4a4409
mov ecx, dword [ebp + 8]
cmp ecx, ebx
je 0x4a4409
cmp dword [ecx], ebx
je 0x4a4409
push dword [ebp + 0x10]
mov eax, dword [ebp - 4]
push dword [edi + eax]
push str.INSERT_OR_REPLACE_INTO_upgraded_payloads__payloadIDOriginal__payloadIDUpgraded__VALUES___q___q_
push dword [esi]
call fcn.004a4e09
add esp, 0x10
cmp eax, ebx
jne 0x4a4410
mov eax, dword [ebp - 4]
push dword [edi + eax]
push str.DELETE_FROM_payload_data_WHERE_payloadID___q
push dword [esi]
call fcn.004a4e09
add esp, 0xc
jmp 0x4a4410
cmp eax, 8
jne 0x4a4410
xor eax, eax
add edi, 4
cmp eax, ebx
je 0x4a438a
jmp 0x4a4424
cmp eax, 8
jne 0x4a4424
xor eax, eax
cmp eax, ebx
jne 0x4a4448
push ebx
call fcn.0048c0e5
push edx
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push str.INSERT_OR_REPLACE_INTO_ribs_collection_payload__collectionID__payloadID__installState__tsInstalled__VALUES___q___q___d___ld_
push dword [esi]
call fcn.004a4e09
add esp, 0x20
pop edi
jmp 0x4a444e
push 0xa
pop eax
pop esi
pop ebx
leave
ret