joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48a522
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 8]
test edx, edx
jne 0x48a52d
xor eax, eax
ret
mov eax, dword [esp + 4]
push esi
push edi
mov edi, dword [esp + 0x14]
not eax
mov ecx, 0xff
cmp edi, 8
jb 0x48a5e8
mov esi, edi
shr esi, 3
push ebx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x566f40]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x566f40]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x566f40]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x566f40]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x566f40]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x566f40]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x566f40]
inc edx
movzx ebx, byte [edx]
xor ebx, eax
and ebx, ecx
shr eax, 8
xor eax, dword [ebx*4 + 0x566f40]
inc edx
sub edi, 8
dec esi
jne 0x48a54d
pop ebx
test edi, edi
je 0x48a601
movzx esi, byte [edx]
xor esi, eax
and esi, ecx
shr eax, 8
xor eax, dword [esi*4 + 0x566f40]
inc edx
dec edi
jne 0x48a5ec
pop edi
not eax
pop esi
ret

Function at 0x48aa98
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x48aacc
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x48aac7
mov byte [esi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x48aaf4
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x14]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x48aadd
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x10]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.004be710
add esp, 0xc
add dword [esi + 0x18], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop esi
pop ebp
ret

Function at 0x48b891
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x5b2390]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x48b93b
movzx ecx, word [esi]
test cx, cx
je 0x48b93b
mov eax, esi
mov edx, esi
movzx ecx, cx
cmp cx, 0x2f
je 0x48b8cf
cmp cx, 0x5c
jne 0x48b8d1
mov eax, edx
inc edx
inc edx
movzx ecx, word [edx]
test cx, cx
jne 0x48b8c3
cmp eax, esi
je 0x48b90f
push edi
sub eax, esi
mov edi, eax
sar edi, 1
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.004bf9ed
xor eax, eax
mov word [ebp + edi*2 - 0x20c], ax
lea eax, [ebp - 0x20c]
push eax
push ebx
call fcn.0048b891
add esp, 0x14
pop edi
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.004b7b9a
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.004b7b6c
add esp, 0x10
push 0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004b7b5d
leave
ret
Function at 0x48ce6c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x48cee7
cmp dword [esi + 4], 0xffffffff
jne 0x48cee7
push edi
lea edi, [esi + 0x138]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x55902c
push edi
call fcn.004b7b6c
cmp dword [ebp + 0x10], 1
pop ecx
pop ecx
pop edi
jne 0x48ceb9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x48ceb9
mov eax, 0x2000000
jmp 0x48ceec
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0048a8ae
add esp, 0x10
test eax, eax
jne 0x48ced7
mov eax, dword [ebp + 0x10]
jmp 0x48ceec
push eax
call fcn.0048ca68
mov dword [esi], eax
mov eax, dword [0x5b70f0]
pop ecx
jmp 0x48ceec
mov eax, 0x1000000
pop esi
pop ebp
ret 0xc
Function at 0x48fd82
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, eax
mov eax, dword [esi + 8]
push edi
mov edi, eax
and edi, 7
je 0x48fda7
cmp eax, edi
jge 0x48fd9f
mov eax, esi
call fcn.0048f736
mov ecx, edi
shr dword [esi + 0xc], cl
sub dword [esi + 8], edi
xor ecx, ecx
cmp dword [esi + 8], ecx
jle 0x48fdc9
mov al, byte [esi + 0xc]
shr dword [esi + 0xc], 8
add dword [esi + 8], 0xfffffff8
mov byte [ebp + ecx - 4], al
inc ecx
cmp dword [esi + 8], 0
jg 0x48fdae
cmp ecx, 4
jge 0x48fde8
mov edi, dword [esi + 4]
mov eax, dword [esi]
cmp eax, edi
jb 0x48fdd6
xor eax, eax
jmp 0x48fdde
mov dl, byte [eax]
inc eax
mov dword [esi], eax
movzx eax, dl
mov byte [ebp + ecx - 4], al
inc ecx
cmp ecx, 4
jl 0x48fdcc
movzx edi, byte [ebp - 3]
movzx eax, byte [ebp - 4]
movzx ecx, byte [ebp - 2]
shl edi, 8
add edi, eax
movzx eax, byte [ebp - 1]
shl eax, 8
add eax, ecx
mov ecx, edi
xor ecx, 0xffff
cmp eax, ecx
je 0x48fe1a
mov eax, str.zlib_corrupt
call fcn.0048d353
jmp 0x48fe55
mov eax, dword [esi]
add eax, edi
cmp eax, dword [esi + 4]
jbe 0x48fe2a
mov eax, str.read_past_buffer
jmp 0x48fe13
mov eax, dword [esi + 0x10]
add eax, edi
cmp eax, dword [esi + 0x18]
jbe 0x48fe3f
mov ecx, edi
call fcn.0048f761
test eax, eax
je 0x48fe55
push edi
push dword [esi]
push dword [esi + 0x10]
call fcn.004be710
add dword [esi], edi
add dword [esi + 0x10], edi
xor eax, eax
add esp, 0xc
inc eax
pop edi
pop esi
leave
ret

Function at 0x496439
Capabilities:
Connect socket

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ecx + 4]
call dword [sym.imp.WSOCK32.dll_connect]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebp
ret 8

Function at 0x4979e2
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x497a2a
call fcn.00498ff8
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x497a2a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x497a6d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x497a56
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x497a56
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x497a6a
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x4a20fe
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x4a2145
call fcn.00498ff8
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4a2145
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x4a2161
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.004a1c76
mov esi, eax
test edi, edi
je 0x4a215f
test ebx, ebx
je 0x4a215f
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x4a288c
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x54d623
call fcn.004bf87a
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x4a28b1
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x4a28f7
lea ecx, [ebp - 0x10]
call fcn.0040db30
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0041c0e0
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00404ec0
mov eax, esi
call fcn.004bf952
ret 8
Function at 0x4a3bc2
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
push dword [ebp + 8]
xor esi, esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x4a3bf4
push dword [ebp + 8]
call edi
push eax
call fcn.004a86aa
mov ebx, dword [ebp + 0xc]
movzx eax, byte [ebx + 0x20]
cmp eax, dword [ebp - 4]
je 0x4a3c1f
test byte [ebp - 4], 1
je 0x4a3c1f
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x4a3c1f
push dword [ebp + 8]
call edi
push eax
call fcn.004a86aa
lea eax, [ebx + 8]
mov ecx, dword [eax]
or ecx, dword [eax + 4]
je 0x4a3cd9
lea ecx, [ebp - 0x20]
push ecx
push eax
call fcn.004a3b24
pop ecx
lea eax, [ebx + 0x10]
pop ecx
mov ecx, dword [eax]
or ecx, dword [eax + 4]
je 0x4a3c55
lea ecx, [ebp - 0x10]
push ecx
push eax
call fcn.004a3b24
pop ecx
lea eax, [ebp - 0x10]
pop ecx
mov dword [ebp - 8], eax
mov eax, dword [ebx]
or eax, dword [ebx + 4]
je 0x4a3c6b
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.004a3b24
pop ecx
pop ecx
lea esi, [ebp - 0x18]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4a3c98
push dword [ebp + 8]
call edi
push eax
call fcn.004a86aa
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4a3cc4
call edi
push ebx
mov dword [ebp - 8], eax
call esi
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.004a86aa
push ebx
call esi
test eax, eax
jne 0x4a3cd6
push dword [ebp + 8]
call edi
push eax
call fcn.004a86aa
mov ebx, dword [ebp + 0xc]
movzx eax, byte [ebx + 0x20]
cmp eax, dword [ebp - 4]
je 0x4a3d01
test byte [ebp - 4], 1
jne 0x4a3d01
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x4a3d01
push dword [ebp + 8]
call edi
push eax
call fcn.004a86aa
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x4a4d46
Capabilities:
Create http request

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, ecx
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
mov dword [esi], vtable.CInternetSession.0
test eax, eax
jne 0x4a4d71
call fcn.00498ff8
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 8], eax
test eax, eax
jne 0x4a4d94
push eax
push dword [esi + 4]
call fcn.004a4ccc
push esi
push eax
mov ecx, 0x5b8c54
call fcn.004a4974
mov eax, esi
pop esi
pop ebp
ret 0x18
Function at 0x4a55eb
Capabilities:
Connect to http server

Disassembly:
push 4
mov eax, 0x54d834
call fcn.004bf87a
mov esi, ecx
mov dword [ebp - 0x10], esi
push dword [ebp + 0x1c]
mov edi, dword [ebp + 8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.004a55ab
and dword [ebp - 4], 0
lea ecx, [esi + 0x18]
mov dword [esi], vtable.CHttpConnection.0
call fcn.0040db30
push dword [esi + 8]
mov edi, dword [edi + 8]
push 0
push 3
push dword [ebp + 0x18]
mov byte [ebp - 4], 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esi + 4], eax
test eax, eax
jne 0x4a5651
push eax
push dword [esi + 8]
call fcn.004a4ccc
push dword [esi + 0xc]
mov ecx, 0x5b8c54
push eax
call fcn.004a4974
mov eax, esi
call fcn.004bf952
ret 0x18

Function at 0x4b45f5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [edi + 0x58], ebx
test ebx, 0xffff0000
jne 0x4b4619
cmp dword [edi + 0x54], 0
jne 0x4b4619
movzx eax, bx
mov dword [edi + 0x54], eax
call fcn.00498ff8
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [ebp + 0xc]
mov ebx, eax
push ebx
mov ecx, edi
call fcn.004b45b6
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x4b7b5d
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5b2390]
jne 0x4b7b67
repz ret
jmp fcn.004c4409
Function at 0x4cf43a
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004c3071
and dword [ebp - 4], 0
cmp dword [0x5b9d04], 0
mov ebx, eax
jne 0x4cf4eb
push 0x56dcf4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x4cf59c
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x56dce8
push edi
call esi
test eax, eax
je 0x4cf59c
push eax
call fcn.004c2fff
mov dword [esp], 0x56dcd8
push edi
mov dword [0x5b9d04], eax
call esi
push eax
call fcn.004c2fff
mov dword [esp], 0x56dcc4
push edi
mov dword [0x5b9d08], eax
call esi
push eax
call fcn.004c2fff
mov dword [esp], str.GetUserObjectInformationW
push edi
mov dword [0x5b9d0c], eax
call esi
push eax
call fcn.004c2fff
pop ecx
mov dword [0x5b9d14], eax
test eax, eax
je 0x4cf4eb
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004c2fff
pop ecx
mov dword [0x5b9d10], eax
mov eax, dword [0x5b9d10]
cmp eax, ebx
je 0x4cf543
cmp dword [0x5b9d14], ebx
je 0x4cf543
push eax
call fcn.004c307a
push dword [0x5b9d14]
mov esi, eax
call fcn.004c307a
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4cf543
test edi, edi
je 0x4cf543
call esi
test eax, eax
je 0x4cf53a
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4cf53a
test byte [ebp - 0xc], 1
jne 0x4cf543
or dword [ebp + 0x10], 0x200000
jmp 0x4cf57c
mov eax, dword [0x5b9d08]
cmp eax, ebx
je 0x4cf57c
push eax
call fcn.004c307a
pop ecx
test eax, eax
je 0x4cf57c
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4cf57c
mov eax, dword [0x5b9d0c]
cmp eax, ebx
je 0x4cf57c
push eax
call fcn.004c307a
pop ecx
test eax, eax
je 0x4cf57c
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x5b9d04]
call fcn.004c307a
pop ecx
test eax, eax
je 0x4cf59c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4cf59e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4d2043
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004c3071
and dword [ebp - 4], 0
cmp dword [0x5b9d24], 0
mov ebx, eax
jne 0x4d20f4
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4d21a5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x4d21a5
push eax
call fcn.004c2fff
mov dword [esp], 0x56dcd8
push edi
mov dword [0x5b9d24], eax
call esi
push eax
call fcn.004c2fff
mov dword [esp], 0x56dcc4
push edi
mov dword [0x5b9d28], eax
call esi
push eax
call fcn.004c2fff
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x5b9d2c], eax
call esi
push eax
call fcn.004c2fff
pop ecx
mov dword [0x5b9d34], eax
test eax, eax
je 0x4d20f4
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004c2fff
pop ecx
mov dword [0x5b9d30], eax
mov eax, dword [0x5b9d30]
cmp eax, ebx
je 0x4d214c
cmp dword [0x5b9d34], ebx
je 0x4d214c
push eax
call fcn.004c307a
push dword [0x5b9d34]
mov esi, eax
call fcn.004c307a
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4d214c
test edi, edi
je 0x4d214c
call esi
test eax, eax
je 0x4d2143
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4d2143
test byte [ebp - 0xc], 1
jne 0x4d214c
or dword [ebp + 0x10], 0x200000
jmp 0x4d2185
mov eax, dword [0x5b9d28]
cmp eax, ebx
je 0x4d2185
push eax
call fcn.004c307a
pop ecx
test eax, eax
je 0x4d2185
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4d2185
mov eax, dword [0x5b9d2c]
cmp eax, ebx
je 0x4d2185
push eax
call fcn.004c307a
pop ecx
test eax, eax
je 0x4d2185
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x5b9d24]
call fcn.004c307a
pop ecx
test eax, eax
je 0x4d21a5
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4d21a7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4d9490
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x5b2390]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x4d94e0
mov ax, word [esp]
cmp al, 2
jne 0x4d94da
cmp ah, al
jne 0x4d94da
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004b7b5d
add esp, 0x194
ret
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.004b7b5d
add esp, 0x194
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
jne 0x4e4ed2
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret
Function at 0x4e5020
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4e503b
mov edx, dword [esi + 0xf4]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4e506f
cmp eax, 2
jg 0x4e506f
mov ecx, dword [esi + 0xf0]
push ecx
push 1
lea edx, [eax + eax*2 + 0x570394]
push 2
push edx
call fcn.004bcda3
mov eax, dword [esi + 0xf0]
push eax
push 1
push edi
push ebx
call fcn.004bcda3
add esp, 0x20
xor eax, eax
ret

Function at 0x4e5380
Capabilities:
Send data
Send data on socket

Disassembly:
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + eax*4 + 0x130]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebx], 0
jne 0x4e53fd
push ebp
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x4e53d4
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.004e9280
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.004e5200
mov ecx, dword [esi]
add esp, 0x14
mov dword [ecx + 0x856c], ebp
mov dword [ebx], 0x37
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4e5bc0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10c
mov eax, dword [0x5b2390]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push ebp
mov ebp, dword [esp + 0x118]
cmp dword [ebp + 0x19c], 0
push esi
push edi
mov edi, dword [ebp]
mov dword [esp + 0x14], edi
jne 0x4e5cfb
mov esi, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WSOCK32.dll_getpeername]
test eax, eax
je 0x4e5c3c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.004e9280
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.004e5200
add esp, 0x18
jmp 0x4e5d04
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x9c]
push eax
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
je 0x4e5c7c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.004e9280
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.004e5200
add esp, 0x18
jmp 0x4e5d04
lea ebx, [ebp + 0xcc]
lea edi, [ebp + 0x9e]
lea esi, [esp + 0x18]
call fcn.004e5b80
test eax, eax
jne 0x4e5cba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004e9280
mov ecx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.004e5200
add esp, 0x18
jmp 0x4e5d04
lea ebx, [ebp + 0x100]
lea edi, [ebp + 0xd0]
lea esi, [esp + 0x98]
call fcn.004e5b80
test eax, eax
jne 0x4e5cfb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004e9280
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.004e5200
add esp, 0x18
jmp 0x4e5d04
push ebp
call fcn.004e5b20
add esp, 4
mov ecx, dword [esp + 0x118]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b7b5d
add esp, 0x10c
ret

Function at 0x4e5d20
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x314]
push 4
lea ecx, [esp + 8]
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4e5d63
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push edi
call fcn.004e9280
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004e5170
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004e5170
add esp, 8
pop esi
pop ecx
ret

Function at 0x4e5d80
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push 0x1001
push 0xffff
push esi
mov dword [esp + 0x1c], 0x4020
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4e5dc9
mov edx, dword [esp + 4]
cmp edx, dword [esp + 8]
jg 0x4e5de1
push 4
lea eax, [esp + 0xc]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret
Function at 0x4e5df0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x530]
cmp eax, 0xffffffff
je 0x4e5e49
mov ecx, dword [ecx + 0x524]
mov edx, dword [ecx]
cmp dword [edx + eax*4], 0
lea eax, [edx + eax*4]
je 0x4e5e49
mov ecx, dword [esp + 8]
test ecx, ecx
mov eax, dword [eax]
je 0x4e5e1c
mov dword [ecx], eax
cmp dword [eax + 0x148], 0
push esi
mov esi, dword [eax + 0x130]
jne 0x4e5e40
push 2
push 1
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.WSOCK32.dll_recv]
test eax, eax
jne 0x4e5e45
or eax, 0xffffffff
pop esi
ret
mov eax, esi
pop esi
ret
or eax, 0xffffffff
ret