Function at 0x402b94
Capabilities:
Reference sql statements

Disassembly:
jmp 0x44d6a6
mov eax, 0x62a933
call fcn.00500010
sub esp, 0x9a0
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x1ac]
call fcn.004d2693
xor ebx, ebx
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], ebx
call fcn.005bf5d7
mov eax, dword [esi + 8]
mov byte [ebp - 4], 1
lea ecx, [eax + 0x4c790]
push ecx
lea ecx, [eax + 0x4c778]
add eax, 0x4c760
push ecx
push eax
lea eax, [ebp - 0x24]
push str.ODBC_DSN_s_UID_s_PWD_s
push eax
call fcn.0053f356
add esp, 0x14
lea ecx, [ebp - 0x1ac]
push 0xa
call fcn.004dc024
push 1
lea ecx, [ebp - 0x24]
call fcn.005bf67a
push eax
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x1ac]
call fcn.004d27e1
test eax, eax
jne 0x44d73a
push ebx
push ebx
push str.GameDB_SQL_Connection_Fail...
call fcn.00590f71
jmp 0x44e047
push 0x800
lea eax, [ebp - 0x9ac]
push ebx
push eax
mov dword [ebp - 0x1c], ebx
call fcn.00500130
mov edi, 0x80
lea eax, [ebp - 0xb0]
push edi
push ebx
push eax
call fcn.00500130
push edi
lea eax, [ebp - 0x148]
push ebx
push eax
call fcn.00500130
movzx eax, byte [esi + 0xc]
add esp, 0x24
push eax
push 4
lea eax, [ebp - 0x9ac]
push str.SELECT_strName__nMoney_FROM_KING_ELECTION_LIST_WHERE_byType___d_and_byNation_d
push eax
call dword [sym.imp.user32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x2c], ebx
call fcn.005bf5d7
push 0x15
lea eax, [ebp - 0xc8]
push ebx
push eax
mov byte [ebp - 4], 2
call fcn.00500130
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x1a8]
push 3
call sub.odbc32.dll_SQLAllocHandle
cmp ax, bx
jne 0x44e03b
lea eax, [ebp - 0x9ac]
push 0xfffffffffffffffd
push eax
push dword [ebp - 0x28]
call sub.odbc32.dll_SQLExecDirectA
cmp ax, bx
je 0x44d7ff
cmp ax, 1
je 0x44d7ff
cmp ax, 0x64
je 0x44e03b
push dword [ebp - 0x28]
push 3
call sub.odbc32.dll_SQLFreeHandle
jmp 0x44e03b
push dword [ebp - 0x28]
call sub.odbc32.dll_SQLFetch
cmp ax, bx
je 0x44d816
cmp ax, 1
jne 0x44d8b5
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0xc8]
push 0x15
push eax
push 1
push 1
push dword [ebp - 0x28]
call sub.odbc32.dll_SQLGetData
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push 4
push eax
push 0xfffffffffffffff0
push 2
push dword [ebp - 0x28]
call sub.odbc32.dll_SQLGetData
lea eax, [ebp - 0xc8]
lea ecx, [ebp - 0x20]
push eax
call fcn.005bf614
lea ecx, [ebp - 0x20]
call fcn.0053f67a
lea eax, [esi + 0x1a8]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x20]
call fcn.005bf67a
push eax
push dword [ebp - 0x10]
call fcn.00501e50
pop ecx
test eax, eax
pop ecx
je 0x44d88e
inc dword [ebp - 0x18]
add dword [ebp - 0x10], 0x20
cmp dword [ebp - 0x18], 0xa
jl 0x44d868
jmp 0x44d89e
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x2c]
shl eax, 5
mov dword [eax + esi + 0x1a4], ecx
push 0x15
lea eax, [ebp - 0xc8]
push ebx
push eax
call fcn.00500130
add esp, 0xc
jmp 0x44d7ff
push dword [ebp - 0x28]
push 3
call sub.odbc32.dll_SQLFreeHandle
lea ecx, [ebp - 0x1ac]
call fcn.004d2de3
push str.KingElectionResult___1
call fcn.00403841
pop ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x18]
add eax, 0xd
shl eax, 5
cmp byte [eax + esi], 4
jne 0x44d95e
mov eax, dword [ebp - 0x18]
shl eax, 5
add eax, esi
mov ecx, dword [eax + 0x1a4]
add dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x18], ebx
jne 0x44d905
mov dword [ebp - 0x10], ebx
jmp 0x44d91a
mov edx, dword [ebp - 0x10]
shl edx, 5
cmp dword [edx + esi + 0x1a4], ecx
jge 0x44d91a
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x10], ecx
mov cl, byte [eax + 0x1a1]
push 0x14
mov byte [eax + 0x561], cl
mov ecx, dword [ebp - 0x18]
add ecx, 0x2b
shl ecx, 5
mov byte [ecx + esi], 2
mov dword [eax + 0x564], ebx
mov cx, word [eax + 0x1a2]
mov word [eax + 0x562], cx
lea ecx, [eax + 0x1a8]
add eax, 0x568
push ecx
push eax
call fcn.005018d0
add esp, 0xc
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0xa
jl 0x44d8db
push str.KingElectionResult___2
call fcn.00403841
cmp dword [ebp - 0x10], 0xffffffff
pop ecx
jne 0x44d9b0
push ebx
mov ecx, esi
mov byte [esi + 0xd], bl
call fcn.00402824
mov dword [ebp - 0x18], ebx
push dword [ebp - 0x18]
mov ecx, esi
push 3
call fcn.0040286a
push dword [ebp - 0x18]
mov ecx, esi
push 4
call fcn.0040286a
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0xa
jl 0x44d98a
jmp 0x44df70
push edi
lea eax, [ebp - 0x148]
push ebx
push eax
call fcn.00500130
add esp, 0xc
lea eax, [ebp - 0x148]
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
push str.KingElectionResult___2_1____kingnumber_d__total_d_n
push eax
call fcn.005006a0
lea eax, [ebp - 0x148]
push eax
call fcn.00403841
add esp, 0x14
cmp dword [ebp - 0x1c], ebx
mov byte [esi + 0xd], 7
jne 0x44da03
mov ecx, dword [ebp - 0x10]
push 1
shl ecx, 5
pop eax
mov dword [ebp - 0x1c], eax
mov dword [ecx + esi + 0x1a4], eax
mov eax, dword [ebp - 0x10]
xor edx, edx
shl eax, 5
add eax, esi
push edi
mov dword [ebp - 0x18], eax
push ebx
mov eax, dword [eax + 0x1a4]
imul eax, eax, 0x64
div dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x148]
push eax
call fcn.00500130
add esp, 0xc
lea eax, [esi + 0x48]
push eax
lea eax, [ebp - 0x148]
push dword [ebp - 0x10]
push str.KingElectionResult___2_2_1____kingnumber_d__name_s_n
push eax
call fcn.005006a0
lea eax, [ebp - 0x148]
push eax
call fcn.00403841
mov eax, dword [ebp - 0x18]
add esp, 0x14
add eax, 0x1a8
mov ecx, esi
push ebx
push ebx
push eax
push dword [ebp - 0x14]
movzx eax, byte [esi + 0xc]
push 8
push eax
push 0x1e
call fcn.00401b90
push edi
lea eax, [ebp - 0x148]
push ebx
push eax
call fcn.00500130
add esp, 0xc
lea eax, [esi + 0x48]
push eax
lea eax, [ebp - 0x148]
push dword [ebp - 0x10]
push str.KingElectionResult___2_2_2____kingnumber_d__name_s_n
push eax
call fcn.005006a0
lea eax, [ebp - 0x148]
push eax
call fcn.00403841
movzx eax, byte [esi + 0xd]
add esp, 0x14
mov ecx, esi
push eax
call fcn.00402824
push edi
lea eax, [ebp - 0x148]
push ebx
push eax
call fcn.00500130
add esp, 0xc
lea eax, [esi + 0x48]
push eax
lea eax, [ebp - 0x148]
push dword [ebp - 0x10]
push str.KingElectionResult___2_2_3____kingnumber_d__name_s_n
push eax
call fcn.005006a0
lea eax, [ebp - 0x148]
push eax
call fcn.00403841
mov eax, dword [ebp - 0x18]
push 0x14
add eax, 0x1a8
push eax
lea eax, [esi + 0x48]
push eax
call fcn.005018d0
mov eax, dword [ebp - 0x10]
push edi
add eax, 0x2b
push ebx
shl eax, 5
mov byte [eax + esi], 1
lea eax, [ebp - 0x148]
push eax
call fcn.00500130
add esp, 0x2c
lea eax, [esi + 0x48]
push eax
lea eax, [ebp - 0x148]
push dword [ebp - 0x10]
push str.KingElectionResult___2_2____kingnumber_d__name_s_n
push eax
call fcn.005006a0
lea eax, [ebp - 0x148]
push eax
call fcn.00403841
lea eax, [esi + 0x48]
push 2
push eax
call fcn.00401514
add esp, 0x1c
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x44dbc8
mov ecx, dword [eax + 0x8098]
push 2
mov byte [ecx + 0x51], 1
mov byte [ebp - 0xb0], 1
mov byte [ebp - 0xaf], 4
mov byte [ebp - 0xae], 4
mov eax, dword [eax + 0x8058]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xad]
push eax
call fcn.00500360
mov eax, dword [ebp - 0x10]
add esp, 0xc
movsx ecx, word [eax + 0x80d4]
push ebx
push ebx
push ebx
push ecx
movsx ecx, word [eax + 0x80d2]
mov eax, dword [eax + 0x8098]
push ecx
mov ecx, dword [esi + 8]
movzx eax, byte [eax + 0x3c]
push eax
lea eax, [ebp - 0xb0]
push 5
push eax
call fcn.004035d5
push str.KingElectionResult___2_3
call fcn.00403841
mov eax, dword [ebp - 0x18]
pop ecx
movsx edx, word [eax + 0x562]
mov eax, dword [esi + 8]
add eax, 0x15f4
mov ecx, dword [eax]
cmp ecx, ebx
jle 0x44dd57
cmp edx, ecx
jne 0x44dd57
mov dword [eax], ebx
mov eax, dword [esi + 8]
push edi
push ebx
mov byte [eax + 0x15f8], bl
mov eax, dword [esi + 8]
mov word [eax + 0x15fa], bx
mov eax, dword [esi + 8]
mov word [eax + 0x15fc], bx
mov eax, dword [esi + 8]
mov word [eax + 0x15fe], bx
lea eax, [ebp - 0xb0]
push eax
call fcn.00500130
mov eax, dword [esi + 8]
mov byte [ebp - 0xb0], 0x43
mov byte [ebp - 0xaf], 2
push 2
mov eax, dword [eax + 0x15f0]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xae]
push eax
call fcn.00500360
mov eax, dword [esi + 8]
push 2
mov eax, dword [eax + 0x15f4]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xac]
push eax
call fcn.00500360
mov ecx, dword [esi + 8]
add esp, 0x24
mov al, byte [ecx + 0x1618]
push 7
mov byte [ebp - 0xaa], al
lea eax, [ebp - 0xb0]
push eax
push 0x3e8
call fcn.004037e7
mov eax, dword [esi + 8]
push dword [eax + 0x15f4]
lea ecx, [eax + 0x15e8]
call fcn.0040178a
push edi
lea eax, [ebp - 0xb0]
push ebx
push eax
call fcn.00500130
mov eax, dword [esi + 8]
mov byte [ebp - 0xb0], 0x6d
mov byte [ebp - 0xaf], 2
push 2
mov cl, byte [eax + 0x1618]
mov byte [ebp - 0xad], 1
mov byte [ebp - 0xae], cl
mov eax, dword [eax + 0x15f0]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xac]
push eax
call fcn.00500360
mov eax, dword [esi + 8]
push 2
mov eax, dword [eax + 0x15f4]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xaa]
push eax
call fcn.00500360
mov eax, dword [esi + 8]
add esp, 0x24
mov cl, byte [eax + 0x161a]
mov byte [ebp - 0xa8], cl
mov cl, byte [eax + 0x161b]
mov byte [ebp - 0xa7], cl
mov cl, byte [eax + 0x161c]
push 0xb
mov byte [ebp - 0xa6], cl
lea ecx, [ebp - 0xb0]
push ecx
lea ecx, [eax + 0x5c]
call fcn.00401bd6
push str.KingElectionResult___2_4
call fcn.00403841
push edi
lea eax, [ebp - 0xb0]
push ebx
push eax
call fcn.00500130
mov al, byte [esi + 0xc]
push 4
mov byte [ebp - 0xac], al
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xab]
push eax
mov byte [ebp - 0xb0], 0xde
mov byte [ebp - 0xaf], 1
mov byte [ebp - 0xae], 4
mov byte [ebp - 0xad], 3
call fcn.00500360
mov eax, dword [ebp - 0x18]
push 4
mov eax, dword [eax + 0x1a4]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xa7]
push eax
call fcn.00500360
lea eax, [esi + 0x48]
push eax
call fcn.005008b0
mov byte [ebp - 0xa3], al
lea eax, [esi + 0x48]
push eax
call fcn.005008b0
mov dword [ebp - 0x14], eax
push eax
lea eax, [esi + 0x48]
push eax
lea eax, [ebp - 0xa2]
push eax
call fcn.00500360
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi + 8]
add esp, 0x3c
add eax, 0xe
cmp dword [ecx + 0x4c66c], ebx
jne 0x44de0d
push ebx
jmp 0x44de0f
push 1
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.0040303f
push str.KingElectionResult___2_5
call fcn.00403841
lea eax, [esi + 0x568]
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], 0xa
push dword [ebp - 0x10]
call fcn.005008b0
test eax, eax
pop ecx
je 0x44df34
push edi
lea eax, [ebp - 0xb0]
push ebx
push eax
call fcn.00500130
lea eax, [ebp - 0x14]
push 2
push eax
lea eax, [ebp - 0xaf]
push eax
mov byte [ebp - 0xb0], 0x4a
mov dword [ebp - 0x14], ebx
call fcn.00500360
mov al, byte [esi + 0xc]
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 0xaa], al
push 2
mov al, byte [ecx - 8]
mov byte [ebp - 0xad], 1
mov byte [ebp - 0xa9], al
mov byte [ebp - 0xac], 7
movsx eax, word [ecx - 6]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xa8]
push eax
mov byte [ebp - 0xab], 1
call fcn.00500360
mov eax, dword [ebp - 0x10]
push 4
mov eax, dword [eax - 4]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xa6]
push eax
call fcn.00500360
push dword [ebp - 0x10]
call fcn.005008b0
push dword [ebp - 0x10]
mov byte [ebp - 0xa2], al
call fcn.005008b0
push eax
mov dword [ebp - 0x14], eax
push dword [ebp - 0x10]
lea eax, [ebp - 0xa1]
push eax
call fcn.00500360
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi + 8]
add esp, 0x44
add eax, 0xf
add ecx, 0x5c
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.00401bd6
push 2
push dword [ebp - 0x10]
call fcn.00401514
pop ecx
cmp eax, ebx
pop ecx
je 0x44df34
mov ecx, dword [ebp - 0x10]
mov eax, dword [eax + 0x8098]
mov cl, byte [ecx - 8]
mov byte [eax + 0x51], cl
add dword [ebp - 0x10], 0x20
dec dword [ebp - 0x1c]
jne 0x44de37
push str.KingElectionResult___2_6
call fcn.00403841
pop ecx
mov dword [ebp - 0x1c], ebx
push dword [ebp - 0x1c]
mov ecx, esi
push 3
call fcn.0040286a
push dword [ebp - 0x1c]
mov ecx, esi
push 4
call fcn.0040286a
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0xa
jl 0x44df4f
push str.KingElectionResult___3
call fcn.00403841
movzx eax, byte [esi + 0x10]
inc eax
pop ecx
cmp eax, 0xc
jle 0x44df8f
inc word [esi + 0xe]
mov byte [esi + 0x10], 1
jmp 0x44df92
mov byte [esi + 0x10], al
push edi
lea eax, [ebp - 0xb0]
push ebx
push eax
call fcn.00500130
lea eax, [ebp - 0x14]
push 2
push eax
lea eax, [ebp - 0xaf]
push eax
mov byte [ebp - 0xb0], 0x4a
mov dword [ebp - 0x14], ebx
call fcn.00500360
mov al, byte [esi + 0xc]
push 2
mov byte [ebp - 0xab], al
mov al, byte [esi + 0xd]
mov byte [ebp - 0xaa], al
mov byte [ebp - 0xad], 1
movsx eax, word [esi + 0xe]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xa9]
push eax
mov byte [ebp - 0xac], 8
call fcn.00500360
mov al, byte [esi + 0x10]
mov ecx, dword [esi + 8]
mov byte [ebp - 0xa7], al
mov al, byte [esi + 0x11]
mov byte [ebp - 0xa6], al
mov al, byte [esi + 0x12]
mov byte [ebp - 0xa5], al
mov al, byte [esi + 0x13]
add esp, 0x24
mov byte [ebp - 0xa4], al
lea eax, [ebp - 0xb0]
add ecx, 0x5c
push 0xd
push eax
call fcn.00401bd6
push str.KingElectionResult___4
call fcn.00403841
pop ecx
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005654bc
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], bl
call fcn.005654bc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ac]
call fcn.004d275f
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret