joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405610
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x40561b
or eax, 0xffffffff
ret
mov eax, dword [esi + 4]
test eax, eax
jne 0x40566b
call dword [sym.imp.MSVCR100.dll__errno]
mov dword [eax], 0
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
push eax
push 0x4000
push 1
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
test eax, eax
mov dword [esi + 4], eax
jne 0x405666
mov edx, dword [esi + 0x40]
mov dword [esi + 0x3c], 1
mov cl, byte [edx + 0xc]
or eax, 0xffffffff
test cl, 0x20
je 0x405678
mov dword [esi + 0x38], eax
ret
mov eax, dword [esi + 0x44]
mov dword [esi], eax
dec dword [esi + 4]
mov eax, dword [esi]
mov cl, byte [eax]
inc eax
mov dword [esi], eax
movzx eax, cl
ret

Function at 0x405680
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, eax
push edi
mov edi, dword [esi + 4]
cmp edi, 2
jae 0x4056f2
test edi, edi
je 0x405699
mov eax, dword [esi]
mov ecx, dword [esi + 0x44]
mov dl, byte [eax]
mov byte [ecx], dl
call dword [sym.imp.MSVCR100.dll__errno]
mov dword [eax], 0
mov eax, dword [esi + 0x40]
mov ecx, edi
push eax
mov eax, dword [esi + 0x44]
mov edx, 0x4000
sar edx, cl
add eax, edi
push edx
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
test eax, eax
jne 0x4056d8
mov ecx, dword [esi + 0x40]
test byte [ecx + 0xc], 0x20
je 0x4056d8
mov dword [esi + 0x38], 0xffffffff
mov edx, dword [esi + 4]
add edx, eax
mov eax, edx
cmp eax, 2
mov dword [esi + 4], edx
mov edx, dword [esi + 0x44]
mov dword [esi], edx
jae 0x4056f2
pop edi
mov dword [esi + 0x58], eax
pop esi
ret
mov eax, dword [esi]
cmp byte [eax], 0x1f
jne 0x4057cc
cmp byte [eax + 1], 0x8b
jne 0x4057cc
mov ecx, dword [esi + 4]
add ecx, 0xfffffffe
add eax, 2
push ebx
mov dword [esi + 4], ecx
mov dword [esi], eax
call fcn.00405610
mov edi, eax
call fcn.00405610
cmp edi, 8
mov ebx, eax
jne 0x4057c1
test bl, 0xe0
jne 0x4057c1
mov edi, 6
jmp 0x405740
call fcn.00405610
dec edi
jne 0x405740
test bl, 4
je 0x405771
call fcn.00405610
mov edi, eax
call fcn.00405610
shl eax, 8
add edi, eax
mov edi, edi
mov eax, edi
dec edi
test eax, eax
je 0x405771
call fcn.00405610
cmp eax, 0xffffffff
jne 0x405760
test bl, 8
je 0x405784
call fcn.00405610
test eax, eax
je 0x405784
cmp eax, 0xffffffff
jne 0x405776
test bl, 0x10
je 0x40579e
lea esp, [esp]
call fcn.00405610
test eax, eax
je 0x40579e
cmp eax, 0xffffffff
jne 0x405790
test bl, 2
je 0x4057b0
mov edi, 2
call fcn.00405610
dec edi
jne 0x4057a8
mov ecx, dword [esi + 0x3c]
neg ecx
sbb ecx, ecx
pop ebx
and ecx, 0xfffffffd
pop edi
mov dword [esi + 0x38], ecx
pop esi
ret
pop ebx
pop edi
mov dword [esi + 0x38], 0xfffffffd
pop esi
ret
pop edi
mov dword [esi + 0x58], 1
pop esi
ret
Function at 0x405890
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x405956
cmp byte [esi + 0x5c], 0x77
jne 0x405956
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
test ebx, ebx
mov dword [esi], eax
mov dword [esi + 4], ebx
je 0x405937
push edi
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x4058e8
mov ecx, dword [esi + 0x40]
mov eax, dword [esi + 0x48]
push ecx
push 0x4000
push 1
push eax
mov dword [esi + 0xc], eax
call edi
add esp, 0x10
cmp eax, 0x4000
jne 0x40592f
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x64]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0x68]
add eax, edx
mov dword [esi + 0x64], eax
mov eax, dword [esi + 0x10]
add ecx, eax
push 0
push esi
mov dword [esi + 0x68], ecx
call fcn.00406150
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x64]
sub edx, ecx
mov ecx, dword [esi + 0x68]
mov dword [esi + 0x64], edx
mov edx, dword [esi + 0x10]
sub ecx, edx
add esp, 8
test eax, eax
mov dword [esi + 0x38], eax
mov dword [esi + 0x68], ecx
jne 0x405936
mov eax, dword [esi + 4]
test eax, eax
jne 0x4058c0
jmp 0x405936
mov dword [esi + 0x38], 0xffffffff
pop edi
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x4c]
push ebx
push eax
push ecx
call fcn.00408fa0
mov ecx, dword [esi + 4]
add esp, 0xc
mov dword [esi + 0x4c], eax
mov eax, ebx
pop ebx
sub eax, ecx
pop esi
ret
mov eax, 0xfffffffe
pop esi
ret

Function at 0x4059e0
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x405aa9
cmp byte [esi + 0x5c], 0x77
jne 0x405aa9
mov dword [esi + 4], ebx
push edi
lea esp, [esp]
mov eax, dword [esi + 0x10]
mov edi, 0x4000
sub edi, eax
je 0x405a31
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x48]
push eax
push edi
push 1
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x405a9f
mov edx, dword [esi + 0x48]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], 0x4000
test ebx, ebx
jne 0x405a8f
mov ecx, dword [esi + 0x68]
mov eax, dword [esi + 0x10]
add ecx, eax
mov dword [esi + 0x68], ecx
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.00406150
mov ebx, dword [esi + 0x68]
mov ecx, dword [esi + 0x10]
sub ebx, ecx
add esp, 8
test edi, edi
mov dword [esi + 0x38], eax
mov dword [esi + 0x68], ebx
jne 0x405a68
cmp eax, 0xfffffffb
jne 0x405a68
mov dword [esi + 0x38], edi
test ecx, ecx
jne 0x405a76
cmp dword [esi + 0x38], 1
je 0x405a76
xor ebx, ebx
jmp 0x405a7b
mov ebx, 1
mov eax, dword [esi + 0x38]
test eax, eax
je 0x405a00
cmp eax, 1
je 0x405a00
mov esi, dword [esi + 0x38]
mov eax, esi
dec eax
neg eax
sbb eax, eax
pop edi
and eax, esi
pop esi
pop ebx
ret
or eax, 0xffffffff
pop edi
mov dword [esi + 0x38], eax
pop esi
pop ebx
ret
pop esi
mov eax, 0xfffffffe
pop ebx
ret
Function at 0x406820
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
mov eax, dword [ebp + 0x24]
push esi
push edi
mov dword [esp + 0x14], eax
jmp 0x406835
mov eax, dword [esp + 0x14]
mov edx, dword [ebp + 0x6c]
mov ebx, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x64]
sub ebx, edx
mov edx, dword [ebp + 0x24]
lea edx, [eax + edx - 0x106]
sub ebx, ecx
cmp ecx, edx
jb 0x4068bf
mov edi, dword [ebp + 0x30]
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea esi, [edi + eax]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 0x68]
mov edx, dword [ebp + 0x64]
mov ecx, dword [ebp + 0x54]
sub esi, eax
sub edx, eax
sub ecx, eax
mov dword [ebp + 0x68], esi
mov esi, dword [ebp + 0x44]
mov dword [ebp + 0x54], ecx
mov ecx, dword [ebp + 0x3c]
mov dword [ebp + 0x64], edx
lea edx, [ecx + esi*2]
movzx ecx, word [edx - 2]
sub edx, 2
cmp ecx, eax
jb 0x406896
sub ecx, eax
jmp 0x406898
xor ecx, ecx
dec esi
mov word [edx], cx
jne 0x406887
mov edx, dword [ebp + 0x38]
mov esi, eax
lea edx, [edx + eax*2]
movzx ecx, word [edx - 2]
sub edx, 2
cmp ecx, eax
jb 0x4068b5
sub ecx, eax
jmp 0x4068b7
xor ecx, ecx
dec esi
mov word [edx], cx
jne 0x4068a6
add ebx, eax
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x406928
mov ecx, dword [ebp + 0x6c]
mov edx, dword [ebp + 0x64]
mov edi, dword [ebp + 0x30]
add ecx, edx
add ecx, edi
push ecx
mov ecx, ebx
mov ebx, eax
call fcn.00406650
mov ecx, dword [ebp + 0x6c]
add ecx, eax
mov edx, ecx
add esp, 4
cmp edx, 3
mov dword [ebp + 0x6c], ecx
jb 0x406912
mov eax, dword [ebp + 0x64]
mov ecx, dword [ebp + 0x30]
lea esi, [eax + ecx]
movzx eax, byte [esi]
mov ecx, dword [ebp + 0x50]
mov dword [ebp + 0x40], eax
shl eax, cl
movzx ecx, byte [esi + 1]
xor eax, ecx
and eax, dword [ebp + 0x4c]
mov dword [ebp + 0x40], eax
cmp edx, 0x106
jae 0x406928
mov edx, dword [ebp]
mov eax, dword [edx + 4]
test eax, eax
jne 0x406831
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40f450
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4120a6
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x41a428]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [esi + 0x30]
cmp eax, ebx
je 0x40f492
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
lea edi, [esi + 0xc]
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
mov dword [ebp - 0x14], edi
mov dword [edi], vtable.SGBlockingQueue_class_LogStreamPrivate::LogEntry_.0
lea ecx, [edi + 0x20]
mov byte [ebp - 4], 3
call fcn.004106b0
lea ecx, [edi + 0x1c]
mov byte [ebp - 4], 2
call fcn.004101a0
lea ecx, [edi + 4]
mov dword [edi], vtable.SGQueue_class_LogStreamPrivate::LogEntry_.0
call fcn.0040ea80
mov eax, dword [edi + 4]
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [esi + 8]
mov dword [edi + 4], ebx
mov byte [ebp - 4], bl
call fcn.004101a0
mov ecx, esi
mov dword [ebp - 4], 0xffffffff
call fcn.00410160
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4100b0
Capabilities:
Create thread

Disassembly:
push esi
mov esi, dword [ecx + 4]
cmp dword [esi], 0xffffffff
je 0x4100bd
xor al, al
pop esi
ret
push 0
push 0
push ecx
push 0x410050
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi], eax
cmp eax, 0xffffffff
setne al
pop esi
ret

Function at 0x410820
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41a428]
jne 0x41082a
repz ret
jmp fcn.00410d82

Function at 0x431000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43100c
nop
pop eax
nop
nop
nop
nop
add eax, 0x403e6a
nop
nop
sub eax, 0x403e10
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x431030
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
jne 0x43101e
nop
nop
nop
nop
nop
nop
nop
popal
nop
jmp loc.00401219
Function at 0x402810
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
movzx ecx, word [eax + 4]
mov edx, dword [eax + 6]
push ebx
push esi
lea esi, [eax + 6]
mov eax, dword [esi + 4]
mov word [ebp - 0x20], cx
movzx ecx, word [esi + 8]
mov dword [ebp - 0x1e], edx
mov dl, byte [esi + 0xa]
mov word [ebp - 0x16], cx
push esi
push str.SELECT__FROM_CashShopData_WHERE_AccountID_s
mov ecx, 0x424ee0
mov dword [ebp - 0x24], 0x1824c1
mov dword [ebp - 0x1a], eax
mov byte [ebp - 0x14], dl
mov byte [ebp - 0x13], 0
call fcn.00417790
add esp, 8
test al, al
je 0x40292e
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40292e
push str.WCoinC
call fcn.00417950
mov esi, dword [sym.imp.MSVCR100.dll_atoi]
cmp eax, 0xffffffff
jne 0x402893
or eax, 0xffffffff
jmp 0x4028a1
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.WCoinP
mov dword [ebp - 0x10], eax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x4028b7
or eax, eax
jmp 0x4028c5
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.GoblinPoint
mov dword [ebp - 0xc], eax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x4028db
or eax, eax
jmp 0x4028e9
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.Ruud
mov dword [ebp - 8], eax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x4028ff
or eax, eax
jmp 0x40290d
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
mov ecx, dword [0x424eec]
push ecx
mov dword [ebp - 4], eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x424eec]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x4029a1
mov eax, dword [0x424eec]
push edi
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push eax
call edi
mov ecx, dword [0x424eec]
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push ecx
call ebx
push esi
push str.INSERT_INTO_CashShopData__AccountID_WCoinC_WCoinP_GoblinPoint_Ruud__VALUES___s_0_0_0_0_
mov ecx, 0x424ee0
call fcn.00417790
add esp, 8
test al, al
jne 0x40297e
mov edx, dword [0x424eec]
push edx
call edi
mov eax, dword [0x424eec]
push 2
push eax
call ebx
mov byte [ebp - 0x13], 1
jmp 0x4029a0
mov ecx, dword [0x424eec]
push ecx
call edi
mov edx, dword [0x424eec]
push 2
push edx
call ebx
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
pop edi
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
push ecx
mov ebx, 0x24
call fcn.004198e0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4029c0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
movzx ecx, word [eax + 4]
mov edx, dword [eax + 6]
push ebx
push esi
lea esi, [eax + 6]
mov word [ebp - 0x38], cx
mov ecx, dword [esi + 4]
mov dword [ebp - 0x36], edx
mov dx, word [esi + 8]
mov dword [ebp - 0x32], ecx
mov cl, byte [esi + 0xa]
mov word [ebp - 0x2e], dx
mov edx, dword [eax + 0x14]
mov byte [ebp - 0x2c], cl
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x28], edx
mov edx, dword [eax + 0x1c]
mov dword [ebp - 0x24], ecx
movzx ecx, word [eax + 0x20]
push edi
mov dword [ebp - 0x20], edx
mov edx, dword [eax + 0x24]
mov al, byte [eax + 0x28]
mov word [ebp - 0x1c], cx
push esi
push str.SELECT__FROM_CashShopData_WHERE_AccountID_s
mov ecx, 0x424ee0
mov dword [ebp - 0x3c], 0x1183cc1
mov byte [ebp - 0x2b], 0
mov dword [ebp - 0x18], edx
mov byte [ebp - 0x14], al
call fcn.00417790
add esp, 8
test al, al
je 0x402b4a
mov ecx, dword [0x424eec]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x402b4a
push str.WCoinC
call fcn.00417950
mov edi, dword [sym.imp.MSVCR100.dll_atoi]
cmp eax, 0xffffffff
jne 0x402a6a
or eax, eax
jmp 0x402a78
shl eax, 0xd
add eax, 0x425b0e
push eax
call edi
add esp, 4
push str.WCoinP
mov dword [ebp - 0x10], eax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x402a8e
or eax, eax
jmp 0x402a9c
shl eax, 0xd
add eax, 0x425b0e
push eax
call edi
add esp, 4
push str.GoblinPoint
mov dword [ebp - 0xc], eax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x402ab2
or eax, eax
jmp 0x402ac0
shl eax, 0xd
add eax, 0x425b0e
push eax
call edi
add esp, 4
mov edx, dword [0x424eec]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push edx
mov dword [ebp - 8], eax
call edi
mov eax, dword [0x424eec]
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push eax
call ebx
push 0x53
push esi
push str.SELECT_count___FROM_CashShopInventory_WHERE_AccountID_s_AND_InventoryType_d
mov ecx, 0x424ee0
call fcn.00417790
add esp, 0xc
test al, al
je 0x402b34
mov ecx, dword [0x424eec]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x402b34
push 0x425b0e
call dword [sym.imp.MSVCR100.dll_atoi]
mov edx, dword [0x424eec]
add esp, 4
push edx
mov dword [ebp - 4], eax
call edi
mov eax, dword [0x424eec]
push 2
push eax
call ebx
jmp 0x402b69
mov ecx, dword [0x424eec]
push ecx
call edi
mov edx, dword [0x424eec]
push 2
push edx
call ebx
jmp 0x402b65
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x424eec]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0x2b], 1
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x3c]
push edx
push eax
mov ebx, 0x3c
call fcn.004198e0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x403720
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x102c
call fcn.0041b840
mov eax, dword [0x424018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
cmp byte [ebx + 0x13], 0
mov cx, word [ebx + 6]
mov edx, dword [ebx + 8]
mov word [ebp - 0x1016], cx
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x1014], edx
mov dx, word [ebx + 0x10]
mov dword [ebp - 0x1010], ecx
mov cl, byte [ebx + 0x12]
mov eax, 0x14
mov byte [ebp - 0x101c], 0xc2
mov word [ebp - 0x1019], 0x518
mov dword [ebp - 0x1008], eax
mov word [ebp - 0x100c], dx
mov byte [ebp - 0x100a], cl
mov byte [ebp - 0x1009], 0
mov dword [ebp - 0x1020], 0
jbe 0x4038dc
push esi
push edi
lea edi, [ebp - 0xff0]
lea esi, [ebx + 0x18]
lea esp, [esp]
mov edx, dword [esi]
push edx
push str.SELECT_Time_FROM_CashShopPeriodicItem_WHERE_ItemSerial_d
mov ecx, 0x424ee0
call fcn.00417790
add esp, 8
test al, al
je 0x403840
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x403840
mov cl, byte [esi - 4]
mov edx, dword [esi]
push str.Time
mov byte [ebp - 0x102c], cl
mov dword [ebp - 0x1028], edx
call fcn.00417950
cmp eax, 0xffffffff
jne 0x4037ff
or eax, eax
jmp 0x403811
shl eax, 0xd
add eax, 0x425b0e
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov dword [ebp - 0x1024], eax
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x424eec]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov ecx, dword [ebp - 0x1024]
mov eax, dword [ebp - 0x1028]
jmp 0x40389a
mov edx, dword [0x424eec]
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x424eec]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov ecx, dword [esi]
push 0
push ecx
push str.INSERT_INTO_CashShopPeriodicItem__ItemSerial_Time__VALUES___d__d_
mov ecx, 0x424ee0
call fcn.00417790
mov edx, dword [0x424eec]
add esp, 0xc
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x424eec]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov cl, byte [esi - 4]
mov eax, dword [esi]
mov byte [ebp - 0x102c], cl
xor ecx, ecx
mov edx, dword [ebp - 0x102c]
add dword [ebp - 0x1008], 0xc
inc byte [ebp - 0x1009]
mov dword [edi], edx
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x1020]
mov dword [edi + 8], ecx
movzx ecx, byte [ebx + 0x13]
inc eax
add edi, 0xc
add esi, 8
mov dword [ebp - 0x1020], eax
cmp eax, ecx
jl 0x4037b0
mov eax, dword [ebp - 0x1008]
pop edi
pop esi
mov edx, eax
shr edx, 8
mov byte [ebp - 0x101b], dl
mov edx, dword [ebp - 0x1018]
mov byte [ebp - 0x101a], al
mov ecx, dword [ebp - 0x101c]
mov dword [ebp - 0x1004], ecx
mov ecx, dword [ebp - 0x1014]
mov dword [ebp - 0x1000], edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0xffc], ecx
mov ecx, dword [ebp - 0x100c]
mov dword [ebp - 0xff8], edx
lea edx, [ebp - 0x1004]
mov dword [ebp - 0xff4], ecx
mov ecx, dword [ebp + 8]
push edx
push ecx
mov ebx, eax
call fcn.004198e0
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0041ae5c
mov esp, ebp
pop ebp
ret 4
Function at 0x403950
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov ax, word [ecx + 4]
mov edx, dword [ecx + 6]
mov word [ebp - 0x28], ax
lea eax, [ecx + 6]
mov dword [ebp - 0x26], edx
mov edx, dword [eax + 4]
mov dword [ebp - 0x22], edx
mov dx, word [eax + 8]
mov word [ebp - 0x1e], dx
mov dl, byte [eax + 0xa]
mov byte [ebp - 0x1c], dl
mov edx, dword [ecx + 0x14]
push ebx
mov dword [ebp - 0x18], edx
mov edx, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x1c]
push eax
mov dword [ebp - 0x10], ecx
push str.SELECT__FROM_CashShopData_WHERE_AccountID_s
mov ecx, 0x424ee0
mov ebx, 0x2c
mov dword [ebp - 0x2c], 0x6182cc1
mov dword [ebp - 0x14], edx
call fcn.00417790
add esp, 8
test al, al
je 0x403a70
mov edx, dword [0x424eec]
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x403a70
push esi
push str.WCoinC
call fcn.00417950
mov esi, dword [sym.imp.MSVCR100.dll_atoi]
cmp eax, 0xffffffff
jne 0x4039e7
or eax, 0xffffffff
jmp 0x4039f5
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.WCoinP
mov dword [ebp - 0xc], eax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x403a0b
or eax, eax
jmp 0x403a19
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.GoblinPoint
mov dword [ebp - 8], eax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x403a2f
or eax, eax
jmp 0x403a3d
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x424eec]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov edx, dword [ebp + 8]
pop esi
lea ecx, [ebp - 0x2c]
push ecx
push edx
call fcn.004198e0
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [0x424eec]
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x424eec]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
xor eax, eax
push ecx
push edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
call fcn.004198e0
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x404050
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
cmp byte [esi + 0x13], 0
mov dword [ebp - 4], 0
jbe 0x404127
push ebx
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push edi
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
add esi, 0x14
lea ebx, [ebx]
mov eax, dword [esi]
push eax
push str.SELECT_ItemSerial_FROM_CashShopPeriodicItem_WHERE_ItemSerial_d
mov ecx, 0x424ee0
call fcn.00417790
add esp, 8
test al, al
je 0x4040cd
mov ecx, dword [0x424eec]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x4040cd
mov edx, dword [0x424eec]
push edx
call edi
mov eax, dword [0x424eec]
push 2
push eax
call ebx
mov ecx, dword [esi]
mov edx, dword [esi + 4]
push ecx
push edx
push str.UPDATE_CashShopPeriodicItem_SET_Time_d_WHERE_ItemSerial_d
jmp 0x4040ec
mov edx, dword [0x424eec]
push edx
call edi
mov eax, dword [0x424eec]
push 2
push eax
call ebx
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push ecx
push edx
push str.INSERT_INTO_CashShopPeriodicItem__ItemSerial_Time__VALUES___d__d_
mov ecx, 0x424ee0
call fcn.00417790
mov eax, dword [0x424eec]
add esp, 0xc
push eax
call edi
mov ecx, dword [0x424eec]
push 2
push ecx
call ebx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
movzx ecx, byte [edx + 0x13]
inc eax
add esi, 8
mov dword [ebp - 4], eax
cmp eax, ecx
jl 0x404080
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x4080e0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov ax, word [esi + 4]
push ebx
push edi
lea edi, [esi + 6]
push edi
push str.SELECT__FROM_Character_WHERE_Name_s
mov ecx, 0x424ee0
mov dword [ebp - 0xc], 0x60f08c1
mov word [ebp - 8], ax
mov byte [ebp - 6], 0
call fcn.00417790
add esp, 8
test al, al
je 0x408192
mov ecx, dword [0x424eec]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x408192
mov edx, dword [0x424eec]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push edx
call ebx
mov eax, dword [0x424eec]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
movzx ecx, word [esi + 0x12]
push edi
push ecx
push str.UPDATE_MEMB_INFO_SET_BLOC_CODE1_BLOC_EXPIRE_getdate___d__WHERE_MEMB___ID_SELECT_TOP_1_AccountID_FROM_Character_WHERE_Name___s_
mov ecx, 0x424ee0
call fcn.00417790
add esp, 0xc
test al, al
jne 0x408174
mov edx, dword [0x424eec]
push edx
call ebx
mov eax, dword [0x424eec]
push 2
push eax
jmp 0x4081a7
mov ecx, dword [0x424eec]
push ecx
call ebx
mov edx, dword [0x424eec]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 6], 1
jmp 0x4081ad
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x424eec]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov eax, dword [ebp + 8]
lea edx, [ebp - 0xc]
push edx
push eax
mov ebx, 8
call fcn.004198e0
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4