Function at 0x4503c0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2044
call fcn.00463070
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_ntohl]
push esi
mov esi, edx
mov dword [esp + 0x38], ecx
push edi
mov eax, dword [esi]
push eax
call ebx
mov eax, dword [esi + 4]
push eax
call ebx
mov eax, dword [esi + 8]
add esi, 0xc
push eax
call ebx
movzx edi, byte [esi]
add edi, esi
mov dword [esp + 0x40], eax
mov ecx, dword [edi + 1]
push ecx
call ebx
mov ecx, dword [edi + 5]
push ecx
mov dword [esp + 0x3c], eax
call ebx
movzx ecx, word [edi + 9]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
push ecx
call esi
movzx eax, ax
mov dword [esp + 0x30], eax
movzx eax, word [edi + 0xb]
push eax
call esi
mov ebx, dword [esp + 0x3c]
lea ecx, [esp + 0x10]
xor esi, esi
mov dword [esp + 0x10], 0
push esi
push ecx
mov eax, dword [ebx + 0x1a0]
push 0xffffffffffffffff
push str.SELECT_ItemNum_from_Item_WHERE_Uin__AND_ItemID__
push eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov byte [esp + 0x33], 0
mov dword [esp + 0x48], eax
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_column_int]
add esp, 0x14
test eax, eax
jne 0x4504da
push dword [ebx + 0x18]
push 1
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x38]
push 2
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x4504da
push esi
push dword [esp + 0x14]
call edi
add esp, 8
mov dword [esp + 0x2c], eax
push dword [esp + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
add esp, 4
mov dword [esp + 0x10], esi
lea eax, [esp + 0x10]
push 0
push eax
push 0xffffffffffffffff
push str.SELECT_WWeight_SpeedWeight_JetWeight_SJetWeight_AccuWeight_AntiCollisionWeight_FROM_KartRefit_WHERE_Uin__AND_KartID__
push dword [esp + 0x44]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x45059e
push dword [ebx + 0x18]
push 1
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x40]
push 2
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x45059e
push 0
push dword [esp + 0x14]
call edi
push 1
push dword [esp + 0x1c]
movzx eax, ax
mov dword [esp + 0x28], eax
call edi
push 2
push dword [esp + 0x24]
movzx eax, ax
mov dword [esp + 0x2c], eax
call edi
push 3
push dword [esp + 0x2c]
movzx eax, ax
mov dword [esp + 0x40], eax
call edi
push 4
push dword [esp + 0x34]
movzx eax, ax
mov dword [esp + 0x50], eax
call edi
push 5
push dword [esp + 0x3c]
movzx eax, ax
mov dword [esp + 0x54], eax
call edi
add esp, 0x30
movzx esi, ax
push dword [esp + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
add esp, 4
mov dword [esp + 0x10], 0
push 0
call fcn.00480067
add esp, 4
mov dword [esp + 0x13d4], 0xffffffff
mov dword [esp + 0x54], eax
mov edx, 1
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [esp + edx*4 + 0x54], eax
inc edx
cmp edx, 0x270
jb 0x4505d1
cmp word [esp + 0x30], 0
mov dword [esp + 0x50], 0x270
jle 0x450a3c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
nop dword [eax]
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
movzx edi, ax
mov eax, dword [esp + 0x28]
movzx eax, ax
mov dword [esp + 0x4c], eax
movzx eax, bx
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x48], eax
movzx eax, dx
mov dword [esp + 0x44], eax
movzx eax, cx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x30]
dec eax
cmp dword [esp + 0x2c], 0
mov dword [esp + 0x30], eax
jle 0x450703
lea ecx, [esp + 0x50]
call fcn.00445830
mov ecx, 0x65
mul ecx
cmp eax, ecx
jae 0x450684
cmp eax, 0x44
jae 0x450684
mov ebx, ecx
nop
lea ecx, [esp + 0x50]
call fcn.00445830
mul ebx
cmp eax, 0x44
jb 0x450670
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
cmp eax, 0x17955
jg 0x450b7a
je 0x4509a3
add eax, 0xffffcfa8
cmp eax, 0xe
ja case.default.0x4506a7
jmp dword [eax*4 + 0x450d60]
mov edi, dword [esp + 0x28]
cmp di, 0xa
jge 0x4506bf
mov eax, dword [0x4cda94]
jmp 0x4506dc
cmp di, 0x14
jge 0x4506cc
mov eax, dword [0x4cda98]
jmp 0x4506dc
cmp di, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x4506e5
inc edi
mov dword [esp + 0x28], edi
cmp di, 0x1d
jg 0x450c0d
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
dec dword [esp + 0x2c]
inc byte [esp + 0x1f]
mov eax, dword [esp + 0x30]
test ax, ax
jg 0x450610
jmp 0x450a3c
mov edi, dword [esp + 0x24]
cmp di, 0xa
jge 0x450722
mov eax, dword [0x4cda94]
jmp 0x45073f
cmp di, 0x14
jge 0x45072f
mov eax, dword [0x4cda98]
jmp 0x45073f
cmp di, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x450748
inc edi
mov dword [esp + 0x24], edi
cmp di, 0x1d
jle case.0x4506a7.12381
mov dword [esp + 0x24], 0x1d
jmp 0x4509e1
mov edi, dword [esp + 0x20]
cmp di, 0xa
jge 0x45076c
mov eax, dword [0x4cda94]
jmp 0x450789
cmp di, 0x14
jge 0x450779
mov eax, dword [0x4cda98]
jmp 0x450789
cmp di, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x450792
inc edi
mov dword [esp + 0x20], edi
cmp di, 0x1d
jle case.0x4506a7.12381
mov dword [esp + 0x20], 0x1d
jmp 0x4509e1
mov ecx, dword [esp + 0x18]
cmp cx, 0xa
jge 0x4507ba
mov eax, dword [0x4cda94]
jmp 0x4507d7
cmp cx, 0x14
jge 0x4507c7
mov eax, dword [0x4cda98]
jmp 0x4507d7
cmp cx, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x4507e0
inc ecx
mov dword [esp + 0x18], ecx
cmp cx, 0x1d
jle 0x4506f3
mov dword [esp + 0x18], 0x1d
jmp 0x4509e1
mov edi, dword [esp + 0x14]
cmp di, 0xa
jge 0x450808
mov eax, dword [0x4cda94]
jmp 0x450825
cmp di, 0x14
jge 0x450815
mov eax, dword [0x4cda98]
jmp 0x450825
cmp di, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x45082e
inc edi
mov dword [esp + 0x14], edi
cmp di, 0x1d
jle case.0x4506a7.12381
mov dword [esp + 0x14], 0x1d
jmp 0x4509e1
mov edi, dword [esp + 0x28]
cmp di, 0xa
jge 0x450856
mov eax, dword [0x4cda94]
jmp 0x450873
cmp di, 0x14
jge 0x450863
mov eax, dword [0x4cda98]
jmp 0x450873
cmp di, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x4506e5
add edi, 2
jmp 0x4506e1
mov edi, dword [esp + 0x24]
cmp di, 0xa
jge 0x450894
mov eax, dword [0x4cda94]
jmp 0x4508b1
cmp di, 0x14
jge 0x4508a1
mov eax, dword [0x4cda98]
jmp 0x4508b1
cmp di, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x4508bc
add edi, 2
mov dword [esp + 0x24], edi
cmp di, 0x1d
jg 0x45074e
jmp case.0x4506a7.12381
mov edi, dword [esp + 0x20]
cmp di, 0xa
jge 0x4508dc
mov eax, dword [0x4cda94]
jmp 0x4508f9
cmp di, 0x14
jge 0x4508e9
mov eax, dword [0x4cda98]
jmp 0x4508f9
cmp di, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x450904
add edi, 2
mov dword [esp + 0x20], edi
cmp di, 0x1d
jg 0x45079c
jmp case.0x4506a7.12381
mov ecx, dword [esp + 0x18]
cmp cx, 0xa
jge 0x450924
mov eax, dword [0x4cda94]
jmp 0x450941
cmp cx, 0x14
jge 0x450931
mov eax, dword [0x4cda98]
jmp 0x450941
cmp cx, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x45094c
add ecx, 2
mov dword [esp + 0x18], ecx
cmp cx, 0x1d
jg 0x4507ea
jmp 0x4506f3
mov edi, dword [esp + 0x14]
cmp di, 0xa
jge 0x45096c
mov eax, dword [0x4cda94]
jmp 0x450989
cmp di, 0x14
jge 0x450979
mov eax, dword [0x4cda98]
jmp 0x450989
cmp di, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x450994
add edi, 2
mov dword [esp + 0x14], edi
cmp di, 0x1d
jg 0x450838
jmp case.0x4506a7.12381
cmp si, 0xa
jge 0x4509b0
mov eax, dword [0x4cda94]
jmp 0x4509cd
cmp si, 0x14
jge 0x4509bd
mov eax, dword [0x4cda98]
jmp 0x4509cd
cmp si, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x4509d2
inc esi
cmp si, 0x1d
jle case.0x4506a7.12381
mov esi, 0x1d
push 0xffff
call dword [sym.imp.WS2_32.dll_htons]
movq xmm0, qword [0x4ba0d0]
mov edx, 0x6e
mov word [esp + 0x50], ax
mov ecx, ebx
mov eax, dword [0x4ba0d8]
mov dword [esp + 0x5b], eax
mov al, byte [0x4ba0dc]
push 1
mov byte [esp + 0x63], al
movzx eax, word [ebx + 0x10]
push 1
push eax
movzx eax, word [ebx + 0x34]
push 2
push eax
lea eax, [esp + 0x64]
mov byte [esp + 0x66], 0xd
push 0x10
push eax
movq qword [esp + 0x6f], xmm0
call fcn.00437370
add esp, 0x1c
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x3c]
mov edx, dword [esp + 0x20]
movsx edi, ax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x40]
cmp edi, dword [ebx + 0x30]
mov edi, dword [esp + 0x30]
movsx ecx, si
cwde
mov dword [esp + 0x34], ecx
movsx edx, dx
jne 0x450aa5
mov edi, dword [esp + 0x18]
movsx ecx, di
mov edi, dword [esp + 0x14]
mov dword [ebx + 0x154], ecx
movsx ecx, di
mov edi, dword [esp + 0x30]
mov dword [ebx + 0x158], ecx
mov ecx, dword [esp + 0x34]
mov dword [ebx + 0x15c], edx
mov dword [ebx + 0x160], edi
mov dword [ebx + 0x164], eax
mov dword [ebx + 0x174], ecx
push 0
lea eax, [esp + 0x14]
push eax
push 0xffffffffffffffff
push str.UPDATE_KartRefit_SET_RefitCoutRefitCout1__SJetWeight__AccuWeight__JetWeight__WWeight__SpeedWeight__AntiCollisionWeight___WHERE_Uin__AND_KartID__
push dword [0x4d1304]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x450c1a
push edi
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
push 1
push dword [esp + 0x18]
call edi
mov ecx, dword [esp + 0x30]
add esp, 0xc
movsx eax, cx
push eax
push 2
push dword [esp + 0x18]
call edi
mov ecx, dword [esp + 0x2c]
add esp, 0xc
movsx eax, cx
push eax
push 3
push dword [esp + 0x18]
call edi
mov edi, dword [esp + 0x24]
add esp, 0xc
movsx eax, di
push eax
push 4
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
mov ecx, dword [esp + 0x20]
add esp, 0xc
movsx eax, cx
push eax
push 5
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x34]
push 6
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [ebx + 0x18]
push 7
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x40]
push 8
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
jmp 0x450c1e
cmp eax, 0x17957
jne case.0x4506a7.12381
cmp si, 0xa
jge 0x450b92
mov eax, dword [0x4cda94]
jmp 0x450baf
cmp si, 0x14
jge 0x450b9f
mov eax, dword [0x4cda98]
jmp 0x450baf
cmp si, 0x1d
mov eax, 0x64
cmovl eax, dword [0x4cda9c]
cmp edx, eax
jge 0x450bb6
add esi, 2
movzx eax, si
cmp si, 0x1d
jg 0x4509dc
mov ecx, dword [esp + 0x34]
movzx edx, cx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x18], edx
movzx edx, cx
mov ecx, dword [esp + 0x48]
movzx esi, cx
mov ecx, dword [esp + 0x4c]
movzx ecx, cx
mov dword [esp + 0x28], ecx
mov ecx, edi
mov dword [esp + 0x20], esi
mov esi, eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x14], edx
jmp 0x4506f7
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
jmp 0x4506f7
mov dword [esp + 0x28], 0x1d
jmp 0x4509e1
mov edi, dword [esp + 0x18]
push dword [esp + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
add esp, 4
mov dword [esp + 0x10], 0
cmp dword [esp + 0x2c], 0
lea eax, [esp + 0x10]
push 0
push eax
push 0xffffffffffffffff
jg 0x450c75
push str.DELETE_FROM_Item__WHERE_Uin__AND_ItemID__
push dword [0x4d1304]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x450cd2
push dword [ebx + 0x18]
push 1
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x38]
push 2
jmp 0x450cb8
push str.UPDATE_Item_SET_ItemNum__WHERE_Uin____AND_ItemID____
push dword [0x4d1304]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x450cd2
push dword [esp + 0x2c]
push 1
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [ebx + 0x18]
push 2
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x38]
push 3
push dword [esp + 0x18]
call dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [esp + 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov edx, dword [esp + 0x44]
add esp, 4
mov dword [esp + 0x10], 0
push esi
push dword [esp + 0x18]
push edi
push dword [esp + 0x2c]
push dword [esp + 0x34]
push dword [esp + 0x3c]
push ecx
mov ecx, ebx
call fcn.00450da0
mov esi, dword [sym.imp.WS2_32.dll_htonl]
add esp, 0x1c
push dword [ebx + 0x18]
call esi
push dword [esp + 0x38]
mov dword [esp + 0x54], eax
call esi
mov dword [esp + 0x54], eax
movsx eax, byte [esp + 0x1f]
push eax
call esi
push dword [esp + 0x2c]
mov dword [esp + 0x5c], eax
call esi
push 1
push 2
mov dword [esp + 0x64], eax
mov edx, 0x22c
movzx eax, word [ebx + 0x10]
mov ecx, ebx
push eax
push 1
push eax
lea eax, [esp + 0x64]
push 0x10
push eax
call fcn.00437370
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret