Function at 0x404850
Capabilities:
Hash data with md5
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
mov eax, dword [0x40f040]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [ecx + 4]
movq xmm0, qword [ecx + 6]
push ebx
push esi
push edi
lea edi, [ecx + 6]
mov word [ebp - 0x6c], ax
movzx eax, word [edi + 8]
mov ebx, edx
mov word [ebp - 0x62], ax
mov al, byte [edi + 0xa]
mov byte [ebp - 0x60], al
xor eax, eax
mov dword [ebp - 0x154], ebx
mov dword [ebp - 0x158], ecx
mov word [ebp - 0x70], 0x3cc1
mov byte [ebp - 0x6e], 1
movq qword [ebp - 0x6a], xmm0
mov byte [ebp - 0x51], 1
nop word [eax + eax]
mov cl, byte [edi + eax]
cmp cl, 0x20
je 0x405011
cmp cl, 0x22
je 0x405011
cmp cl, 0x27
je 0x405011
inc eax
cmp eax, 0xb
jl 0x4048b0
push 0x40f0f0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x40f10c]
push 0x40f0f0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp esi, 0x61a80
jl 0x404906
movzx eax, byte [ebp - 0x6f]
mov byte [ebp - 0x51], 4
push eax
jmp 0x405017
cmp dword [0x4db50c], 0
push edi
jne 0x404a69
push str.SELECT_memb__pwd_FROM_MEMB_INFO_WHERE_memb___id_s_COLLATE_Latin1_General_BIN
push 0x40f5d0
call fcn.00406480
add esp, 0xc
test al, al
je 0x404a45
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x404a45
push 0xb
lea eax, [ebp - 0x24]
mov word [ebp - 0x1c], 0
push eax
xorps xmm0, xmm0
mov byte [ebp - 0x1a], 0
push str.memb__pwd
movq qword [ebp - 0x24], xmm0
call fcn.004067a0
mov esi, dword [ebp - 0x158]
lea ecx, [ebp - 0x24]
add esi, 0x11
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404994
test dl, dl
je 0x404990
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404994
add eax, 2
add ecx, 2
test dl, dl
jne 0x404974
xor eax, eax
jmp 0x404999
sbb eax, eax
or eax, 1
test eax, eax
je 0x4049f5
mov ecx, 0x4db500
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4049c4
test dl, dl
je 0x4049c0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4049c4
add eax, 2
add ecx, 2
test dl, dl
jne 0x4049a4
xor eax, eax
jmp 0x4049c9
sbb eax, eax
or eax, 1
test eax, eax
je 0x4049f5
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
movzx eax, byte [ebp - 0x6f]
mov byte [ebp - 0x51], 0
push eax
jmp 0x405017
push dword [0x40f5dc]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call ebx
push 2
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov eax, 0x4db500
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x404c54
test cl, cl
je 0x404bed
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x404c54
add esi, 2
add eax, 2
test cl, cl
jne 0x404a16
xor eax, eax
jmp 0x404c59
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
movzx eax, byte [ebp - 0x6f]
push eax
jmp 0x405013
push str.SELECT_memb__pwd_FROM_MEMB_INFO_WHERE_memb___id_s
push 0x40f5d0
call fcn.00406480
add esp, 0xc
test al, al
je 0x404a45
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x404a45
push str.memb__pwd
call fcn.004066d0
mov esi, eax
xorps xmm0, xmm0
movups xmmword [ebp - 0x34], xmm0
cmp esi, 0xffffffff
je 0x404afe
shl esi, 0xd
xor edx, edx
add esi, 0x4101fe
mov dword [ebp - 0x15c], 0x30
xor ebx, ebx
mov cl, byte [ebx + esi]
test cl, cl
je 0x404afe
test bl, 1
jne 0x404ae6
cmp cl, 0x41
mov eax, 0x37
cmovl eax, dword [ebp - 0x15c]
sub cl, al
shl cl, 4
mov byte [ebp + edx - 0x34], cl
jmp 0x404af8
cmp cl, 0x41
jl 0x404af0
sub cl, 0x37
jmp 0x404af3
sub cl, 0x30
or byte [ebp + edx - 0x34], cl
inc edx
inc ebx
cmp edx, 0x10
jl 0x404ac0
mov ecx, edi
mov byte [ebp - 0xb4], 0
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x11c], 0x67452301
mov dword [ebp - 0x118], 0xefcdab89
lea edx, [ecx + 1]
mov dword [ebp - 0x114], 0x98badcfe
mov dword [ebp - 0x110], 0x10325476
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404b46
sub ecx, edx
xor ebx, ebx
xor edx, edx
test ecx, ecx
jle 0x404b65
movsx eax, byte [edi + edx]
add ebx, 0x11
inc edx
add ebx, eax
cmp edx, ecx
jl 0x404b57
mov esi, dword [ebp - 0x158]
mov eax, ecx
shl eax, 4
xorps xmm0, xmm0
add eax, ecx
add esi, 0x11
sub ebx, eax
lea ecx, [ebp - 0x150]
sub ebx, 0x56
movzx eax, bl
push eax
lea eax, [ebp - 0x18]
push eax
push esi
movups xmmword [ebp - 0x18], xmm0
call fcn.00401300
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x34]
cmp al, byte [ebp + ecx - 0x18]
jne 0x404bf1
inc ecx
cmp ecx, 0x10
jl 0x404ba0
push dword [0x40f5dc]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call ebx
push 2
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov eax, 0x4db500
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x404c54
test cl, cl
je 0x404bed
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x404c54
add esi, 2
add eax, 2
test cl, cl
jne 0x404bd1
xor eax, eax
jmp 0x404c59
mov ecx, 0x4db500
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404c18
test dl, dl
je 0x404c14
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404c18
add eax, 2
add ecx, 2
test dl, dl
jne 0x404bf8
xor eax, eax
jmp 0x404c1d
sbb eax, eax
or eax, 1
test eax, eax
je 0x404bb0
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
movzx eax, byte [ebp - 0x6f]
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 0x51], 0
push eax
mov eax, dword [ebp - 0x154]
push eax
jmp 0x40501c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404c6d
push edi
push str.Account__s_logged_with_global_password_
push 1
call fcn.00408470
add esp, 0xc
push edi
push str.EXEC_WZ_DesblocAccount__s
push 0x40f5d0
call fcn.00406480
add esp, 0xc
test al, al
je 0x404ff9
push dword [0x40f5dc]
mov esi, dword [sym.imp.ODBC32.dll_SQLFetch]
call esi
cmp ax, 0x64
je 0x404ff9
push edi
push str.SELECT_sno__numb_bloc_code_FROM_MEMB_INFO_WHERE_memb___id_s
push 0x40f5d0
call fcn.00406480
add esp, 0xc
test al, al
je 0x404ff9
push dword [0x40f5dc]
call esi
cmp ax, 0x64
je 0x404ff9
push 0xe
lea eax, [ebp - 0x5f]
push eax
push str.sno__numb
call fcn.004067a0
push str.bloc_code
call fcn.004066d0
cmp eax, 0xffffffff
jne 0x404cf0
or eax, eax
jmp 0x404d02
shl eax, 0xd
add eax, 0x4101fe
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
push dword [0x40f5dc]
mov byte [ebp - 0x50], al
call ebx
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x40f5dc]
call esi
push edi
push str.EXEC_WZ_GetAccountLevel__s
push 0x40f5d0
call fcn.00406480
add esp, 0xc
test al, al
je 0x404fd2
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x404fd2
push str.AccountLevel
call fcn.004066d0
cmp eax, 0xffffffff
jne 0x404d61
or eax, eax
jmp 0x404d73
shl eax, 0xd
add eax, 0x4101fe
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov word [ebp - 0x4e], ax
lea eax, [ebp - 0x4c]
push 0x14
push eax
push str.AccountExpireDate
call fcn.004067a0
push dword [0x40f5dc]
call ebx
push 2
push dword [0x40f5dc]
call esi
push edi
push str.SELECT_top_1_Lock_FROM_MEMB_INFO_WHERE_memb___id_s
push 0x40f5d0
call fcn.00406480
add esp, 0xc
test al, al
je 0x404dfe
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x404dfe
push str.Lock
call fcn.004066d0
cmp eax, 0xffffffff
jne 0x404dd5
or eax, eax
jmp 0x404de7
shl eax, 0xd
add eax, 0x4101fe
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
push dword [0x40f5dc]
mov dword [ebp - 0x38], eax
call ebx
push 2
push dword [0x40f5dc]
call esi
jmp 0x404e17
push dword [0x40f5dc]
call ebx
push 2
push dword [0x40f5dc]
call esi
mov dword [ebp - 0x38], 0
push edi
lea eax, [ebp - 0xb0]
push eax
call fcn.00402060
test al, al
je 0x404e9a
movzx eax, byte [ebp - 0x6f]
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 0x51], 3
push eax
mov eax, dword [ebp - 0x154]
push eax
call fcn.00407840
mov ecx, dword [ebp - 0x92]
call fcn.00408540
mov edx, eax
test edx, edx
je 0x405021
mov ax, word [ebp - 0xa8]
mov cx, word [ebp - 0x94]
movq xmm0, qword [ebp - 0xb0]
mov word [ebp - 0xa], ax
mov al, byte [ebp - 0xa6]
mov byte [ebp - 8], al
lea eax, [ebp - 0x18]
push 0x12
push eax
push dword [edx + 4]
mov word [ebp - 0x18], 0x12c1
mov byte [ebp - 0x16], 0x30
mov word [ebp - 0x14], cx
movq qword [ebp - 0x12], xmm0
jmp 0x40501c
mov ecx, dword [ebp - 0x158]
imul ebx, dword [ebp - 0x154], 0x70
lea edi, [ecx + 0x1c]
push edi
lea esi, [ecx + 6]
lea eax, [ebx + 0x4db658]
push eax
push esi
push str.EXEC_WZ_CONNECT_MEMB__s__s__s
push 0x40f5d0
call fcn.00406480
add esp, 0x14
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
movzx eax, byte [ebp - 0x6f]
push eax
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x154]
call fcn.00407840
push esi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
lea eax, [ebp - 0xb0]
push 0xb
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0xa5]
push edi
push 0x10
push eax
call esi
mov eax, dword [ebp - 0x158]
sub esp, 0x34
movups xmm0, xmmword [ebp - 0xb0]
mov byte [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
movzx eax, word [eax + 4]
mov word [ebp - 0x94], ax
movzx eax, word [ebx + 0x4db68c]
mov word [ebp - 0x92], ax
xor eax, eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
mov eax, esp
mov dword [ebp - 0x88], 0xffffffff
movups xmmword [eax], xmm0
movups xmm0, xmmword [ebp - 0xa0]
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x90]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [ebp - 0x80]
movups xmmword [eax + 0x30], xmm0
call fcn.004021a0
movzx eax, word [ebp - 0x92]
push eax
lea eax, [ebp - 0xa5]
push eax
lea eax, [ebp - 0xb0]
push eax
push str._AccountInfo__Account_connected__Account:__s__IpAddress:__s__GameServerCode:__d_
push 1
push 0x40f120
call fcn.00405b50
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004085b7
mov esp, ebp
pop ebp
ret
push dword [0x40f5dc]
call ebx
push 2
push dword [0x40f5dc]
call esi
movzx eax, byte [ebp - 0x6f]
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 0x51], 2
push eax
push dword [ebp - 0x154]
jmp 0x40501c
push dword [0x40f5dc]
call ebx
push 2
push dword [0x40f5dc]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x404fe4
push 0x3c
mov byte [ebp - 0x51], 2
lea eax, [ebp - 0x70]
push eax
push ebx
call fcn.00407840
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004085b7
mov esp, ebp
pop ebp
ret