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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x124
mov esi, eax
test byte [esi + 0x18], 2
je 0x48bdf7
cmp dword [esi + 0x24], 0
jne 0x48bc84
push 0xfde8
call dword [0x58b638]
pop ebx
test eax, eax
mov dword [esi + 0x24], eax
jne 0x48bc74
mov eax, str.allocating_input
call fcn.0048b7d0
jmp 0x48bd14
mov dword [esi + 0x34], 0xfde8
mov dword [esi + 0x30], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov ecx, dword [esi + 0x24]
mov edx, dword [esi + 0x30]
lea eax, [ecx + 0x1000]
cmp edx, eax
jbe 0x48bcb1
mov ebx, edx
mov eax, dword [esi + 0x2c]
sub ebx, ecx
sub eax, edx
push eax
push edx
push ecx
call sub.msvcrt.dll_memmove
sub dword [esi + 0x30], ebx
add esp, 0xc
sub dword [esi + 0x28], ebx
sub dword [esi + 0x2c], ebx
mov eax, dword [esi + 0x34]
mov ebx, dword [esi + 0x24]
mov ecx, dword [esi + 0x2c]
mov dword [ebp - 0x128], eax
lea edx, [ebx + eax]
lea eax, [ecx + 0x1000]
cmp edx, eax
jae 0x48bd3b
sub ecx, ebx
mov eax, dword [ebp - 0x128]
mov dword [ebp - 0x12c], ecx
mov ecx, dword [esi + 0x30]
sub ecx, ebx
add eax, eax
mov dword [ebp - 0x130], ecx
mov dword [esi + 0x34], eax
push eax
mov edi, dword [esi + 0x28]
push ebx
call dword [0x58b634]
mov edx, eax
sub edi, ebx
mov dword [esi + 0x24], eax
test edx, edx
pop eax
pop ecx
jne 0x48bd1d
mov eax, str.allocating_input_buffer
call fcn.0048b7d0
push ebx
call dword [0x58b640]
mov dword [esi + 0x38], 0xffffffff
jmp 0x48bd9b
mov ecx, dword [ebp - 0x12c]
lea eax, [edx + ecx]
mov ecx, dword [ebp - 0x130]
mov dword [esi + 0x2c], eax
lea eax, [edx + edi]
mov dword [esi + 0x28], eax
lea eax, [edx + ecx]
mov dword [esi + 0x30], eax
push 0
push 0x1000
push dword [esi + 0x2c]
push dword [esi + 0x14]
call sub.WS2_32.DLL_recv
test eax, eax
mov dword [esi + 0x38], eax
jle 0x48bd5c
add dword [esi + 0x2c], eax
jmp 0x48bdf9
je 0x48bdf7
inc eax
jne 0x48bda0
call fcn.0048b7e3
cmp eax, 0x2734
jg 0x48bd7f
cmp eax, 0x2733
jge 0x48bda0
cmp eax, 0xb
je 0x48bda0
jmp 0x48bd8d
cmp eax, 0x2746
je 0x48bdf7
cmp eax, 0x274a
je 0x48bdf7
push str.recv_failed_n
push 0
push 0xa
call fcn.0043155c
or eax, 0xffffffff
jmp 0x48bdf9
mov eax, dword [0x58b860]
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x124], eax
mov edx, dword [esi + 0x14]
lea eax, [ebp - 0x124]
mov dword [ebp - 0x118], edx
push eax
inc edx
lea eax, [ebp - 0x11c]
push 0
mov dword [ebp - 0x11c], 1
push 0
push eax
push edx
call sub.WS2_32.DLL_select
test eax, eax
jg 0x48bc42
call sub.msvcrt.dll__errno
cmp dword [eax], 4
je 0x48bc42
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x48d313
Capabilities:
Initialize winsock library
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
cmp dword [0x6222e8], 0
jne 0x48d3cd
lea eax, [ebp - 0x190]
push eax
push 0x101
call sub.WS2_32.DLL_WSAStartup
test eax, eax
jne 0x48d3cd
push str.no_proxy
mov dword [0x6222c8], 0x15
call sub.msvcrt.dll_getenv
pop edx
test eax, eax
je 0x48d366
cmp byte [eax], 0x2a
jne 0x48d366
cmp byte [eax + 1], 0
je 0x48d3cd
push str.ftp_proxy
call sub.msvcrt.dll_getenv
pop ecx
test eax, eax
jne 0x48d384
push str.FTP_PROXY
call sub.msvcrt.dll_getenv
pop edx
test eax, eax
je 0x48d38b
push eax
call fcn.0048d271
pop ecx
push str.ftp_proxy_user
call sub.msvcrt.dll_getenv
pop edx
test eax, eax
je 0x48d3a7
push eax
call dword [0x58b630]
pop ecx
mov dword [0x6222b8], eax
push str.ftp_proxy_password
call sub.msvcrt.dll_getenv
pop edx
test eax, eax
je 0x48d3c3
push eax
call dword [0x58b630]
mov dword [0x6222a8], eax
pop eax
mov dword [0x6222e8], 1
leave
ret
Function at 0x48d4f2
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
or ecx, 0xffffffff
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov ebx, eax
mov dword [ebp - 0x10], 0xffffffff
test eax, eax
je 0x48d6eb
jmp 0x48d522
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x440], eax
test ebx, ebx
je 0x48d5ef
mov edx, dword [ebx + 0x440]
cmp edx, 0x400
ja 0x48d5ef
mov eax, dword [ebx + 0x444]
cmp eax, 0x400
ja 0x48d5ef
cmp edx, eax
jg 0x48d5ef
test edx, edx
jle 0x48d581
sub eax, edx
push eax
lea eax, [ebx + edx + 0x3c]
push eax
lea eax, [ebx + 0x3c]
push eax
call sub.msvcrt.dll_memmove
mov eax, dword [ebx + 0x444]
add esp, 0xc
sub eax, dword [ebx + 0x440]
mov dword [ebx + 0x440], 0
mov dword [ebx + 0x444], eax
mov eax, 0x400
xor edx, edx
sub eax, dword [ebx + 0x444]
je 0x48d5e2
push 0
push eax
mov eax, ebx
add eax, dword [ebx + 0x440]
add eax, 0x3c
push eax
push dword [ebx + 0x2c]
call sub.WS2_32.DLL_recv
mov edx, eax
test eax, eax
jns 0x48d5cf
push str.recv_failed
push 0
push 9
call fcn.0043155c
add esp, 0xc
push dword [ebx + 0x2c]
call sub.WS2_32.DLL_closesocket
mov dword [ebx + 0x2c], 0xffffffff
jmp 0x48d5ef
mov eax, dword [ebx + 0x444]
add eax, edx
mov dword [ebx + 0x444], eax
mov byte [ebx + eax + 0x3c], 0
mov eax, dword [ebx + 0x444]
mov dword [ebp - 0x14], eax
or edx, eax
jne 0x48d5f7
or ecx, 0xffffffff
jmp 0x48d6eb
mov eax, ebx
add eax, dword [ebx + 0x440]
lea ecx, [eax + 0x3c]
mov eax, dword [ebp - 0x14]
lea edi, [ebx + eax + 0x3c]
cmp ecx, edi
jae 0x48d6c7
mov eax, edi
sub eax, ecx
cmp eax, 2
jle 0x48d6a0
mov dl, byte [ecx]
lea eax, [edx - 0x30]
cmp al, 9
ja 0x48d6a0
movzx esi, byte [ecx + 1]
movsx eax, dl
lea edx, [eax - 0x30]
lea eax, [esi - 0x30]
cmp al, 9
ja 0x48d6a0
imul edx, edx, 0xa
mov dword [ebp - 0x18], edx
mov eax, esi
movzx esi, byte [ecx + 2]
movsx edx, al
mov eax, dword [ebp - 0x18]
lea edx, [eax + edx - 0x30]
lea eax, [esi - 0x30]
cmp al, 9
ja 0x48d6a0
imul edx, edx, 0xa
mov eax, esi
movsx esi, al
cmp byte [ecx + 3], 0x2d
lea edx, [edx + esi - 0x30]
mov eax, edx
jne 0x48d66b
neg eax
test eax, eax
jle 0x48d6a0
add ecx, 3
mov dword [ebp - 0x10], eax
mov eax, ecx
sub eax, ebx
sub eax, 0x3c
mov dword [ebx + 0x448], eax
jmp 0x48d68a
cmp byte [ecx], 0xa
je 0x48d68e
inc ecx
cmp ecx, edi
jb 0x48d684
xor eax, eax
cmp byte [ecx], 0xa
sete al
add ecx, eax
cmp byte [ecx], 0xd
jne 0x48d6c7
inc ecx
jmp 0x48d6c7
cmp ecx, edi
jae 0x48d511
cmp byte [ecx], 0xa
je 0x48d6b0
inc ecx
jmp 0x48d6a0
cmp ecx, edi
jae 0x48d511
xor eax, eax
cmp byte [ecx], 0xd
setne al
add ecx, eax
jmp 0x48d609
cmp dword [ebp - 0x10], 0
js 0x48d51a
sub ecx, ebx
mov edx, 0x64
lea eax, [ecx - 0x3c]
mov dword [ebx + 0x440], eax
mov eax, dword [ebp - 0x10]
mov ebx, edx
cdq
idiv ebx
mov ecx, eax
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x48d6f5
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
pop ebp
jmp fcn.0048d4f2
Function at 0x48d785
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
or eax, 0xffffffff
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xd4
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x48d7e5
lea esi, [ebp - 0xdc]
push str.QUIT_r_n
push 0xc8
push esi
call sub.msvcrt.dll__snprintf
mov edi, esi
cld
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0
push ecx
push esi
push dword [ebx + 0x2c]
call sub.WS2_32.DLL_send
mov edi, eax
add esp, 0xc
xor eax, eax
test edi, edi
jns 0x48d7e5
push str.send_failed
push 0
push 9
call fcn.0043155c
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x48e84d
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
or edx, 0xffffffff
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x130
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x48e960
cmp dword [ebp + 0xc], 0
jne 0x48e877
cmp dword [ebx + 0xc], 0
je 0x48e960
push ebx
call fcn.0048de5e
or edx, 0xffffffff
mov dword [ebx + 0x30], eax
inc eax
pop ecx
je 0x48e960
lea esi, [ebp - 0x13c]
push str.TYPE_I_r_n
push 0x12c
push esi
call sub.msvcrt.dll__snprintf
mov edi, esi
cld
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0
lea eax, [ecx - 1]
push eax
push esi
push dword [ebx + 0x2c]
call sub.WS2_32.DLL_send
add esp, 0xc
mov edi, eax
test eax, eax
js 0x48e919
mov eax, ebx
call fcn.0048d4f2
mov edi, eax
cmp eax, 2
jne 0x48e948
cmp dword [ebp + 0xc], 0
jne 0x48e8de
push dword [ebx + 0xc]
jmp 0x48e8e1
push dword [ebp + 0xc]
push str.RETR__s_r_n
push 0x12c
push esi
call sub.msvcrt.dll__snprintf
cld
mov byte [ebp - 0x11], 0
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
add esp, 0x10
lea eax, [ecx - 1]
push 0
push eax
push esi
push dword [ebx + 0x2c]
call sub.WS2_32.DLL_send
mov edi, eax
test eax, eax
jns 0x48e93a
push str.send_failed
push 0
push 9
call fcn.0043155c
push dword [ebx + 0x30]
call sub.WS2_32.DLL_closesocket
mov edx, edi
mov dword [ebx + 0x30], 0xffffffff
jmp 0x48e960
mov eax, ebx
call fcn.0048d4f2
mov edi, eax
cmp eax, 1
je 0x48e95d
push dword [ebx + 0x30]
call sub.WS2_32.DLL_closesocket
mov edx, edi
neg edx
mov dword [ebx + 0x30], 0xffffffff
jmp 0x48e960
mov edx, dword [ebx + 0x30]
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x492d37
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ecx, dword [eax]
mov ebx, dword [ebp + 8]
xor ebx, ecx
shr ecx, 8
and ebx, 0xff
xor ecx, dword [edx + ebx*4]
mov ebx, dword [eax + 8]
mov dword [eax], ecx
and ecx, 0xff
add ecx, dword [eax + 4]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [eax + 4], ecx
shr ecx, 0x18
xor ecx, ebx
shr ebx, 8
and ecx, 0xff
xor ebx, dword [edx + ecx*4]
mov dword [eax + 8], ebx
mov eax, dword [ebp + 8]
pop ebx
pop ebp
ret
Function at 0x494357
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ecx, dword [eax]
mov ebx, dword [ebp + 8]
xor ebx, ecx
shr ecx, 8
and ebx, 0xff
xor ecx, dword [edx + ebx*4]
mov ebx, dword [eax + 8]
mov dword [eax], ecx
and ecx, 0xff
add ecx, dword [eax + 4]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [eax + 4], ecx
shr ecx, 0x18
xor ecx, ebx
shr ebx, 8
and ecx, 0xff
xor ebx, dword [edx + ecx*4]
mov dword [eax + 8], ebx
mov eax, dword [ebp + 8]
pop ebx
pop ebp
ret
Function at 0x494dc5
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
xor edi, edi
mov esi, dword [ebp + 8]
mov eax, 0xffffff9a
test esi, esi
je 0x494fa8
cmp dword [esi + 0x2c], 0
je 0x494fa8
mov dword [esi + 0x34], 0
cmp dword [esi + 0x80], 8
jne 0x494e48
cmp dword [esi + 0x84], 0
jne 0x494e48
cmp dword [esi + 0x40], 0
jne 0x494e1e
mov eax, esi
call fcn.00494c37
lea eax, [esi + 0x88]
mov dword [esi + 0x40], 0x4000
mov dword [esi + 0x3c], eax
lea eax, [esi + 0x30]
mov ebx, dword [esi + 0x44]
push 4
push eax
call fcn.00516920
mov edi, eax
mov eax, dword [esi + 0x44]
sub eax, ebx
add dword [esi + 0x6c], eax
test edi, edi
pop ebx
pop eax
je 0x494e01
xor eax, eax
cmp edi, 1
setne al
neg eax
and edi, eax
cmp dword [esi + 0x6c], 0
setne dl
xor eax, eax
test edi, edi
sete al
test edx, eax
je 0x494e67
mov eax, esi
call fcn.00494c37
inc eax
jne 0x494e67
or edi, 0xffffffff
cmp dword [esi + 0x80], 8
jne 0x494e8c
cmp dword [esi + 0x84], 0
jne 0x494ea4
lea eax, [esi + 0x30]
push eax
call fcn.005165d0
mov dword [esi + 0x68], 0
mov edi, eax
pop ecx
cmp dword [esi + 0x84], 0
jne 0x494ea4
mov eax, dword [esi + 0x408c]
mov dword [ebp + 0x10], eax
mov eax, dword [esi + 0x38]
mov dword [ebp + 0xc], eax
mov ebx, dword [esi + 0x40a4]
mov eax, dword [esi + 0x74]
add ebx, dword [esi + 0x44]
add eax, 0x10
mov edx, dword [ebp + 0x10]
push 4
call fcn.00494510
mov eax, dword [esi + 0x74]
add eax, 0x14
mov edx, ebx
push 4
call fcn.00494510
pop eax
pop edx
cmp dword [esi + 0x5c], 1
jne 0x494ee7
mov eax, dword [esi + 0x74]
mov edx, 1
add eax, 0x24
push 2
call fcn.00494510
pop eax
mov eax, dword [esi + 0x74]
mov edx, dword [ebp + 0xc]
add eax, 0x18
push 4
call fcn.00494510
pop eax
test edi, edi
jne 0x494f0d
mov edx, dword [esi + 0x74]
lea eax, [esi + 0x24]
push dword [esi + 0x78]
call fcn.00494407
mov edi, eax
pop eax
push dword [esi + 0x74]
call fcn.0052eef0
pop eax
test edi, edi
jne 0x494f99
push dword [esi + 0x20]
push dword [esi + 0x1c]
call dword [esi + 0xc]
push 0
or edi, 0xffffffff
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x70]
add eax, 0xe
push eax
push dword [esi + 0x20]
push dword [esi + 0x1c]
call dword [esi + 0x10]
add esp, 0x18
test eax, eax
jne 0x494f81
mov edx, dword [esi + 0x20]
push 4
push dword [ebp + 0x10]
mov eax, esi
call fcn.004944c1
pop ecx
mov edi, eax
pop eax
test edi, edi
jne 0x494f81
mov edx, dword [esi + 0x20]
mov eax, esi
push 4
push ebx
call fcn.004944c1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x494f81
mov edx, dword [esi + 0x20]
push 4
push dword [ebp + 0xc]
mov eax, esi
call fcn.004944c1
pop ecx
mov edi, eax
pop ebx
push 0
push dword [ebp - 0x10]
push dword [esi + 0x20]
push dword [esi + 0x1c]
call dword [esi + 0x10]
add esp, 0x10
test eax, eax
je 0x494f99
or edi, 0xffffffff
inc dword [esi + 0x40b0]
mov dword [esi + 0x2c], 0
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x495a75
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x130
mov edi, dword [ebp + 0xc]
push 0
push 2
call sub.KERNEL32.DLL_CreateToolhelp32Snapshot
mov esi, eax
cmp eax, 0xffffffff
je 0x495af2
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x13c], 0x128
push eax
push esi
call sub.KERNEL32.DLL_Process32First
test eax, eax
je 0x495aec
cmp dword [ebp - 0x124], edi
jne 0x495add
push dword [ebp - 0x134]
push 0
push 0x1f0fff
call sub.KERNEL32.DLL_OpenProcess
mov ebx, eax
test eax, eax
je 0x495add
push 0xffffffffffffffff
push eax
call sub.KERNEL32.DLL_TerminateProcess
push ebx
call sub.KERNEL32.DLL_CloseHandle
lea eax, [ebp - 0x13c]
push eax
push esi
call sub.KERNEL32.DLL_Process32Next
jmp 0x495aab
push esi
call sub.KERNEL32.DLL_CloseHandle
push 0xffffffffffffffff
push dword [ebp + 8]
call sub.KERNEL32.DLL_TerminateProcess
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4ad3a6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov esi, dword [ebp + 8]
test esi, esi
je 0x4ad454
mov eax, dword [esi]
xor ecx, ecx
xor ebx, ebx
mov byte [eax + 0x16], 0
mov eax, dword [esi]
mov byte [eax + 0x17], 0
mov eax, dword [esi]
mov byte [eax + 0x18], 0
mov eax, dword [esi]
mov byte [eax + 0x19], 0
mov edi, dword [esi + 4]
cmp ecx, edi
jge 0x4ad405
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
mov edx, ecx
shl edx, 8
shr ecx, 0x18
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x14]
movzx eax, byte [ebx + edx]
xor eax, ecx
inc ebx
mov ecx, dword [ebp - 0x18]
xor ecx, dword [eax*4 + 0x602f20]
cmp ebx, edi
jl 0x4ad3e2
xor ebx, ebx
mov edi, dword [esi + 0xc]
cmp ebx, edi
jge 0x4ad437
mov eax, dword [esi + 8]
mov dword [ebp - 0x10], eax
mov edx, ecx
shl edx, 8
shr ecx, 0x18
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x10]
movzx eax, byte [ebx + edx]
xor eax, ecx
inc ebx
mov ecx, dword [ebp - 0x18]
xor ecx, dword [eax*4 + 0x602f20]
cmp ebx, edi
jl 0x4ad414
mov eax, dword [esi]
mov byte [eax + 0x16], cl
shr ecx, 8
mov eax, dword [esi]
mov byte [eax + 0x17], cl
shr ecx, 8
mov eax, dword [esi]
mov byte [eax + 0x18], cl
shr ecx, 8
mov eax, dword [esi]
mov byte [eax + 0x19], cl
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4c2ab6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x214
mov edi, eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x220], edx
push eax
mov ebx, dword [ebp + 8]
push edi
mov esi, 0x200
call fcn.004bc2fe
pop ecx
pop eax
lea eax, [ebp - 0x21c]
push eax
call fcn.004bc5f2
pop edx
cmp esi, ebx
jbe 0x4c2af4
mov esi, ebx
push dword [ebp - 0x220]
push esi
push 1
push eax
call sub.msvcrt.dll_fread
add esp, 0x10
add dword [ebp - 0x21c], eax
sub ebx, eax
setne dl
cmp eax, esi
sete al
movzx eax, al
test edx, eax
jne 0x4c2ae1
lea eax, [ebp - 0x21c]
xor esi, esi
push eax
call fcn.004bc54a
pop ecx
test ebx, ebx
je 0x4c2b3e
push 0xffffffffffffffff
push edi
call fcn.004bd2e4
pop edi
test eax, eax
pop edx
je 0x4c2b43
mov esi, 1
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4c4238
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x110
mov edi, edx
push dword [ebp + 8]
mov ebx, eax
mov esi, dword [ebp + 0xc]
call sub.msvcrt.dll_getenv
pop edx
test eax, eax
jne 0x4c4261
push esi
push ebx
call fcn.004bd485
jmp 0x4c428a
push 0x604cb8
push 0x604cbc
push eax
push ebx
call fcn.004bc66d
push esi
push 0x604cbf
push eax
push ebx
call fcn.004bc66d
add esp, 0x20
push 0xfffffffffffffffe
push ebx
call fcn.004bceb3
pop esi
lea esi, [ebp - 0x11c]
pop eax
push 0x105
push esi
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
test eax, eax
sete dl
cmp eax, 0x105
sete al
or eax, edx
test al, 1
jne 0x4c42c0
push 0x5c
push esi
call sub.msvcrt.dll_strrchr
pop edx
test eax, eax
pop ecx
jne 0x4c42cd
push str.unable_to_get_ModuleFileName
push ebx
call fcn.004bbdab
jmp 0x4c42f5
mov byte [eax], 0
push esi
push 0x604cde
push 0
push 0xffffffffffffffff
push ebx
call fcn.004bd277
add esp, 0xc
push eax
push ebx
call fcn.004bc66d
add esp, 0x10
push 0xfffffffffffffffe
push ebx
call fcn.004bceb3
pop esi
pop eax
push edi
push 0xfffffffffffffffe
push ebx
call fcn.004bd834
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4d012e
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x14], 0xca
jne 0x4d0163
push ebx
call fcn.004d402f
pop eax
cmp dword [ebx + 0x40], 0
je 0x4d015c
mov eax, 1
mov dword [ebx + 0x14], 0xcf
jmp 0x4d01fe
mov dword [ebx + 0x14], 0xcb
mov eax, dword [ebx + 0x14]
cmp eax, 0xcb
jne 0x4d01d5
mov eax, dword [ebx + 0x1ec]
cmp dword [eax + 0x10], 0
je 0x4d01c7
mov eax, dword [ebx + 8]
test eax, eax
je 0x4d0184
push ebx
call dword [eax]
pop ecx
mov eax, dword [ebx + 0x1ec]
push ebx
call dword [eax]
pop edx
test eax, eax
je 0x4d01fc
cmp eax, 2
je 0x4d01c7
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x4d0179
cmp eax, 3
sete dl
dec eax
sete al
or eax, edx
test al, 1
je 0x4d0179
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 8]
inc eax
mov dword [ecx + 4], eax
cmp eax, edx
jl 0x4d0179
add edx, dword [ebx + 0x178]
mov dword [ecx + 8], edx
jmp 0x4d0179
mov eax, dword [ebx + 0x90]
mov dword [ebx + 0x98], eax
jmp 0x4d01f1
cmp eax, 0xcc
je 0x4d01f1
mov eax, dword [ebx]
mov dword [eax + 0x14], 0x14
mov edx, dword [ebx + 0x14]
mov dword [eax + 0x18], edx
mov eax, dword [ebx]
push ebx
call dword [eax]
pop eax
mov eax, ebx
mov ebx, dword [ebp - 4]
leave
jmp fcn.004d0060
xor eax, eax
mov ebx, dword [ebp - 4]
leave
ret

