joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47c700
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x104
mov eax, dword [0x8307c0]
xor eax, esp
mov dword [esp + 0x100], eax
mov ecx, dword [esp + 0x10c]
push ebx
mov ebx, dword [esp + 0x10c]
push edi
mov edi, dword [esp + 0x11c]
push 0
mov eax, dword [ebx]
push dword [esp + 0x11c]
push ecx
mov eax, dword [eax + 8]
mov dword [edi], 0
push dword [eax + 0x98]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x47c79e
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x47c76a
mov dword [edi], 0x51
jmp 0x47c79a
push 0x100
lea eax, [esp + 0x10]
push eax
push esi
call fcn.0043ba00
push eax
push str.Recv_failure:__s
push dword [ebx + 4]
call fcn.00450140
mov eax, dword [ebx + 4]
add esp, 0x18
mov dword [eax + 0x930], esi
mov dword [edi], 0x38
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x108]
pop edi
pop ebx
xor ecx, esp
call fcn.004e7e02
add esp, 0x104
ret

Function at 0x47c7c0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x188
mov eax, dword [0x8307c0]
xor eax, esp
mov dword [esp + 0x184], eax
mov eax, dword [esp + 0x18c]
push ebx
mov ebx, dword [esp + 0x194]
push esi
mov esi, dword [eax + 8]
mov eax, dword [ebx + 0x18]
mov eax, dword [eax + 0x1e8]
test dword [eax + 0x44], 0x800
jne 0x47c8ed
push 0x80
lea eax, [esp + 0x10]
mov dword [esp + 0xc], 0x80
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x10]
push eax
push dword [esi + 0x98]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x47c87a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x8c]
push 0x100
push eax
push esi
call fcn.0043ba00
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.00450140
add esp, 0x1c
mov eax, 2
pop esi
pop ebx
mov ecx, dword [esp + 0x184]
xor ecx, esp
call fcn.004e7e02
add esp, 0x188
ret
lea eax, [esi + 0x120]
push eax
lea eax, [esi + 0xf0]
push eax
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
call fcn.00450d70
add esp, 0x10
test al, al
jne 0x47c8ed
push edi
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov esi, dword [eax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov edi, eax
lea eax, [esp + 0x90]
push 0x100
push eax
push esi
call fcn.0043ba00
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00450140
add esp, 0x1c
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x184]
xor ecx, esp
call fcn.004e7e02
add esp, 0x188
ret
mov ecx, dword [esp + 0x18c]
xor eax, eax
pop esi
pop ebx
xor ecx, esp
call fcn.004e7e02
add esp, 0x188
ret
Function at 0x484660
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x120
mov eax, dword [0x8307c0]
xor eax, esp
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x124]
push ebx
push ebp
mov ebp, dword [esp + 0x134]
xor ebx, ebx
push esi
push edi
mov edi, dword [esp + 0x138]
xor esi, esi
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edi
call fcn.00461be0
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jne 0x4846df
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0043baf0
push eax
push edi
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push ebp
call fcn.00450140
push esi
call dword [0x7d0004]
add esp, 0x20
lea eax, [ebx + 0x4d]
jmp 0x48483f
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x484739
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0043baf0
push eax
push edi
push str.schannel:_failed_to_open_CA_file__s:__s
push ebp
call fcn.00450140
push 0
mov esi, 0x4d
call dword [0x7d0004]
add esp, 0x20
jmp 0x484831
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x484779
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0043baf0
push eax
push edi
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push ebp
call fcn.00450140
add esp, 0x1c
mov esi, 0x4d
jmp 0x48481d
mov edi, dword [esp + 0x24]
cmp dword [esp + 0x28], ebx
jl 0x4847a7
jg 0x48478d
cmp edi, 0x100000
jbe 0x4847a7
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push ebp
call fcn.00450140
add esp, 0xc
mov esi, 0x4d
jmp 0x48481d
lea eax, [edi + 1]
push eax
call dword [section..data]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4847bf
lea esi, [eax + 0x1b]
jmp 0x48481d
test edi, edi
je 0x484804
nop dword [eax]
nop word [eax + eax]
push 0
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x48485c
mov eax, dword [esp + 0x10]
test eax, eax
je 0x484858
add esi, eax
cmp esi, edi
jb 0x4847d0
push ebp
push dword [esp + 0x18]
mov byte [edi + ebx], 0
push edi
push ebx
push dword [esp + 0x2c]
call fcn.00484460
add esp, 0x14
mov esi, eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [0x7d0004]
add esp, 4
push dword [esp + 0x20]
call fcn.004e94a6
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004e7e02
add esp, 0x120
ret
mov edi, esi
jmp 0x484804
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0043baf0
push eax
push dword [esp + 0x24]
push str.schannel:_failed_to_read_from_CA_file__s:__s
push ebp
call fcn.00450140
add esp, 0x1c
mov esi, 0x4d
jmp 0x48481d
Function at 0x48ab20
Capabilities:
Check http status code

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1c]
push edi
mov edi, dword [esp + 0x18]
push 0x11
push str.WWW_Authenticate:
push esi
call fcn.004552c0
add esp, 0xc
test eax, eax
je 0x48ab4e
mov ebp, dword [edi + 0xe8]
cmp ebp, 0x191
je 0x48ab70
push 0x13
push str.Proxy_authenticate:
push esi
call fcn.004552c0
add esp, 0xc
test eax, eax
je 0x48abb6
mov ebp, dword [edi + 0xe8]
cmp ebp, 0x197
jne 0x48abb6
push esi
call fcn.0045b5c0
mov esi, eax
add esp, 4
test esi, esi
jne 0x48ab87
pop edi
lea eax, [esi + 0x1b]
pop esi
pop ebp
pop ebx
ret
cmp ebp, 0x197
push esi
sete al
movzx eax, al
push eax
push edi
call fcn.0045d120
push esi
mov edi, eax
call dword [0x7d0004]
add esp, 0x10
test edi, edi
je 0x48ad55
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push 0xf
push str.Content_Length:
push esi
call fcn.004552c0
add esp, 0xc
test eax, eax
je 0x48ac12
mov ecx, dword [edi + 0xe8]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x48abf1
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response
push edi
call fcn.00450210
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x1c]
add eax, 0x208
push eax
push 0xa
lea eax, [esi + 0xf]
push 0
push eax
call fcn.00462000
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push 5
push str.close
push 0xb
push str.Connection:
push esi
call fcn.0045b510
add esp, 0x14
test al, al
jne 0x48ad4a
push 0x12
push str.Transfer_Encoding:
push esi
call fcn.004552c0
add esp, 0xc
test eax, eax
je 0x48acb1
mov ecx, dword [edi + 0xe8]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x48ac6c
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response
push edi
call fcn.00450210
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push 7
push str.chunked
push 0x12
push str.Transfer_Encoding:
push esi
call fcn.0045b510
add esp, 0x14
test al, al
je 0x48ad55
push str.CONNECT_responded_chunked
push edi
call fcn.00450210
mov eax, dword [esp + 0x24]
push edi
mov byte [eax + 0x214], 1
call fcn.0047ff90
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push 5
push str.close
push 0x11
push str.Proxy_Connection:
push esi
call fcn.0045b510
add esp, 0x14
test al, al
jne 0x48ad4a
push 7
push str.HTTP_1.
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x48ad55
mov al, byte [esi + 7]
cmp al, 0x30
je 0x48aceb
cmp al, 0x31
jne 0x48ad55
cmp byte [esi + 8], 0x20
jne 0x48ad55
mov cl, byte [esi + 9]
mov al, cl
sub al, 0x30
cmp al, 9
ja 0x48ad55
mov dl, byte [esi + 0xa]
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x48ad55
mov dh, byte [esi + 0xb]
mov al, dh
sub al, 0x30
cmp al, 9
ja 0x48ad55
mov al, byte [esi + 0xc]
cmp al, 0x30
jl 0x48ad1d
cmp al, 0x39
jle 0x48ad55
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, dl
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, dh
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [edi + 0xe8], eax
mov dword [edi + 0xd84], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x1c]
mov byte [eax + 0x215], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x48c450
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [section..data]
mov esi, eax
add esp, 4
test esi, esi
jne 0x48c47b
pop esi
pop ebp
add esp, 0xc
ret
lea ecx, [esi + 0xc]
mov dword [esi], ebp
mov dword [esi + 4], ecx
mov eax, dword [ebp + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x24]
mov dword [esi + 8], eax
push edi
lea edi, [ebp + 4]
cmp ebx, dword [ebp + 0x10]
jbe 0x48c4ca
mov eax, dword [ebp]
push ecx
call eax
mov eax, dword [edi]
push ebx
push dword [esp + 0x2c]
push dword [esi + 4]
call eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 0xc]
push dword [esi + 4]
mov dword [esp + 0x28], eax
push eax
mov eax, dword [ebp + 8]
call eax
mov ebx, dword [ebp + 0x14]
add esp, 0x18
mov dword [esp + 0x28], ebx
jmp 0x48c4d2
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
push dword [esi + 4]
mov eax, dword [ebp]
call eax
push dword [esi + 8]
mov eax, dword [ebp]
call eax
mov eax, dword [esp + 0x30]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x48c543
mov ebp, dword [esp + 0x14]
mov ebx, eax
mov dword [esp + 0x18], eax
nop dword [eax]
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x13], al
lea eax, [esp + 0x13]
push 1
push eax
push dword [esi + 4]
mov eax, dword [edi]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x1f], al
lea eax, [esp + 0x1f]
push 1
push eax
push dword [esi + 8]
mov eax, dword [edi]
call eax
add esp, 0x18
sub ebx, 1
jne 0x48c500
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x20]
cmp ebx, dword [ebp + 0x10]
jae 0x48c575
nop dword [eax + eax]
mov eax, dword [edi]
push 1
push 0x4fb3a9
push dword [esi + 4]
call eax
mov eax, dword [edi]
push 1
push 0x4fb3aa
push dword [esi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [ebp + 0x10]
jb 0x48c550
pop edi
pop ebx
mov eax, esi
pop esi
pop ebp
add esp, 0xc
ret
Function at 0x48c580
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
push dword [esp + 0x24]
call fcn.00451cd0
mov edx, dword [ebp + 0xc]
mov ebx, eax
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x14], ebx
lea ecx, [ecx + edx*2]
add ecx, 0xc
push ecx
call dword [section..data]
mov esi, eax
add esp, 8
test esi, esi
je 0x48c702
lea ecx, [esi + 0xc]
mov dword [esi], ebp
mov dword [esi + 4], ecx
mov eax, dword [ebp + 0xc]
add eax, ecx
mov dword [esi + 8], eax
push edi
lea edi, [ebp + 4]
cmp ebx, dword [ebp + 0x10]
jbe 0x48c602
mov eax, dword [ebp]
push ecx
call eax
mov eax, dword [esp + 0x28]
push ebx
push eax
push dword [esi + 4]
mov eax, dword [edi]
call eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 0xc]
push dword [esi + 4]
mov dword [esp + 0x38], eax
push eax
mov eax, dword [ebp + 8]
call eax
mov eax, dword [ebp + 0x14]
add esp, 0x18
mov dword [esp + 0x14], eax
push dword [esi + 4]
mov eax, dword [ebp]
call eax
push dword [esi + 8]
mov eax, dword [ebp]
call eax
mov eax, dword [esp + 0x1c]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x48c673
mov ebp, dword [esp + 0x24]
mov ebx, eax
mov dword [esp + 0x18], eax
nop dword [eax]
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x13], al
lea eax, [esp + 0x13]
push 1
push eax
push dword [esi + 4]
mov eax, dword [edi]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x1f], al
lea eax, [esp + 0x1f]
push 1
push eax
push dword [esi + 8]
mov eax, dword [edi]
call eax
add esp, 0x18
sub ebx, 1
jne 0x48c630
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x20]
cmp ebx, dword [ebp + 0x10]
jae 0x48c6a5
nop dword [eax + eax]
mov eax, dword [edi]
push 1
push 0x4fb3a9
push dword [esi + 4]
call eax
mov eax, dword [edi]
push 1
push 0x4fb3aa
push dword [esi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [ebp + 0x10]
jb 0x48c680
push dword [esp + 0x30]
call fcn.00451cd0
mov ecx, dword [esi]
push eax
push dword [esp + 0x34]
push dword [esi + 4]
mov eax, dword [ecx + 4]
call eax
mov edi, dword [esp + 0x44]
add esp, 0x10
mov ebx, dword [esi]
test edi, edi
jne 0x48c6d0
mov edi, dword [ebx + 0xc]
add edi, dword [esi + 8]
push dword [esi + 4]
mov eax, dword [ebx + 8]
push edi
call eax
push dword [ebx + 0x14]
mov eax, dword [ebx + 4]
push edi
push dword [esi + 8]
call eax
push dword [esi + 8]
mov eax, dword [ebx + 8]
push edi
call eax
push esi
call dword [0x7d0004]
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0xc
ret
Function at 0x48d4a0
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
xor esi, esi
test edi, edi
je 0x48d4ec
push ebx
mov ebx, dword [esp + 0x10]
mov cl, byte [esi + ebx]
mov dl, cl
mov al, cl
shr dl, 1
and al, 0xfe
not dl
movzx eax, al
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
shr dl, 1
xor dl, cl
or cl, 1
test dl, 2
movzx ecx, cl
cmove ecx, eax
mov byte [esi + ebx], cl
inc esi
cmp esi, edi
jb 0x48d4b1
pop ebx
pop edi
pop esi
ret
Function at 0x48fd10
Capabilities:
Query environment variable

Disassembly:
push 0x4fbde8
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x48fd53
mov ecx, str.Windows_NT
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x48fd47
test dl, dl
je 0x48fd43
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x48fd47
add eax, 2
add ecx, 2
test dl, dl
jne 0x48fd27
xor eax, eax
jmp 0x48fd4c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x48fd53
mov al, 1
ret
xor al, al
ret

Function at 0x48fd60
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x8307c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
xorps xmm0, xmm0
push edi
mov edi, dword [ebp + 8]
movq qword [esi], xmm0
mov dword [esi + 8], 0
mov eax, dword [edi + 0x114]
dec eax
cmp eax, 4
ja case.default.0x48fd96
jmp dword [eax*4 + 0x48fe6c]
push edi
mov dword [esi], 1
call fcn.0049fbd0
add esp, 4
mov dword [esi + 4], eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
push edi
mov dword [esi], 2
call fcn.0049fbd0
add esp, 4
mov dword [esi + 4], eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.0049fbd0
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne case.default.0x48fd96
cmp word [ebp - 0x14], 1
push edi
sete al
inc eax
mov dword [esi], eax
call fcn.0049fbd0
add esp, 4
mov dword [esi + 4], eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
mov dword [esi], 3
mov eax, dword [edi + 0x1a0]
pop edi
mov dword [esi + 8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
mov dword [esi], 4
mov eax, dword [edi + 0x1a8]
mov dword [esi + 8], eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
Function at 0x48fde1
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x8307c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
xorps xmm0, xmm0
push edi
mov edi, dword [ebp + 8]
movq qword [esi], xmm0
mov dword [esi + 8], 0
mov eax, dword [edi + 0x114]
dec eax
cmp eax, 4
ja case.default.0x48fd96
jmp dword [eax*4 + 0x48fe6c]
push edi
mov dword [esi], 1
call fcn.0049fbd0
add esp, 4
mov dword [esi + 4], eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
push edi
mov dword [esi], 2
call fcn.0049fbd0
add esp, 4
mov dword [esi + 4], eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.0049fbd0
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne case.default.0x48fd96
cmp word [ebp - 0x14], 1
push edi
sete al
inc eax
mov dword [esi], eax
call fcn.0049fbd0
add esp, 4
mov dword [esi + 4], eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
mov dword [esi], 3
mov eax, dword [edi + 0x1a0]
pop edi
mov dword [esi + 8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
mov dword [esi], 4
mov eax, dword [edi + 0x1a8]
mov dword [esi + 8], eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004e7e02
mov esp, ebp
pop ebp
ret
Function at 0x496620
Capabilities:
Query environment variable

Disassembly:
push esi
xor esi, esi
cmp byte [0x834325], 0
jne 0x4966ea
mov al, byte [0x8367d1]
mov byte [0x834325], 1
mov byte [0x834326], al
call fcn.004a3050
test al, al
je 0x496653
mov eax, 1
pop esi
ret 0xc
call fcn.004a34a0
call fcn.00499890
test eax, eax
jne 0x49664a
cmp dword [0x834310], esi
jne 0x4966bb
push 0x4fc26c
push str.mysql
mov dword [0x834310], 0xcea
call dword [sym.imp.WS2_32.dll_getservbyname]
test eax, eax
je 0x49669a
movzx eax, word [eax + 8]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [0x834310], eax
push str.MYSQL_TCP_PORT
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x4966bb
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [0x834310], eax
cmp dword [0x834314], esi
jne 0x4966f2
push str.MYSQL_UNIX_PORT
mov dword [0x834314], 0x4fc184
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x4966f2
mov dword [0x834314], eax
mov eax, esi
pop esi
ret 0xc
call fcn.004a35e0
movsx esi, al
mov eax, esi
pop esi
ret 0xc

Function at 0x496700
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push str.USER
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test eax, eax
mov ecx, str.ODBC
push 0x60
cmovne ecx, eax
push ecx
push dword [ebp + 8]
call fcn.0049f310
add esp, 0x10
pop ebp
ret
Function at 0x4991c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov eax, dword [ebp + 0x14]
push ebx
add eax, edx
mov ebx, eax
sub ebx, edx
push edi
xor edi, edi
cmp edx, eax
cmova ebx, ecx
test ebx, ebx
je 0x499263
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
cmp ebx, 0x20
jb 0x499244
lea ecx, [esi - 1]
add ecx, ebx
cmp eax, ecx
ja 0x499200
lea ecx, [eax - 1]
add ecx, ebx
cmp ecx, esi
jae 0x499244
lea ecx, [edx - 1]
add ecx, ebx
cmp eax, ecx
ja 0x499212
lea ecx, [eax - 1]
add ecx, ebx
cmp ecx, edx
jae 0x499244
mov ecx, ebx
and ecx, 0xffffffe0
movups xmm0, xmmword [esi]
add edi, 0x20
movups xmm1, xmmword [edx]
pxor xmm1, xmm0
movups xmmword [eax], xmm1
movups xmm1, xmmword [edx + 0x10]
add edx, 0x20
movups xmm0, xmmword [esi + 0x10]
add esi, 0x20
pxor xmm1, xmm0
movups xmmword [eax + 0x10], xmm1
add eax, 0x20
cmp edi, ecx
jb 0x499217
cmp edi, ebx
jae 0x499262
sub edx, eax
sub esi, eax
nop dword [eax]
mov cl, byte [esi + eax]
lea eax, [eax + 1]
xor cl, byte [edx + eax - 1]
inc edi
mov byte [eax - 1], cl
cmp edi, ebx
jb 0x499250
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x499750
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
push edi
push str.LIBMYSQL_PLUGINS
call esi
push str.LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN
mov edi, eax
call esi
mov ebx, dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
test eax, eax
je 0x49979f
movsx ecx, byte [eax]
push ecx
push 0x4fdd84
call ebx
movzx ecx, byte [0x83430c]
add esp, 8
test eax, eax
mov edx, 1
cmovne ecx, edx
mov byte [0x83430c], cl
test edi, edi
je 0x4997f3
push 0x10
push edi
push dword [0x87f540]
call fcn.00499ef0
mov edi, eax
add esp, 0xc
mov dword [ebp - 4], edi
nop dword [eax]
push 0x3b
push edi
call ebx
mov esi, eax
add esp, 8
test esi, esi
je 0x4997d1
mov byte [esi], 0
push 0
push 0xffffffffffffffff
push edi
push dword [ebp + 8]
call fcn.00499980
add esp, 0x10
lea edi, [esi + 1]
test esi, esi
jne 0x4997c0
push dword [ebp - 4]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret