joyce8/EMBER2024-capa huggingface dataset:
Function at 0x497570
Capabilities:
Check if file exists
Delete file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4da108
push eax
mov dword fs:[0], esp
mov eax, dword [0x508ef4]
sub esp, 0x14
push ebx
push ebp
push esi
xor esi, esi
cmp eax, esi
push edi
jne 0x4975a1
call fcn.004103d0
mov dword [0x508ef4], eax
cmp eax, 0xc
jne 0x497730
lea eax, [esp + 0x1c]
push eax
call fcn.004962a0
add esp, 4
push 0x3d
push 0x4efdb0
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x38], esi
call fcn.004038e0
mov edx, dword [0x507fec]
mov eax, dword [edx + 0xc]
mov ecx, 0x507fec
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x34]
mov byte [esp + 0x2c], 1
mov ecx, dword [ebx]
mov edx, dword [esp + 0x1c]
push ecx
push edx
push str._s_s.lnk
lea edi, [esp + 0x24]
call fcn.00404190
mov eax, dword [esp + 0x24]
mov esi, dword [ebx + 0x1c]
lea edi, [ebx + 0x1c]
lea ebp, [eax - 0x10]
sub esi, 0x10
add esp, 0xc
cmp ebp, esi
je 0x497668
cmp dword [esi + 0xc], 0
jl 0x497655
mov ecx, dword [ebp]
cmp ecx, dword [esi]
jne 0x497655
mov eax, ebp
call fcn.00403c80
mov dword [esp + 0x20], eax
lea eax, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [eax], edx
dec edx
test edx, edx
jg 0x49764a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [esp + 0x20]
add eax, 0x10
mov dword [edi], eax
jmp 0x497664
mov ebx, dword [eax - 0xc]
push eax
mov eax, edi
call fcn.00403b90
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esp + 0x14]
push ecx
call fcn.004963f0
add esp, 4
lea edx, [esp + 0x14]
push edx
mov ecx, ebx
mov byte [esp + 0x30], 2
call fcn.004964c0
mov esi, eax
add esp, 4
test esi, esi
je 0x4976c4
mov ecx, dword [ebx]
push ecx
push str._s.lnk
lea edi, [esp + 0x1c]
call fcn.004041b0
mov edx, dword [esp + 0x1c]
add esp, 8
lea ecx, [esp + 0x20]
call fcn.00497510
mov edx, dword [esp + 0x14]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [esp + 0x2c], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4976e9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or edx, 0xffffffff
lea ecx, [ebp + 0xc]
mov byte [esp + 0x2c], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x497708
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x497730
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
pop edi
mov eax, esi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret
Function at 0x4977d6
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file

Disassembly:
push 0xffffffffffffffff
push 0x4d9418
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
je 0x497816
test al, 0x10
je 0x497816
mov eax, dword [esi + 8]
push eax
call edi
test eax, eax
je 0x497816
mov ecx, dword [esi + 8]
call fcn.0048e1d0
pop edi
pop esi
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret
cmp dword [esi + 0xc], 0
je 0x497830
mov eax, dword [esi + 8]
push eax
call fcn.0040ef60
add esp, 4
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esi + 8]
push eax
call edi
test eax, eax
je 0x4978c8
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4978c8
mov eax, dword [0x507fec]
mov edx, dword [eax + 0xc]
mov ecx, 0x507fec
call edx
add eax, 0x10
mov dword [esp + 8], eax
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
mov eax, dword [esi + 8]
push eax
push str._s__d_del
lea edi, [esp + 0x14]
call fcn.00404190
mov esi, dword [esi + 8]
mov edi, dword [esp + 0x14]
add esp, 0xc
push 1
push edi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
call esi
test eax, eax
je 0x4978a4
push 4
push 0
push edi
call esi
lea eax, [edi - 0x10]
mov dword [esp + 0x14], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4978c8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x49b530
Capabilities:
Encode data using xor

Disassembly:
mov dword [esp + 0x14], edi
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
mov esi, dword [edi + 0xf0]
lea esi, [esi + esi - 2]
lea esi, [edi + esi*8]
mov dword [esp + 0x18], esi
mov esi, eax
and esi, 0xff
mov esi, dword [ebp + esi*8]
movzx edi, bh
xor esi, dword [ebp + edi*8 + 3]
mov edi, ecx
shr edi, 0x10
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
mov edi, edx
shr edi, 0x18
xor esi, dword [ebp + edi*8 + 1]
mov dword [esp + 4], esi
mov esi, ebx
and esi, 0xff
shr ebx, 0x10
mov esi, dword [ebp + esi*8]
movzx edi, ch
xor esi, dword [ebp + edi*8 + 3]
mov edi, edx
shr edi, 0x10
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
mov edi, eax
shr edi, 0x18
xor esi, dword [ebp + edi*8 + 1]
mov dword [esp + 8], esi
mov esi, ecx
and esi, 0xff
shr ecx, 0x18
mov esi, dword [ebp + esi*8]
movzx edi, dh
xor esi, dword [ebp + edi*8 + 3]
mov edi, eax
shr edi, 0x10
and edx, 0xff
and edi, 0xff
xor esi, dword [ebp + edi*8 + 2]
movzx edi, bh
xor esi, dword [ebp + edi*8 + 1]
mov edi, dword [esp + 0x14]
mov edx, dword [ebp + edx*8]
movzx eax, ah
xor edx, dword [ebp + eax*8 + 3]
mov eax, dword [esp + 4]
and ebx, 0xff
xor edx, dword [ebp + ebx*8 + 2]
mov ebx, dword [esp + 8]
xor edx, dword [ebp + ecx*8 + 1]
mov ecx, esi
add edi, 0x10
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
cmp edi, dword [esp + 0x18]
mov dword [esp + 0x14], edi
jb 0x49b550
mov esi, eax
and esi, 0xff
mov esi, dword [ebp + esi*8 + 2]
and esi, 0xff
movzx edi, bh
mov edi, dword [ebp + edi*8]
and edi, 0xff00
xor esi, edi
mov edi, ecx
shr edi, 0x10
and edi, 0xff
mov edi, dword [ebp + edi*8]
and edi, 0xff0000
xor esi, edi
mov edi, edx
shr edi, 0x18
mov edi, dword [ebp + edi*8 + 2]
and edi, 0xff000000
xor esi, edi
mov dword [esp + 4], esi
mov esi, ebx
and esi, 0xff
shr ebx, 0x10
mov esi, dword [ebp + esi*8 + 2]
and esi, 0xff
movzx edi, ch
mov edi, dword [ebp + edi*8]
and edi, 0xff00
xor esi, edi
mov edi, edx
shr edi, 0x10
and edi, 0xff
mov edi, dword [ebp + edi*8]
and edi, 0xff0000
xor esi, edi
mov edi, eax
shr edi, 0x18
mov edi, dword [ebp + edi*8 + 2]
and edi, 0xff000000
xor esi, edi
mov dword [esp + 8], esi
mov esi, ecx
and esi, 0xff
shr ecx, 0x18
mov esi, dword [ebp + esi*8 + 2]
and esi, 0xff
movzx edi, dh
mov edi, dword [ebp + edi*8]
and edi, 0xff00
xor esi, edi
mov edi, eax
shr edi, 0x10
and edx, 0xff
and edi, 0xff
mov edi, dword [ebp + edi*8]
and edi, 0xff0000
xor esi, edi
movzx edi, bh
mov edi, dword [ebp + edi*8 + 2]
and edi, 0xff000000
xor esi, edi
mov edi, dword [esp + 0x14]
and edx, 0xff
mov edx, dword [ebp + edx*8 + 2]
and edx, 0xff
movzx eax, ah
mov eax, dword [ebp + eax*8]
and eax, 0xff00
xor edx, eax
mov eax, dword [esp + 4]
and ebx, 0xff
mov ebx, dword [ebp + ebx*8]
and ebx, 0xff0000
xor edx, ebx
mov ebx, dword [esp + 8]
mov ecx, dword [ebp + ecx*8 + 2]
and ecx, 0xff000000
xor edx, ecx
mov ecx, esi
add edi, 0x10
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
ret
Function at 0x49edd9
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x5030c0]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0049ed18
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.004a4620
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x49ee28
cmp dword [ebp - 0x1c], 5
jb 0x49ee40
jmp 0x49ee3c
cmp dword [ebp - 0x10], 1
jne 0x49ee40
cmp dword [ebp - 0x1c], 4
ja 0x49ee3c
jne 0x49ee40
cmp dword [ebp - 0x18], 0
jbe 0x49ee40
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4dca90
call fcn.0040fd10
test eax, eax
jge 0x49ee61
mov byte [0x508ee4], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004a460b
add ebp, 0x78
leave
ret

Function at 0x49f09a
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x508098], 0
push esi
jne 0x49f00d
call fcn.0049ef38
test eax, eax
je 0x49f050
mov eax, dword [0x508098]
cmp eax, 1
jne 0x49f02e
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x49f050
pop esi
ret
push eax
call dword [0x5080a0]
test eax, eax
jne 0x49f098
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x49f054
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x508098]
call dword [0x5080a0]
mov edi, eax
test edi, edi
je 0x49f07b
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x49f097
lea edi, [esi + 0xff0]
push esi
push dword [0x508098]
call dword [0x50809c]
add esi, 0x10
cmp esi, edi
jb 0x49f081
mov eax, esi
pop edi
pop esi
ret
jmp 0x49effa
Function at 0x4a003f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x4a007c
cmp dword [ebp + 0x14], edi
je 0x4a007c
cmp ecx, edi
jne 0x4a0083
call fcn.004a4d40
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.004a0879
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x4a0097
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x4a00b8
cmp ebx, 0xffffffff
je 0x4a00a7
push ebx
push edi
push ecx
call fcn.004a4620
add esp, 0xc
cmp esi, edi
je 0x4a0064
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x4a0064
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x4a00d4
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x4a00db
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x4a01cc
test word [esi + 0xc], 0x10c
je 0x4a012f
mov eax, dword [esi + 4]
test eax, eax
je 0x4a012f
jl 0x4a022d
cmp ebx, eax
mov edi, ebx
jb 0x4a0100
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x4a01d4
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0049f0e4
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x4a01c4
cmp ebx, dword [ebp - 0xc]
jb 0x4a019c
cmp dword [ebp - 0xc], 0
je 0x4a0159
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x4a014e
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x4a0155
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x4a0164
mov eax, SysReAllocString
cmp ebx, eax
ja 0x4a0164
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x4a0200
push eax
push dword [ebp - 8]
push esi
call fcn.004a1d35
pop ecx
push eax
call fcn.004aa754
add esp, 0xc
test eax, eax
je 0x4a023f
cmp eax, 0xffffffff
je 0x4a022d
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x4a01c4
push esi
call fcn.004aa073
cmp eax, 0xffffffff
pop ecx
je 0x4a0231
cmp dword [ebp - 4], 0
je 0x4a0200
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x4a00e3
mov eax, dword [ebp + 0x14]
jmp 0x4a007e
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x4a01eb
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.004a4620
add esp, 0xc
call fcn.004a4d40
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x4a0074
cmp dword [ebp + 0xc], 0xffffffff
je 0x4a0216
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.004a4620
add esp, 0xc
call fcn.004a4d40
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x4a0074
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x4a007e
or dword [esi + 0xc], 0x10
jmp 0x4a0231
Function at 0x4a3369
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x4a3396
call fcn.004a4d53
mov dword [eax], esi
call fcn.004a4d40
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.004a0879
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x4a3372
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4a33c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004a4d66
pop ecx
call fcn.004a4d40
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x4a33ec
test al, 1
je 0x4a33ec
test byte [esp + 0xc], 2
je 0x4a33ec
call fcn.004a4d53
mov dword [eax], 5
call fcn.004a4d40
mov dword [eax], 0xd
jmp 0x4a33bc
xor eax, eax
pop esi
ret

Function at 0x4a460b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5030c0]
jne 0x4a4615
repz ret
jmp fcn.004b1ca3

Function at 0x4a774f
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x503380]
je 0x4a776a
inc edi
cmp edi, 0x17
jb 0x4a775b
cmp edi, 0x17
jae 0x4a78ea
push ebp
push 3
call fcn.004b24c3
cmp eax, 1
pop ecx
je 0x4a78b6
push 3
call fcn.004b24c3
test eax, eax
pop ecx
jne 0x4a779e
cmp dword [0x5030b4], 1
je 0x4a78b6
cmp ebx, 0xfc
je 0x4a78e9
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x508280
push ebp
call fcn.004a431e
add esp, 0xc
test eax, eax
je 0x4a77d4
push esi
push esi
push esi
push esi
push esi
call fcn.004a077d
add esp, 0x14
push 0x104
mov esi, 0x508299
push esi
push 0
mov byte [0x50839d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4a7818
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004a431e
add esp, 0xc
test eax, eax
je 0x4a7818
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004a077d
add esp, 0x14
push esi
call fcn.004a95a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4a785d
push esi
call fcn.004a95a0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x508594
push 0x4dd1d4
sub ecx, eax
push ecx
push eax
call fcn.004a2817
add esp, 0x14
test eax, eax
je 0x4a785d
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.004a077d
add esp, 0x14
jmp 0x4a785f
xor esi, esi
push 0x4dd1d0
push ebx
push ebp
call fcn.004b2452
add esp, 0xc
test eax, eax
je 0x4a787f
push esi
push esi
push esi
push esi
push esi
call fcn.004a077d
add esp, 0x14
push dword [edi*8 + 0x503384]
push ebx
push ebp
call fcn.004b2452
add esp, 0xc
test eax, eax
je 0x4a78a1
push esi
push esi
push esi
push esi
push esi
call fcn.004a077d
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004b2295
add esp, 0xc
jmp 0x4a78e9
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4a78e9
cmp ebp, 0xffffffff
je 0x4a78e9
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x503384]
push dword [esi]
call fcn.004a95a0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4b2295
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004a6742
xor ebx, ebx
cmp dword [0x508c58], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4b236b
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4b244b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4b244b
push eax
call fcn.004a66d4
mov dword [esp], 0x4ddd98
push edi
mov dword [0x508c58], eax
call esi
push eax
call fcn.004a66d4
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x508c5c], eax
call esi
push eax
call fcn.004a66d4
mov dword [0x508c60], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004a2973
test eax, eax
pop ecx
pop ecx
je 0x4b2339
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004a077d
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4b236b
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004a66d4
cmp eax, ebx
pop ecx
mov dword [0x508c68], eax
je 0x4b236b
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004a66d4
pop ecx
mov dword [0x508c64], eax
mov eax, dword [0x508c64]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4b23f0
cmp dword [0x508c68], ecx
je 0x4b23f0
push eax
call fcn.004a674b
push dword [0x508c68]
mov esi, eax
call fcn.004a674b
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4b23f0
cmp edi, ebx
je 0x4b23f0
call esi
cmp eax, ebx
je 0x4b23bd
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4b23bd
test byte [ebp - 0x18], 1
jne 0x4b23f0
lea eax, [ebp - 0x10]
push eax
call fcn.004a29aa
test eax, eax
pop ecx
je 0x4b23d8
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004a077d
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4b23e7
or dword [ebp + 0x10], 0x200000
jmp 0x4b242b
or dword [ebp + 0x10], 0x40000
jmp 0x4b242b
mov eax, dword [0x508c5c]
cmp eax, dword [ebp - 8]
je 0x4b242b
push eax
call fcn.004a674b
cmp eax, ebx
pop ecx
je 0x4b242b
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4b242b
mov eax, dword [0x508c60]
cmp eax, dword [ebp - 8]
je 0x4b242b
push eax
call fcn.004a674b
cmp eax, ebx
pop ecx
je 0x4b242b
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x508c58]
call fcn.004a674b
cmp eax, ebx
pop ecx
je 0x4b244b
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4b244d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4bb2a4
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x5030c0]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4bb2e5
cmp byte [ebp - 0x194], 2
jne 0x4bb2df
cmp byte [ebp - 0x193], 2
je 0x4bb2e8
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a460b
leave
ret
Function at 0x4c2f97
Capabilities:
Receive data
Receive data on socket

Disassembly:
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4c2fc6
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 0x4c30e7
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4c3107
push dword [esi + 0xf4]
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4c3140
cmp eax, 2
jg 0x4c3140
push dword [esi + 0xf0]
imul eax, eax, 3
push 1
add eax, 0x4dfd48
push 2
push eax
call fcn.004a227e
push dword [esi + 0xf0]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.004a227e
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x12c]
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp + 0x18]
and dword [edi], 0
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4c3378
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x4c3352
and dword [ebp + 8], 0
mov dword [edi], 0x51
jmp 0x4c3377
push ebx
push esi
call fcn.004cc4b7
push eax
push str.Send_failure:__s
push dword [esi]
call fcn.004c3272
mov eax, dword [esi]
mov dword [eax + 0x855c], ebx
add esp, 0x14
mov dword [edi], 0x37
pop ebx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret
Function at 0x4c3a27
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x5030c0]
xor eax, ebp
mov dword [ebp + 0x8c], eax
push ebx
push esi
mov esi, dword [ebp + 0x98]
cmp dword [esi + 0x198], 0
mov ebx, dword [esi]
push edi
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x80], ebx
jne 0x4c3b44
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x74]
push eax
push dword [ebp + 0x9c]
mov edi, 0x80
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4c3aa4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004cc4b7
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004c3272
add esp, 0x18
jmp 0x4c3b4b
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x9c]
mov dword [ebp - 0x7c], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4c3ad7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004cc4b7
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4c3a96
lea edi, [esi + 0xc8]
lea ebx, [esi + 0x9a]
lea esi, [ebp - 0x74]
call fcn.004c39ee
test eax, eax
jne 0x4c3b0c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004cc4b7
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x80]
jmp 0x4c3a97
mov eax, dword [ebp - 0x78]
lea edi, [eax + 0xfc]
lea ebx, [eax + 0xcc]
lea esi, [ebp + 0xc]
call fcn.004c39ee
test eax, eax
jne 0x4c3b41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push dword [ebp - 0x78]
call fcn.004cc4b7
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x4c3b07
mov esi, dword [ebp - 0x78]
push esi
call fcn.004c399f
pop ecx
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a460b
add ebp, 0x90
leave
ret

Function at 0x4c3b63
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x308]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4c3ba8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004cc4b7
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004c31ff
add esp, 0x14
jmp 0x4c3bb5
push str.TCP_NODELAY_set_n
push esi
call fcn.004c31ff
pop ecx
pop ecx
pop esi
leave
ret
Function at 0x4c400c
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x520]
cmp eax, 0xffffffff
push esi
je 0x4c405f
mov ecx, dword [ecx + 0x514]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x4c405f
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x4c4039
mov dword [ecx], eax
cmp dword [eax + 0x144], 0
mov esi, dword [eax + 0x12c]
jne 0x4c405f
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4c405f
mov eax, esi
jmp 0x4c4062
or eax, 0xffffffff
pop esi
pop ebp
ret