Function at 0x4d17cb
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
push ecx
push ecx
mov esi, dword [ebp + 8]
mov dword [esi + 4], 0
push esi
call fcn.004d43e8
push 0x54
push esi
mov dword [ebp - 0x10], eax
call fcn.004d4390
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x4d1813
push esi
call fcn.004d43ef
mov eax, dword [esi]
mov dword [eax + 0x18], 0
mov dword [eax + 0x14], 0x36
mov eax, dword [esi]
push esi
call dword [eax]
pop eax
pop edx
mov eax, dword [ebp - 0x10]
mov dword [ebx], fcn.004d0db6
mov dword [ebx + 4], fcn.004d0ed2
mov dword [ebx + 8], fcn.004d0f6e
mov dword [ebx + 0xc], fcn.004d1003
mov dword [ebx + 0x10], 0x4d10a9
mov dword [ebx + 0x14], 0x4d1111
mov dword [ebx + 0x18], 0x4d1179
mov dword [ebx + 0x1c], 0x4d143f
mov dword [ebx + 0x20], 0x4d156e
mov dword [ebx + 0x24], fcn.004d169b
mov dword [ebx + 0x28], 0x4d178f
mov dword [ebx + 0x30], 0x3b9aca00
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x38], 0
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x34], 0
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], 0x54
mov dword [esi + 4], ebx
push str.JPEGMEM
call sub.msvcrt.dll_getenv
pop ecx
mov edx, eax
test eax, eax
je 0x4d18f6
lea eax, [ebp - 9]
mov byte [ebp - 9], 0x78
push eax
lea eax, [ebp - 0x10]
push eax
push str._ld_c
push edx
call sub.msvcrt.dll_sscanf
add esp, 0x10
test eax, eax
jle 0x4d18f6
mov al, byte [ebp - 9]
cmp al, 0x6d
sete dl
cmp al, 0x4d
sete al
or eax, edx
test al, 1
je 0x4d18ec
imul eax, dword [ebp - 0x10], 0x3e8
mov dword [ebp - 0x10], eax
imul eax, dword [ebp - 0x10], 0x3e8
mov dword [ebx + 0x2c], eax
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
Function at 0x4e2da8
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov word [eax + 4], 0xffff
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov word [eax + 0x10], 0
mov dword [eax + 0x18], 0
mov dword [eax + 0x24], 0
mov dword [eax + 0x28], 0
mov dword [eax + 0x2c], 0
mov dword [eax + 0x30], 0
mov dword [eax + 0x34], 0
mov dword [eax + 0x38], 0
mov dword [eax + 0x3c], 0
mov dword [eax + 0x40], 0
mov dword [eax + 0x44], 0
mov dword [eax + 0x48], 0
mov dword [eax + 0x4c], 0
mov dword [eax + 0x50], 0
mov dword [eax + 0x54], 0
mov dword [eax + 0x58], 0
mov dword [eax + 0x5c], 0x20
mov dword [eax + 0x60], 0x20
mov dword [eax + 0x64], 0
mov dword [eax + 0x68], 0
mov dword [eax + 0x6c], 2
mov dword [eax + 0x70], 2
mov dword [eax + 0x74], 0x1388
mov dword [eax + 0x78], 0x1f4
mov dword [eax + 0x7c], 0x1f4
mov dword [eax + 0x80], 0
mov dword [eax + 0x84], 0
mov dword [eax + 0x88], 0x1f4
mov dword [eax + 0x8c], 0
mov edx, dword [eax]
mov edx, dword [edx + 0x18]
mov dword [eax + 0x98], 0
mov word [eax + 0x90], dx
mov dword [eax + 0x9c], 0
mov dword [eax + 0x94], 0x8000
pop ebp
jmp fcn.004e2cfa

