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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x51bfc0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x45ea98
cmp word [ebx], dx
jne 0x45ea98
or byte [eax + edi + 0x28], 4
jmp 0x45ea9d
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x45ec00
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x45ebe0
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x45eade
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x45eb14
cmp eax, edx
jae 0x45eb22
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x45eab9
jmp 0x45ec00
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45ebdb
cmp dword [ebp - 0x18], 0
je 0x45ebdb
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x51bfc0]
test byte [eax + edi + 0x28], 0x48
je 0x45ebb1
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x45eb75
mov word [esi], cx
jmp 0x45ebac
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x51bfc0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x51bfc0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x51bfc0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x45ec00
pop eax
cmp word [ebp - 4], ax
jne 0x45ebc1
cmp esi, ebx
jne 0x45ebc1
mov word [esi], ax
jmp 0x45ebfd
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0045ede6
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x45ec00
push 0xd
pop eax
jmp 0x45ebbc
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x51bfc0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x45ebfa
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x45ec00
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4603f0
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 4], 0
je 0x460417
push 1
lea eax, [esp + 0x10]
push eax
push esi
call fcn.00428a40
mov dword [esp + 4], eax
jmp 0x460431
push 0
lea eax, [esp + 8]
push eax
push 1
lea eax, [esp + 0x18]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 4]
cmp eax, 1
jne 0x4604e8
mov cl, byte [esp + 0xc]
test cl, cl
js 0x460456
mov eax, dword [esp + 0x10]
pop esi
mov byte [eax], cl
mov byte [eax + 1], 0
mov eax, 1
pop ecx
ret 8
mov al, cl
and al, 0xe0
push edi
cmp al, 0xc0
jne 0x460466
mov edi, 2
jmp 0x460482
mov al, cl
and al, 0xf0
cmp al, 0xe0
jne 0x460475
mov edi, 3
jmp 0x460482
mov al, cl
and al, 0xf8
cmp al, 0xf0
jne 0x4604d4
mov edi, 4
mov eax, dword [esp + 0x14]
push ebx
lea ebx, [edi - 1]
mov byte [eax], cl
inc eax
cmp dword [esi + 4], 0
je 0x4604ae
push ebx
push eax
push esi
call fcn.00428a40
mov ecx, eax
xor eax, eax
cmp ecx, ebx
pop ebx
setne al
dec eax
and eax, edi
pop edi
pop esi
pop ecx
ret 8
push 0
lea ecx, [esp + 0x10]
push ecx
push ebx
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0xc]
xor eax, eax
cmp ecx, ebx
pop ebx
setne al
dec eax
and eax, edi
pop edi
pop esi
pop ecx
ret 8
mov eax, dword [esp + 0x14]
pop edi
pop esi
mov word [eax], 0x3f
mov eax, 1
pop ecx
ret 8
xor eax, eax
pop esi
pop ecx
ret 8

Function at 0x4606cf
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x46070e
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x46070e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x46070e
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x46070e
cmp dword [ecx + 0x74], 0xe
jbe 0x46070e
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x463eae
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x518f00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.0042affc
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.0042affc
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x463f25
cmp word [ecx], dx
je 0x463f25
mov eax, dword [0x4f4e8c]
push edi
dec eax
push eax
push 0x4f4d78
call fcn.0046409e
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x463f98
cmp word [eax], dx
je 0x463f98
mov eax, dword [edi]
test eax, eax
je 0x463f49
cmp word [eax], dx
je 0x463f49
lea eax, [ebp - 0x10]
push eax
call fcn.004640ff
jmp 0x463f52
lea eax, [ebp - 0x10]
push eax
call fcn.004643ed
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x463fc2
mov eax, dword [0x4f4d74]
push dword [ebp - 0x14]
dec eax
push eax
push 0x4f4a68
call fcn.0046409e
add esp, 0xc
test al, al
je 0x463fc2
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x463f8d
cmp word [eax], di
je 0x463f8d
lea eax, [ebp - 0x10]
push eax
call fcn.004640ff
pop ecx
jmp 0x463fc4
lea eax, [ebp - 0x10]
push eax
call fcn.004643ed
jmp 0x463f8a
mov eax, dword [edi]
test eax, eax
je 0x463faf
cmp word [eax], dx
je 0x463faf
lea eax, [ebp - 0x10]
push eax
call fcn.00464521
pop ecx
jmp 0x463fc2
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x46408d
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.00464613
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x46408d
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x46408d
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x46408d
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x46401a
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.0042ba8f
test ebx, ebx
je 0x464088
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.0042ba8f
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x46408d
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x46408d
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.004bc88c
add esp, 0x10
xor eax, eax
inc eax
jmp 0x46408f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042f6af
leave
ret
Function at 0x464719
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.0042affc
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x464788
cmp esi, dword [ebp - 4]
je 0x464783
cmp dword [ebp + 0xc], 0
je 0x464783
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x464760
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.004647e2
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x46478a
xor eax, eax
inc eax
jmp 0x46478a
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x464810
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x46483d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x46483d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x483420
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov ebx, dword [eax + 0xa4]
push edi
mov dword [esp + 0x24], ebx
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x20], eax
push dword [eax + 0x10]
call fcn.00436b20
mov ecx, edx
mov dword [esp + 0x1c], eax
add esp, 4
mov dword [esp + 0x14], ecx
test ecx, ecx
jg 0x483464
jl 0x48345c
cmp eax, 0x40
jae 0x483464
mov ebp, eax
mov dword [esp + 0x10], eax
jmp 0x48346d
mov ebp, 0x40
mov dword [esp + 0x10], ebp
mov eax, dword [ebx + 0x154]
mov ecx, dword [esp + 0x34]
test eax, eax
jne 0x483485
cmp ecx, ebp
jb 0x483485
mov edi, dword [esp + 0x30]
jmp 0x4834c2
cmp eax, ebp
jge 0x4834bc
mov esi, 0x40
sub esi, eax
cmp esi, ecx
cmova esi, ecx
add eax, 0x114
push esi
push dword [esp + 0x34]
add eax, ebx
push eax
call fcn.004095d0
add dword [ebx + 0x154], esi
add esp, 0xc
cmp dword [ebx + 0x154], ebp
jl 0x483618
lea edi, [ebx + 0x114]
and dword [ebx + 0x110], 0xfffffffe
mov eax, dword [edi]
cmp eax, dword [0x4f5fe0]
jne 0x483618
mov eax, dword [edi + 4]
cmp eax, dword [0x4f5fe4]
jne 0x483618
movzx ebx, byte [edi + 0xb]
movzx eax, byte [edi + 0xa]
shl ebx, 8
or ebx, eax
movzx eax, byte [edi + 9]
shl ebx, 8
or ebx, eax
movzx eax, byte [edi + 8]
shl ebx, 8
or ebx, eax
cmp ebx, 0x18
jb 0x483618
cmp byte [edi + 0xc], 4
jne 0x483618
mov cl, byte [edi + 0xd]
mov byte [esp + 0x2c], cl
lea eax, [ecx - 7]
cmp al, 0x17
ja 0x483618
xor eax, eax
movzx esi, cl
xor edx, edx
mov ecx, esi
bts eax, ecx
cmp ecx, 0x20
cmovae edx, eax
xor eax, edx
cmp ecx, 0x40
cmovae edx, eax
add eax, ebx
adc edx, 0
sub eax, 1
sbb edx, 0
call fcn.00428700
cmp dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
lea ebp, [eax*4 + 0x14]
jl 0x483618
jg 0x483576
cmp dword [esp + 0x18], ebp
jb 0x483618
mov ecx, dword [esp + 0x10]
lea esi, [edi + 0x10]
add ecx, edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x10], ecx
test edi, edi
je 0x4835fb
nop dword [eax + eax]
lea eax, [esi + 8]
cmp eax, ecx
ja 0x4835fb
movzx edx, byte [esi + 3]
movzx eax, byte [esi + 2]
shl edx, 8
or edx, eax
movzx eax, byte [esi + 1]
shl edx, 8
or edx, eax
movzx eax, byte [esi]
shl edx, 8
or edx, eax
cmp edx, ebp
jne 0x483618
movzx eax, byte [esi + 7]
add esi, 4
shl eax, 8
movzx ecx, byte [esi + 2]
or eax, ecx
movzx ecx, byte [esi + 1]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi]
shl eax, 8
or eax, ecx
cmp eax, edx
jb 0x483618
xor ecx, ecx
cmp ecx, dword [esp + 0x14]
jg 0x483618
jl 0x4835ee
cmp eax, dword [esp + 0x18]
ja 0x483618
mov ecx, dword [esp + 0x10]
sub eax, edx
add ebp, eax
sub edi, 1
jne 0x483590
mov eax, dword [esp + 0x20]
mov cl, byte [esp + 0x2c]
mov dword [eax + 0x78], ebx
mov byte [eax + 0x74], 4
mov byte [eax + 0x75], cl
mov eax, dword [esp + 0x24]
and dword [eax + 0x110], 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x497550
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
sub esp, 0x30
push esi
mov esi, dword [sym.imp.WS2_32.dll_socket]
push edi
push 6
push 1
push 2
mov dword [esp + 0x18], 0x10
mov dword [esp + 0x14], 1
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x497582
pop edi
or eax, eax
pop esi
add esp, 0x30
ret
push ebx
mov eax, 2
mov dword [esp + 0x1c], 0
push 0x7f000001
mov dword [esp + 0x24], 0
mov word [esp + 0x18], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
xor eax, eax
push 4
mov word [esp + 0x1a], ax
lea eax, [esp + 0x10]
push eax
push 4
push 0xffff
push edi
mov dword [ebx + 4], 0xffffffff
mov dword [ebx], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x497715
push 0x10
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x497715
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x497715
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x497715
push 0
push 1
push 2
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x497715
push 0x10
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x497715
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
je 0x497715
push ebx
push 0x502708
lea eax, [esp + 0x2c]
push 0xc
push eax
call fcn.00498ef0
lea esi, [esp + 0x34]
add esp, 0x10
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x497682
push 0
sub esi, ecx
lea eax, [esp + 0x28]
push esi
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x497715
push 0
push 0xc
lea eax, [esp + 0x38]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jne 0x497715
lea ecx, [esp + 0x24]
lea edx, [esp + 0x30]
sub esi, 4
jb 0x4976d3
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4976d8
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4976c2
cmp esi, 0xfffffffc
je 0x497705
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x497715
cmp esi, 0xfffffffd
je 0x497705
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x497715
cmp esi, 0xfffffffe
je 0x497705
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x497715
cmp esi, 0xffffffff
je 0x497705
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x497715
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x30
ret
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
push edi
call esi
push dword [ebx]
call esi
push dword [ebx + 4]
call esi
pop ebx
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x30
ret
Function at 0x49b750
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebx
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [eax], ebx
lea eax, [esp + 8]
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x49b904
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
test edi, edi
je 0x49b8ed
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x49b79f
lea ebp, [eax + 0xe]
jmp 0x49b7ab
cmp eax, 0x17
jne 0x49b85a
lea ebp, [eax + 5]
cmp dword [edi + 0x18], 0
je 0x49b85a
mov eax, dword [edi + 0x10]
test eax, eax
je 0x49b85a
cmp eax, ebp
jb 0x49b85a
push 0x20
call dword [0x518cc0]
mov esi, eax
add esp, 4
test esi, esi
je 0x49b8e2
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 8]
mov dword [esi + 8], eax
mov eax, dword [edi + 0xc]
push ebp
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ebp
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
call dword [0x518cc0]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x49b8d1
push ebp
push dword [edi + 0x18]
push eax
call fcn.004095d0
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x49b845
push eax
call dword [0x518ccc]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x49b8b7
test ebx, ebx
jne 0x49b84b
mov ebx, esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x49b856
mov dword [eax + 0x1c], esi
mov dword [esp + 0x10], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x49b792
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x49b878
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebp, ebp
je 0x49b8e9
test ebx, ebx
je 0x49b8a5
push dword [ebx + 0x18]
call dword [0x518cc4]
push dword [ebx + 0x14]
call dword [0x518cc4]
mov esi, dword [ebx + 0x1c]
push ebx
call dword [0x518cc4]
add esp, 0xc
mov ebx, esi
test esi, esi
jne 0x49b880
mov eax, dword [esp + 0x2c]
xor ebx, ebx
pop edi
pop esi
mov dword [eax], ebx
mov eax, ebp
pop ebp
pop ebx
add esp, 0xc
ret
push dword [esi + 0x18]
mov ebp, 8
call dword [0x518cc4]
push esi
call dword [0x518cc4]
add esp, 8
jmp 0x49b869
push esi
mov ebp, 8
call dword [0x518cc4]
add esp, 4
jmp 0x49b869
mov ebp, 8
jmp 0x49b869
test ebx, ebx
jne 0x49b8f9
mov ebp, 0x2af9
push ebp
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
mov dword [eax], ebx
mov eax, ebp
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x49c220
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1000
call fcn.0045f620
push dword [esp + 0x1004]
call fcn.004c71e7
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x49c26c
push 0x1000
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x49c26c
lea eax, [esp]
push eax
call dword [0x518ccc]
add esp, 4
add esp, 0x1000
ret
xor eax, eax
add esp, 0x1000
ret
Function at 0x49c7b0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x518f00]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x218]
push eax
push esi
mov dword [esi + 0x170], 0
call fcn.004ca5a0
add esp, 8
test eax, eax
jne 0x49c963
mov edx, dword [ebp - 0x218]
mov eax, dword [esi + 0x164]
imul ecx, edx, 0x3e8
test eax, eax
push ebx
push edi
mov edi, 0x3e8
mov dword [ebp - 0x21c], eax
mov eax, dword [esi + 0x64]
cmove ecx, edi
test eax, eax
jle 0x49c878
test edx, edx
je 0x49c81c
cmp ecx, eax
jle 0x49c878
push 0
call fcn.0049a69d
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edx
push eax
call fcn.004ca55a
fmul qword [0x4f6b50]
add esp, 0x14
mov ecx, dword [esi + 0x64]
fstp qword [ebp - 0x214]
cvttsd2si eax, qword [ebp - 0x214]
cmp eax, ecx
jle 0x49c86f
push str.API_timeout_expired
push 0xfffffffffffffff7
push esi
call fcn.004ca710
add esp, 0xc
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f6af
mov esp, ebp
pop ebp
ret
sub ecx, eax
mov ebx, 1
jmp 0x49c87f
xor ebx, ebx
test ecx, ecx
setg bl
mov eax, 0x10624dd3
xor edi, edi
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x214], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x210], eax
test cl, 1
je 0x49c8d5
mov eax, dword [esi + 0x15c]
lea edx, [ebp - 0x108]
mov dword [ebp - 0x104], eax
mov dword [ebp - 0x108], 1
jmp 0x49c8d7
xor edx, edx
test cl, 2
je 0x49c8f8
mov eax, dword [esi + 0x15c]
lea edi, [ebp - 0x20c]
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x20c], 1
xor ecx, ecx
lea eax, [ebp - 0x214]
test ebx, ebx
cmove eax, ecx
push eax
mov eax, dword [esi + 0x15c]
push ecx
push edi
push edx
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x49c93c
push str.Timed_out_waiting_on_socket
push 0xfffffffffffffff7
push esi
call fcn.004ca710
add esp, 0xc
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f6af
mov esp, ebp
pop ebp
ret
jns 0x49c95f
push str.Error_waiting_on_socket
push 0xfffffffffffffff7
push esi
call fcn.004ca710
add esp, 0xc
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f6af
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0042f6af
mov esp, ebp
pop ebp
ret
Function at 0x4a4bf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0x14]
mov ecx, dword [edi]
cmp ecx, ebx
jae 0x4a4c5b
mov esi, dword [ebp + 8]
lea eax, [esi + 0x34]
nop dword [eax + eax]
cmp dword [esi + 0x4c], 0
mov edx, dword [esi + 0x48]
jne 0x4a4c32
push eax
lea eax, [ebp + 0x14]
push eax
mov eax, ebx
sub eax, ecx
push eax
mov eax, dword [ebp + 0xc]
add eax, ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4a4c40
push 0
lea ecx, [ebp + 0x14]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, eax
mov eax, dword [ebp + 0x14]
add dword [edi], eax
test ecx, ecx
je 0x4a4c68
mov dword [esi + 0x4c], 0
lea eax, [esi + 0x34]
mov ecx, dword [edi]
cmp ecx, ebx
jb 0x4a4c10
mov dword [edi], 0
mov eax, ecx
pop edi
pop esi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x4c], 0
jne 0x4a4c83
cmp eax, 0x3e5
je 0x4a4c8a
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ebp
ret
cmp eax, 0x3e4
jne 0x4a4c7b
pop edi
mov dword [esi + 0x4c], 1
mov eax, 0xffffffdb
pop esi
pop ebx
pop ebp
ret

Function at 0x4a4ca0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0x14]
mov ecx, dword [edi]
cmp ecx, ebx
jae 0x4a4d0b
mov esi, dword [ebp + 8]
lea eax, [esi + 0x34]
nop dword [eax + eax]
cmp dword [esi + 0x4c], 0
mov edx, dword [esi + 0x48]
jne 0x4a4ce2
push eax
lea eax, [ebp + 0x14]
push eax
mov eax, ebx
sub eax, ecx
push eax
mov eax, dword [ebp + 0xc]
add eax, ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x4a4cf0
push 0
lea ecx, [ebp + 0x14]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, eax
mov eax, dword [ebp + 0x14]
add dword [edi], eax
test ecx, ecx
je 0x4a4d18
mov dword [esi + 0x4c], 0
lea eax, [esi + 0x34]
mov ecx, dword [edi]
cmp ecx, ebx
jb 0x4a4cc0
mov dword [edi], 0
mov eax, ecx
pop edi
pop esi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x4c], 0
jne 0x4a4d33
cmp eax, 0x3e5
je 0x4a4d3a
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ebp
ret
cmp eax, 0x3e4
jne 0x4a4d2b
pop edi
mov dword [esi + 0x4c], 1
mov eax, 0xffffffdb
pop esi
pop ebx
pop ebp
ret
Function at 0x4b0660
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x84
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x98]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0x80
push eax
mov ebp, dword [edi + 0x1c4]
or esi, 0xffffffff
mov ebx, dword [edi]
push ebp
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b06b4
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
push ebp
push edi
call fcn.0045b0e0
add esp, 8
cmp esi, 0xffffffff
jne 0x4b06e1
push str.Error_accept__ing_server_connect
push ebx
call fcn.004599d0
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
push str.Connection_accepted_from_server_n
push ebx
call fcn.00459910
push 1
push esi
mov byte [edi + 0x2b0], 0
mov dword [edi + 0x1c4], esi
call fcn.00497740
add esp, 0x10
mov byte [edi + 0x1d1], 1
cmp dword [ebx + 0x610], 0
je 0x4b0757
push 1
push ebx
call fcn.00448390
mov eax, dword [ebx + 0x610]
push 1
push esi
push dword [ebx + 0x614]
call eax
push 0
push ebx
mov esi, eax
call fcn.00448390
add esp, 0x1c
test esi, esi
je 0x4b0757
push edi
call fcn.004b05b0
add esp, 4
mov eax, 0x2a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x84
ret