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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
mov esi, dword [ebp + 8]
cmp byte [esi], 0
je 0x405a7b
cmp byte [esi + 1], 0
je 0x405a83
mov eax, dword [esi + 4]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebx
je 0x405a97
cmp byte [esi + 1], 0
je 0x405a8b
mov edx, dword [esi + 4]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
sub ebx, dword [esi + 0xc]
mov dword [ebp + 8], ebx
jmp 0x405a9f
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
jmp 0x405a55
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov dword [ebp + 8], 0
mov ebx, dword [ebp + 8]
jmp 0x405a9f
mov eax, dword [esi + 0x1c]
mov dword [ebp + 8], eax
mov ebx, eax
push edi
mov edi, 0xffff
mov dword [ebp - 4], edi
cmp ebx, edi
jae 0x405ab1
mov dword [ebp - 4], ebx
mov edi, ebx
push 0x404
call fcn.00500aa0
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x405acf
pop edi
pop ebx
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 4
mov dword [ebp - 0x10], 0xffffffff
cmp edi, eax
jbe 0x405bdd
jmp 0x405aee
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 8]
add eax, 0x400
mov dword [ebp - 8], edi
cmp eax, edi
ja 0x405afd
mov dword [ebp - 8], eax
mov eax, ebx
sub eax, dword [ebp - 8]
sub ebx, eax
mov dword [ebp - 0x18], eax
cmp ebx, 0x404
jbe 0x405b14
mov ebx, 0x404
cmp byte [esi], 0
je 0x405b39
cmp byte [esi + 1], 0
je 0x405bdd
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x405b3c
mov dword [esi + 0x1c], eax
cmp byte [esi], 0
mov edi, ebx
je 0x405b65
mov ecx, dword [ebp - 0xc]
mov edx, dword [esi + 4]
push 0
lea eax, [ebp - 0x14]
push eax
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405b60
mov byte [esi + 8], 1
mov eax, dword [ebp - 0x14]
jmp 0x405b8e
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea edx, [eax + ebx]
cmp edx, ecx
jbe 0x405b76
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0x14]
mov edx, dword [ebp - 0xc]
push edi
add ecx, eax
push ecx
push edx
call fcn.004ff980
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div ebx
cmp eax, 1
jne 0x405bdd
lea eax, [ebx - 3]
test eax, eax
js 0x405bcb
mov edi, edi
mov ecx, dword [ebp - 0xc]
dec eax
cmp byte [eax + ecx], 0x50
jne 0x405bbf
cmp byte [eax + ecx + 1], 0x4b
jne 0x405bbf
cmp byte [eax + ecx + 2], 5
jne 0x405bbf
cmp byte [eax + ecx + 3], 6
je 0x405bc5
test eax, eax
jns 0x405ba0
jmp 0x405bcb
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x405bdd
mov edx, dword [ebp - 4]
cmp dword [ebp - 8], edx
jb 0x405ae5
mov eax, dword [ebp - 0xc]
push eax
call fcn.00500b34
mov eax, dword [ebp - 0x10]
add esp, 4
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4069d0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x5b37b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x406a04
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x406a04
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [ebx]
test al, al
je 0x406abe
push esi
mov esi, ebx
mov ecx, ebx
cmp al, 0x2f
je 0x406a1b
cmp al, 0x5c
jne 0x406a1d
mov esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x406a13
cmp esi, ebx
je 0x406a51
sub esi, ebx
push esi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.004ff980
lea ecx, [ebp - 0x20c]
push ecx
push edi
mov byte [ebp + esi - 0x20c], 0
call fcn.004069d0
add esp, 0x14
mov byte [ebp - 0x108], 0
test edi, edi
je 0x406a70
lea edx, [ebp - 0x108]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x406a66
mov eax, ebx
mov edx, ebx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406a74
lea edi, [ebp - 0x108]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406a84
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [ebp - 0x108]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
pop esi
cmp eax, 0xffffffff
jne 0x406abe
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004ff460
mov esp, ebp
pop ebp
ret

Function at 0x408570
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
cmp dword [ebx], 0
jne 0x40863b
cmp dword [ebx + 4], 0xffffffff
jne 0x40863b
push edi
lea edi, [ebx + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085a1
sub eax, edx
mov al, byte [eax + ebx + 0x13f]
cmp al, 0x5c
je 0x4085d1
cmp al, 0x2f
je 0x4085d1
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4085c0
mov ax, word [0x564304]
mov word [edi], ax
mov edi, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
cmp edi, 1
jne 0x4085fb
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4085fb
pop esi
pop edi
mov eax, 0x2000000
pop ebx
pop ebp
ret 0xc
mov edx, dword [ebp + 0xc]
lea ecx, [ebp + 0x10]
push ecx
push edi
push edx
push esi
call fcn.00405700
add esp, 0x10
test eax, eax
jne 0x40861b
mov eax, dword [ebp + 0x10]
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
push eax
call fcn.00407f90
add esp, 4
mov dword [ebx], eax
neg eax
sbb eax, eax
pop esi
and eax, 0xfffffe00
pop edi
add eax, 0x200
pop ebx
pop ebp
ret 0xc
mov eax, 0x1000000
pop ebx
pop ebp
ret 0xc
Function at 0x420af6
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 0x420b3d
call fcn.004097a3
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x420b3d
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x420b59
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.004205fb
mov esi, eax
test edi, edi
je 0x420b57
test ebx, ebx
je 0x420b57
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x422d9a
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x55c4f7
call fcn.00501244
mov esi, ecx
cmp dword [esi + 0x6c], 0
jne 0x422dbf
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextA]
jmp 0x422e11
call fcn.00439ed6
push eax
lea ecx, [ebp - 0x10]
call fcn.00402020
mov ecx, dword [esi + 0x6c]
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.0050140f
push eax
call fcn.00403900
add esp, 0x14
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00401270
mov eax, esi
call fcn.0050131c
ret 8

Function at 0x43d554
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 4], ecx
test esi, esi
jne 0x43d56e
call fcn.004097a3
mov esi, dword [eax + 0xc]
push dword [0x5b7768]
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x43d58c
xor eax, eax
pop edi
pop esi
leave
ret 8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp + 0xc], eax
test eax, eax
je 0x43d584
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
jne 0x43d5b9
xor esi, esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop ebx
jmp 0x43d586
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp - 4]
push eax
push ebx
call fcn.0043d482
mov esi, eax
jmp 0x43d5ab
Function at 0x457fdb
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
xor ebx, ebx
call fcn.004097a3
mov esi, dword [eax + 0xc]
push 5
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x458014
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov ecx, dword [ebp - 4]
push esi
push dword [ebp + 0xc]
push ebx
call fcn.00457c1d
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8

Function at 0x458072
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 + 0x78], ebx
test ebx, 0xffff0000
jne 0x458096
cmp dword [edi + 0x74], 0
jne 0x458096
movzx eax, bx
mov dword [edi + 0x74], eax
call fcn.004097a3
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
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.00458033
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 0x4bdd79
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
test byte [esi + 4], 1
push edi
mov ebx, ecx
je 0x4bdd91
mov edi, dword [esi + 0xc]
jmp 0x4bddd1
push 5
push dword [esi + 0xc]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x4bddaa
call fcn.0042b34f
push edi
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
jne 0x4bddbf
call fcn.0042b34f
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
jne 0x4bddd1
call fcn.0042b34f
call fcn.004097a3
cmp dword [eax + 0x3c], 0
je 0x4bdde6
push edi
mov ecx, ebx
call fcn.004bcbb5
mov edi, eax
push dword [ebp + 0xc]
push edi
call fcn.004bdc93
mov dword [ebp + 8], eax
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x4bde04
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebx + 0x7c], 0
mov eax, dword [ebp + 8]
test eax, eax
je 0x4bde10
mov edi, eax
mov dword [ebx + 0x7c], eax
or dword [esi + 4], 1
mov dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x4e0cdb
Capabilities:
Get graphical window text

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push dword [ebp + 0xc]
mov ecx, esi
call fcn.004e099a
cmp dword [esi], 0
mov edi, eax
mov dword [esi + 0xc], 1
je 0x4e0d25
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [ebp + 0x10]
push eax
call fcn.0040a31d
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
call fcn.0040a08c
jmp 0x4e0d30
mov eax, dword [ebp + 0x10]
push dword [eax]
push edi
call fcn.00469542
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x4e0d36
Capabilities:
Get graphical window text

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 4]
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
call fcn.00422a64
push 0xfffffffffffffff0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowLongA]
push dword [ebp + 0xc]
and eax, 3
mov ecx, esi
cmp al, 3
je 0x4e0d73
call fcn.004e099a
mov dword [esi + 0xc], 1
jmp 0x4e0d78
call fcn.004e099a
cmp dword [esi], 0
je 0x4e0dc1
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
test eax, eax
jle 0x4e0d99
lea ecx, [eax + 1]
push ecx
mov ecx, dword [ebp + 0x10]
push eax
call fcn.0040a31d
jmp 0x4e0dab
mov ecx, dword [ebp + 0x10]
push 0xff
call fcn.004021c0
push 0x100
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
call fcn.0040a08c
jmp 0x4e0de5
mov esi, dword [ebp + 0x10]
push dword [esi]
push 0xffffffffffffffff
push 0x14d
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, 0xffffffff
jne 0x4e0de5
push dword [esi]
push dword [ebp + 8]
call fcn.00469542
pop esi
pop ebp
ret 0xc

Function at 0x4e6265
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push esi
mov esi, ecx
call fcn.004fb6dd
call fcn.004091c0
cmp dword [eax + 0x14], 0
jne 0x4e6282
mov ecx, esi
pop esi
jmp fcn.004e5d6a
pop esi
ret

Function at 0x4e932b
Capabilities:
Get common file path
Get file system object information

Disassembly:
mov edi, edi
push esi
mov esi, ecx
call fcn.00450d02
call fcn.004091c0
cmp dword [eax + 0x14], 0
jne 0x4e9348
mov ecx, esi
pop esi
jmp fcn.004e8cfe
pop esi
ret

Function at 0x4ff460
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5b37b0]
jne 0x4ff46a
repz ret
jmp fcn.00508e4d
Function at 0x5153c9
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5b37b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00506cdc
and dword [ebp - 0x14], 0
cmp dword [0x5bb334], 0
mov dword [ebp - 0x18], eax
jne 0x51547c
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x515524
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x515524
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x58a274
push ebx
mov dword [0x5bb334], eax
call edi
push eax
call esi
push 0x58a260
push ebx
mov dword [0x5bb338], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x5bb33c], eax
call edi
push eax
call esi
mov dword [0x5bb344], eax
test eax, eax
je 0x51547c
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x5bb340], eax
mov eax, dword [0x5bb340]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x5154d5
cmp dword [0x5bb344], ecx
je 0x5154d5
push eax
call esi
push dword [0x5bb344]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x5154d5
test ebx, ebx
je 0x5154d5
call edi
test eax, eax
je 0x5154cc
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x5154cc
test byte [ebp - 8], 1
jne 0x5154d5
or dword [ebp + 0x10], 0x200000
jmp 0x515508
mov eax, dword [0x5bb338]
cmp eax, dword [ebp - 0x18]
je 0x515508
push eax
call esi
test eax, eax
je 0x515508
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x515508
mov eax, dword [0x5bb33c]
cmp eax, dword [ebp - 0x18]
je 0x515508
push eax
call esi
test eax, eax
je 0x515508
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x5bb334]
call esi
test eax, eax
je 0x515524
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x515526
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ff460
leave
ret

Function at 0x519600
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x5b37b0]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x519655
mov eax, dword [esp]
cmp al, 2
jne 0x51964f
shr eax, 8
cmp al, 2
jne 0x51964f
call fcn.00519a10
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004ff460
add esp, 0x194
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.004ff460
add esp, 0x194
ret
Function at 0x526500
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.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x526532
call dword [sym.imp.WS2_32.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 0x526690
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x1a8]
test ecx, ecx
je 0x5266ab
mov edx, dword [esi + 0x134]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x5266df
cmp eax, 2
jg 0x5266df
mov ecx, dword [esi + 0x130]
push ecx
push 1
lea edx, [eax + eax*2 + 0x58bb70]
push 2
push edx
call fcn.005001a8
mov eax, dword [esi + 0x130]
push eax
push 1
push edi
push ebx
call fcn.005001a8
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
push ebx
mov ebx, dword [eax + ecx*4 + 0x190]
mov edx, ecx
shl edx, 4
push esi
lea esi, [edx + eax + 0x1b8]
mov edx, dword [eax + 0x440]
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [edx + 0x3c], 3
je 0x526d1f
cmp dword [eax + ecx*4 + 0x1a8], 0x526a00
jne 0x526d1f
cmp dword [esi], 0
je 0x526cb2
test edi, edi
je 0x526d1f
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.00519d00
add esp, 0x14
cmp eax, 0xffffffff
je 0x526d1f
test al, 1
je 0x526d1f
cmp dword [esi], 0
jne 0x526cfd
push 0x8000
mov dword [esi + 4], 0x8000
call dword [0x5b4cd4]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test eax, eax
je 0x526d18
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x526d1f
add dword [esi + 8], eax
pop edi
pop esi
pop ebx
ret
mov dword [esi + 4], 0
pop edi
pop esi
pop ebx
ret

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

Disassembly:
mov ecx, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esi + ecx*4 + 0x190]
mov eax, esi
call fcn.00526c70
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push 0
push eax
push ecx
push edi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x526db4
push ebp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x526d8b
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.0052c750
mov edx, dword [esi]
push eax
push str.Send_failure:__s
push edx
call fcn.00526870
mov eax, dword [esi]
mov dword [eax + 0x473c], ebp
add esp, 0x14
mov dword [ebx], 0x37
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x528c50
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
xor eax, eax
cmp dword [esi + 0x538], eax
push 4
lea ecx, [esp + 4]
push ecx
setne al
push 8
push 0xffff
push edi
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x528c8e
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.005267e0
add esp, 0xc
add esp, 0x14
ret
mov edx, dword [esi + 0x53c]
push edx
mov dword [esp + 0xc], 1
call fcn.0052a450
imul eax, eax, 0x3e8
mov dword [esp + 4], eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x540]
push eax
call fcn.0052a450
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 0xc
lea edx, [esp + 0x20]
push edx
push 0x98000004
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x528d07
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.005267e0
add esp, 0x10
add esp, 0x14
ret
Function at 0x529340
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10c
mov eax, dword [0x5b37b0]
xor eax, esp
mov dword [esp + 0x108], eax
push ebp
mov ebp, dword [esp + 0x114]
cmp dword [ebp + 0x8c], 2
push edi
mov edi, dword [ebp]
mov dword [esp + 0xc], edi
je 0x5294c2
cmp dword [ebp + 0x3a0], 0
push ebx
push esi
jne 0x5294b7
cmp dword [ebp + 0x410], 0
jne 0x5294b7
mov esi, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x9c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x5293d9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.0052c750
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.00526870
add esp, 0x18
jmp 0x5294c0
push ebx
lea edx, [esp + 0x1c]
push 0
push edx
mov dword [esp + 0x1c], ebx
call fcn.00500d40
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x529426
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.0052c750
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.00526870
add esp, 0x18
jmp 0x5294c0
lea edi, [ebp + 0x102]
lea ebx, [ebp + 0x130]
lea esi, [esp + 0x98]
call fcn.00529300
test eax, eax
jne 0x529467
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.0052c750
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.00526870
add esp, 0x18
jmp 0x5294c0
lea edi, [ebp + 0x58]
mov ecx, 0xb
lea esi, [ebp + 0x102]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [ebp + 0x164]
lea edi, [ebp + 0x134]
lea esi, [esp + 0x18]
call fcn.00529300
test eax, eax
jne 0x5294b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.0052c750
push eax
mov eax, dword [esp + 0x20]
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.00526870
add esp, 0x18
jmp 0x5294c0
push ebp
call fcn.00529280
add esp, 4
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
pop edi
pop ebp
xor ecx, esp
call fcn.004ff460
add esp, 0x10c
ret

Function at 0x5294e0
Capabilities:
Set socket configuration

Disassembly:
mov ecx, dword [esp + 8]
push esi
push edi
mov edi, dword [esp + 0xc]
mov esi, dword [edi]
push 4
lea eax, [esp + 0x10]
push eax
push 1
push 6
push ecx
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x529529
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0052c750
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.005267e0
add esp, 0x14
pop edi
pop esi
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.005267e0
add esp, 8
pop edi
pop esi
ret
Function at 0x529680
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x1d8], 0
je 0x52969d
push eax
call fcn.0051b460
add esp, 4
test eax, eax
jne 0x5296bd
xor eax, eax
ret
mov eax, dword [eax + 0x190]
cmp eax, 0xffffffff
je 0x52969a
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x5296bd
ret
mov eax, 1
ret