Function at 0x4e346a
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x18
cmp dword [ebp + 8], 2
sete al
inc eax
push 0
mov esi, dword [ebp + 0xc]
push eax
push 2
call sub.WS2_32.DLL_socket
mov ebx, eax
mov dword [ebp - 0x20], 1
or eax, 0xffffffff
mov dword [ebp - 0x24], 0x40000
cmp ebx, 0xffffffff
je 0x4e3546
cmp dword [ebp + 8], 2
jne 0x4e34d1
lea eax, [ebp - 0x20]
push eax
push 0x8004667e
push ebx
call sub.WS2_32.DLL_ioctlsocket
lea eax, [ebp - 0x24]
push 4
push eax
push 0x1002
push 0xffff
push ebx
call sub.WS2_32.DLL_setsockopt
cld
xor eax, eax
lea edi, [ebp - 0x1c]
mov ecx, 4
test esi, esi
rep stosd dword es:[edi], eax
mov word [ebp - 0x1c], 2
je 0x4e34fd
movzx eax, word [esi + 4]
push eax
call sub.WS2_32.DLL_htons
mov word [ebp - 0x1a], ax
mov eax, dword [esi]
mov dword [ebp - 0x18], eax
jmp 0x4e350a
mov word [ebp - 0x1a], 0
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x1c]
push 0x10
push eax
push ebx
call sub.WS2_32.DLL_bind
inc eax
je 0x4e3539
cmp dword [ebp + 8], 1
sete dl
xor eax, eax
test esi, esi
setne al
test edx, eax
je 0x4e3544
push 0x7fffffff
push ebx
call sub.WS2_32.DLL_listen
inc eax
jne 0x4e3544
push ebx
call sub.WS2_32.DLL_closesocket
or eax, 0xffffffff
jmp 0x4e3546
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret