joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401558
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
and dword [edi], 0
push dword [ebp + 8]
mov byte [eax], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x4015d1
cmp word [ebx + 8], 2
jne 0x4015ae
cmp word [ebx + 0xa], 4
jne 0x4015ae
mov esi, dword [ebx + 0xc]
jmp 0x4015a8
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.004014f5
test eax, eax
mov dword [edi], eax
je 0x4015cc
lea edi, [eax + 0x1c]
add esi, 4
mov eax, dword [esi]
test eax, eax
jne 0x40158c
mov esi, dword [ebp + 0x18]
push 0x400
push dword [ebx]
push esi
call fcn.0042dd90
add esp, 0xc
mov byte [esi + 0x400], 0
xor eax, eax
jmp 0x4015f7
push 8
pop eax
jmp 0x4015f7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, 0x2af9
sub ecx, eax
je 0x4015f7
dec ecx
je 0x4015f2
dec ecx
je 0x4015eb
dec ecx
jmp 0x4015f7
mov eax, 0x2afb
jmp 0x4015f7
mov eax, 0x2afa
pop edi
pop esi
pop ebx
pop ebp
ret 0x18

Function at 0x401ba8
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1b0]
sub esp, 0x230
cmp dword [0x45db58], 0
mov eax, dword [0x456d70]
mov dword [ebp + 0x1ac], eax
mov dword [ebp - 0x80], str.getaddrinfo
mov dword [ebp - 0x7c], 0x401783
mov dword [ebp - 0x78], str.getnameinfo
mov dword [ebp - 0x74], 0x4019fd
mov dword [ebp - 0x70], str.freeaddrinfo
mov dword [ebp - 0x6c], fcn.0040174a
jne 0x401cfd
push 0x104
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x401cf3
push ebx
push esi
push edi
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0xa0]
push eax
call fcn.0042dbd0
lea eax, [ebp + 0xa0]
push str.ws2_32
push eax
call fcn.0042dbe0
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0x10
lea eax, [ebp + 0xa0]
push eax
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x401c6a
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x401c66
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
jne 0x401cb6
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0xa0]
push eax
call fcn.0042dbd0
lea eax, [ebp + 0xa0]
push str.wship6
push eax
call fcn.0042dbe0
add esp, 0x10
lea eax, [ebp + 0xa0]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x401cf0
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x401cb2
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x401cf0
xor ebx, ebx
push dword [ebp + ebx*8 - 0x80]
push esi
call edi
test eax, eax
mov dword [ebp + ebx*8 - 0x7c], eax
je 0x401ccf
inc ebx
cmp ebx, 3
jl 0x401cb8
jmp 0x401cd8
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x401cf0
xor eax, eax
mov ecx, dword [ebp + eax - 0x7c]
mov dword [eax + 0x456124], ecx
add eax, 8
cmp eax, 0x18
jl 0x401cde
pop edi
pop esi
pop ebx
mov dword [0x45db58], 1
movzx eax, word [ebp + 0x1b8]
mov ecx, dword [ebp + 0x1ac]
mov eax, dword [eax*8 + 0x456124]
call fcn.0042d7f1
add ebp, 0x1b0
leave
ret 4
Function at 0x401ddb
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x456d70]
push ebx
xor ebx, ebx
cmp byte [0x45d800], bl
push edi
push ebx
mov dword [ebp - 4], eax
push ebx
jne 0x401e01
push 0x442f3c
jmp 0x401e06
push 0x442f38
push 0x45c9f0
push str.open
push dword [0x458f00]
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea eax, [ebp - 0x404]
push str.__c_taskkill__f__PID
push eax
call fcn.0042e20e
pop ecx
pop ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp + edi - 0x404]
push str._i__exit
push eax
call fcn.0042e20e
lea eax, [ebp - 0x404]
push eax
call fcn.0042d620
add esp, 0x10
push ebx
push ebx
mov byte [ebp + eax - 0x404], bl
lea eax, [ebp - 0x404]
push eax
push 0x442f08
push str.open
push dword [0x458f00]
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push ebx
call fcn.0042e553
int3
Function at 0x4032eb
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 8]
test edx, edx
jne 0x4032f6
xor eax, eax
ret
mov eax, dword [esp + 0xc]
cmp eax, 8
push ebx
push esi
mov esi, dword [esp + 0xc]
not esi
mov ecx, 0xff
jb 0x4033b9
push edi
mov edi, eax
shr edi, 3
xor ebx, ebx
mov bl, byte [edx]
sub eax, 8
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
inc edx
dec edi
jne 0x403316
pop edi
test eax, eax
je 0x4033d3
xor ebx, ebx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x441588]
inc edx
dec eax
jne 0x4033bd
mov eax, esi
pop esi
not eax
pop ebx
ret
Function at 0x40355d
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x403580
mov eax, 0x200
jmp 0x4036f5
mov ecx, dword [ebp - 0x4c]
xor eax, eax
push ebx
xor ebx, ebx
mov edx, ecx
inc eax
and edx, eax
push esi
mov dword [ebp - 8], ebx
je 0x403596
mov dword [ebp - 8], eax
test cl, 2
je 0x40359f
or dword [ebp - 8], 2
test cl, 4
je 0x4035a8
or dword [ebp - 8], 4
mov eax, ecx
and eax, 0x10
je 0x4035b3
or dword [ebp - 8], 0x10
test cl, 0x20
je 0x4035bc
or dword [ebp - 8], 0x20
cmp eax, ebx
je 0x4035c6
or byte [ebp - 5], 0x40
jmp 0x4035ca
or byte [ebp - 5], 0x80
or byte [ebp - 5], 1
cmp edx, ebx
jne 0x4035d6
or byte [ebp - 6], 0x80
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x28
mov dword [ebp - 0x10], eax
jbe 0x403671
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push edi
call esi
push ebx
lea eax, [ebp - 0xc]
push eax
push 2
lea eax, [ebp - 4]
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
push ebx
push ebx
push 0x24
push dword [ebp + 8]
call esi
push ebx
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call edi
cmp word [ebp - 4], 0x54ad
jne 0x403671
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x34]
cmp dword [ebp - 0x10], ecx
jbe 0x403671
push ebx
push ebx
push eax
push dword [ebp + 8]
call esi
push ebx
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call edi
mov eax, dword [ebp - 0x18]
cmp eax, 0x5a4d
je 0x40366d
cmp eax, 0x454e
je 0x40366d
cmp eax, 0x454c
je 0x40366d
cmp eax, 0x4550
jne 0x403671
or byte [ebp - 6], 0x40
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40367d
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x403689
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov esi, dword [ebp + 0x14]
cmp esi, ebx
je 0x4036c5
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
call fcn.004034da
push dword [ebp - 0x34]
mov dword [esi], eax
push dword [ebp - 0x38]
mov dword [esi + 4], edx
call fcn.004034da
push dword [ebp - 0x44]
mov dword [esi + 8], eax
push dword [ebp - 0x48]
mov dword [esi + 0xc], edx
call fcn.004034da
add esp, 0x18
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov esi, dword [ebp + 0x18]
cmp esi, ebx
je 0x4036f1
lea eax, [ebp - 6]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call fcn.004034fc
movzx eax, word [ebp - 4]
movzx ecx, word [ebp - 6]
shl eax, 0x10
add esp, 0x10
or eax, ecx
mov dword [esi], eax
pop esi
xor eax, eax
pop ebx
pop edi
leave
ret
Function at 0x4038bc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
cmp byte [esi + 0x2d], 0
push edi
mov edi, dword [ebp + 0xc]
je 0x403931
mov eax, dword [esi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x4038e8
cmp dword [esi + 0x40], edi
jae 0x4038e8
push eax
call fcn.0042d959
pop ecx
mov dword [esi + 0x3c], ebx
cmp dword [esi + 0x3c], ebx
jne 0x4038fd
lea eax, [edi + edi]
push eax
call fcn.0041c7ff
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x3c]
call fcn.0042cec0
add esp, 0xc
test edi, edi
jbe 0x40392e
mov eax, dword [esi + 0x3c]
movsx eax, byte [ebx + eax]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.004033f5
pop ecx
pop ecx
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x403910
mov edx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x403960
mov eax, dword [esi + 0x24]
lea ebx, [eax + edi]
cmp ebx, dword [esi + 0x28]
jb 0x40394c
mov dword [esi + 0x14], 0x30000
jmp 0x403982
push edi
push edx
add eax, ecx
push eax
call fcn.0042cec0
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
jmp 0x403984
mov eax, dword [esi + 4]
test eax, eax
je 0x40397b
push 0
lea ecx, [ebp + 8]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x403984
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x403c42
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov ecx, dword [esi + 0x84]
test ecx, ecx
push edi
je 0x403c98
mov eax, dword [esi + 0x8c]
mov edi, dword [esi + 0x88]
cmp eax, edi
jae 0x403cd4
sub edi, eax
cmp edi, dword [ebp + 0xc]
jbe 0x403c6d
mov edi, dword [ebp + 0xc]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0042cec0
add dword [esi + 0x8c], edi
add dword [esi + 0x74], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x78]
call fcn.004032eb
add esp, 0x18
mov dword [esi + 0x78], eax
mov eax, edi
jmp 0x403cd6
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x403ccd
push 0
lea ecx, [ebp + 0xc]
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403cd4
mov edi, dword [ebp + 0xc]
add dword [esi + 0x74], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x78]
call fcn.004032eb
add esp, 0xc
jmp 0x403c91
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebp
ret 8

Function at 0x4049ce
Capabilities:
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
mov edx, dword [ecx]
xor eax, eax
mov al, byte [esp + 8]
push esi
mov esi, 0xff
xor eax, edx
and eax, esi
mov eax, dword [eax*4 + 0x441588]
shr edx, 8
xor eax, edx
mov dword [ecx], eax
and eax, esi
add eax, dword [ecx + 4]
imul eax, eax, 0x8088405
lea edx, [eax + 1]
mov eax, dword [ecx + 8]
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x441588]
pop esi
mov dword [ecx + 8], eax
ret
Function at 0x404e67
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 0x404e9b
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 0x404e96
mov byte [esi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x404ec3
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x404eac
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x14]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0042cec0
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop esi
pop ebp
ret

Function at 0x405c1a
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x456d70]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
push edi
je 0x405c49
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x405c49
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [ebp + 0xc]
mov al, byte [edi]
test al, al
je 0x405ce3
push esi
mov esi, edi
mov ecx, edi
cmp al, 0x2f
je 0x405c63
cmp al, 0x5c
jne 0x405c65
mov esi, ecx
inc ecx
mov al, byte [ecx]
test al, al
jne 0x405c5b
cmp esi, edi
je 0x405c98
sub esi, edi
push esi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.0042cec0
lea eax, [ebp - 0x20c]
push eax
push ebx
mov byte [ebp + esi - 0x20c], 0
call fcn.00405c1a
add esp, 0x14
test ebx, ebx
mov byte [ebp - 0x108], 0
pop esi
je 0x405cb3
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.0042dbd0
pop ecx
pop ecx
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.0042dbe0
pop ecx
pop ecx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x405ce3
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.0042d7f1
leave
ret
Function at 0x407763
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebx
push esi
xor edx, edx
push edi
mov edi, dword [esp + 0x14]
inc edx
xor ebx, ebx
cmp edi, edx
jl 0x40777c
cmp edi, 8
jg 0x40777c
mov al, dl
jmp 0x40777e
xor al, al
mov esi, dword [esp + 0x10]
push str.bad_pack_level
push eax
push esi
call fcn.00401fcd
lea ecx, [esi + 0x6af70]
add esp, 0xc
cmp dword [ecx], ebx
lea eax, [esi + 0x6af78]
mov dword [eax], ebx
jne 0x4077ab
mov dword [eax], edx
mov dword [ecx], 0x10000
push 0x1fffc
lea eax, [esi + 0x4af70]
push ebx
push eax
mov dword [esi + 0x6af6c], ebx
call fcn.0042d760
mov eax, edi
shl eax, 3
movzx ecx, word [eax + 0x44153a]
mov dword [esi + 0x6af98], ecx
movzx ecx, word [eax + 0x441538]
mov dword [esi + 0x6af9c], ecx
movzx ecx, word [eax + 0x44153c]
mov dword [esi + 0x6afa0], ecx
movzx eax, word [eax + 0x44153e]
add esp, 0xc
cmp edi, 2
mov dword [esi + 0x6af94], eax
jg 0x40780d
mov eax, dword [esp + 0x18]
or byte [eax], 4
jmp 0x407819
cmp edi, 8
jl 0x407819
mov eax, dword [esp + 0x18]
or byte [eax], 2
push 0x10000
lea edi, [esi + 0x1af70]
push edi
push esi
mov dword [esi + 0x6af84], ebx
mov dword [esi + 0x6af74], ebx
call dword [esi + 0xc]
add esp, 0xc
cmp eax, ebx
mov dword [esi + 0x6af90], eax
je 0x407883
cmp eax, 0xffffffff
je 0x407883
cmp eax, 0x106
mov dword [esi + 0x6af8c], ebx
jae 0x40785b
push esi
call fcn.004029f9
pop ecx
mov dword [esi + 0x6af7c], ebx
movzx eax, byte [edi + ebx]
mov ecx, dword [esi + 0x6af7c]
shl ecx, 5
xor eax, ecx
and eax, 0x7fff
inc ebx
cmp ebx, 2
mov dword [esi + 0x6af7c], eax
jb 0x407861
jmp 0x407893
mov dword [esi + 0x6af8c], 1
mov dword [esi + 0x6af90], ebx
pop edi
pop esi
pop ebx
ret

Function at 0x408aba
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x408b62
cmp dword [esi + 4], 0xffffffff
jne 0x408b62
push edi
lea edi, [esi + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push edi
call fcn.0042d620
mov al, byte [eax + esi + 0x13f]
cmp al, 0x5c
pop ecx
je 0x408b09
cmp al, 0x2f
je 0x408b09
push 0x44313c
push edi
call fcn.0042dbe0
pop ecx
pop ecx
cmp dword [ebp + 0x10], 1
pop edi
jne 0x408b2b
push 1
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x408b2b
mov eax, 0x2000000
jmp 0x408b67
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00404c95
add esp, 0x10
test eax, eax
jne 0x408b49
mov eax, dword [ebp + 0x10]
jmp 0x408b67
push eax
call fcn.004085a0
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
pop ecx
add eax, 0x200
jmp 0x408b67
mov eax, 0x1000000
pop esi
pop ebp
ret 0xc
Function at 0x409f49
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp dword [esi + 0x6af90], ebx
mov dword [ebp - 4], ebx
mov dword [esi + 0x6af80], 2
je 0x40a14e
push edi
mov edi, 0x7fff
cmp dword [esi + 0x6af90], 3
jb 0x409fc3
mov ecx, dword [esi + 0x6af84]
movzx eax, byte [ecx + esi + 0x1af72]
mov edx, dword [esi + 0x6af7c]
shl edx, 5
xor eax, edx
and eax, edi
mov dword [esi + 0x6af7c], eax
mov eax, dword [esi + eax*4 + 0x4af70]
and ecx, edi
mov dword [esi + ecx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af84]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x6af7c]
mov dword [esi + eax*4 + 0x4af70], ecx
cmp dword [ebp - 4], 0
je 0x40a004
mov eax, dword [esi + 0x6af84]
sub eax, dword [ebp - 4]
cmp eax, 0x7efa
ja 0x40a004
mov ecx, dword [esi + 0x6af90]
lea eax, [esi + 0x6afa0]
cmp dword [eax], ecx
jbe 0x409feb
mov dword [eax], ecx
push dword [ebp - 4]
push esi
call fcn.00402860
mov ebx, eax
mov eax, dword [esi + 0x6af90]
cmp ebx, eax
pop ecx
pop ecx
jbe 0x40a004
mov ebx, eax
cmp ebx, 3
jb 0x40a0c8
lea eax, [ebx - 3]
push eax
mov eax, dword [esi + 0x6af84]
sub eax, dword [esi + 0x6af88]
push eax
push esi
call fcn.00402389
sub dword [esi + 0x6af90], ebx
add esp, 0xc
cmp ebx, dword [esi + 0x6af98]
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x6af90]
ja 0x40a096
cmp eax, 3
jb 0x40a096
dec ebx
inc dword [esi + 0x6af84]
mov edx, dword [esi + 0x6af84]
movzx ecx, byte [esi + edx + 0x1af72]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
xor ecx, eax
and ecx, edi
mov dword [esi + 0x6af7c], ecx
mov ecx, dword [esi + ecx*4 + 0x4af70]
and edx, edi
dec ebx
mov dword [esi + edx*4 + 0x2af70], ecx
mov eax, dword [esi + 0x6af7c]
mov dword [ebp - 4], ecx
mov ecx, dword [esi + 0x6af84]
mov dword [esi + eax*4 + 0x4af70], ecx
jne 0x40a044
jmp 0x40a0eb
add dword [esi + 0x6af84], ebx
mov eax, dword [esi + 0x6af84]
lea edx, [eax + esi]
movzx ecx, byte [edx + 0x1af70]
lea eax, [esi + 0x6af7c]
mov dword [eax], ecx
movzx edx, byte [edx + 0x1af71]
shl ecx, 5
xor edx, ecx
xor ebx, ebx
and edx, edi
mov dword [eax], edx
jmp 0x40a0f1
mov eax, dword [esi + 0x6af84]
movzx eax, byte [eax + esi + 0x1af70]
push eax
push 0
push esi
call fcn.00402389
add esp, 0xc
dec dword [esi + 0x6af90]
mov dword [ebp + 8], eax
inc dword [esi + 0x6af84]
cmp dword [ebp + 8], 0
je 0x40a12d
mov eax, dword [esi + 0x6af74]
test eax, eax
jl 0x40a10a
lea ecx, [eax + esi + 0x1af70]
jmp 0x40a10c
xor ecx, ecx
mov edx, dword [esi + 0x6af84]
push 0
sub edx, eax
push edx
push ecx
push esi
call fcn.00409da3
mov eax, dword [esi + 0x6af84]
add esp, 0x10
mov dword [esi + 0x6af74], eax
cmp dword [esi + 0x6af90], 0x106
jae 0x40a140
push esi
call fcn.004029f9
pop ecx
cmp dword [esi + 0x6af90], 0
jne 0x409f73
pop edi
mov eax, dword [esi + 0x6af74]
test eax, eax
jl 0x40a161
lea ecx, [eax + esi + 0x1af70]
jmp 0x40a163
xor ecx, ecx
mov edx, dword [esi + 0x6af84]
push 1
sub edx, eax
push edx
push ecx
push esi
call fcn.00409da3
add esp, 0x10
pop esi
pop ebx
leave
ret
Function at 0x40b37e
Capabilities:
Set socket configuration

Disassembly:
mov eax, 0x43e69f
call fcn.0042eda4
sub esp, 0x1c
mov eax, dword [0x456d70]
push ebx
push esi
mov dword [ebp - 0x14], eax
push edi
push 0x20
xor edi, edi
push 0
mov esi, 0x458ec4
inc edi
push esi
mov dword [ebp - 4], edi
call fcn.0042d760
and dword [0x458ec8], 0
mov eax, dword [ebp + 0x28]
add esp, 0xc
cmp dword [ebp + 0x3c], 0x10
push 6
pop ebx
mov dword [0x458ecc], edi
mov dword [0x458ed0], ebx
jae 0x40b3d0
lea eax, [ebp + 0x28]
cmp dword [ebp + 0x20], 0x10
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x28], eax
jae 0x40b3df
lea edi, [ebp + 0xc]
mov eax, dword [0x45db5c]
test eax, eax
jne 0x40b3f3
push eax
call fcn.00401ba8
mov dword [0x45db5c], eax
push 0x45d808
push esi
push dword [ebp - 0x28]
push edi
call eax
test eax, eax
je 0x40b410
push dword [0x45d808]
call fcn.00401d20
jmp 0x40b425
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x28], esi
jne 0x40b42c
xor bl, bl
jmp 0x40b4fc
push 4
push 0x459998
push 0x80
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp dword [ebp + 0x20], 0x10
mov eax, dword [ebp + 0xc]
mov word [ebp - 0x24], 2
jae 0x40b456
lea eax, [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp dword [ebp + 0x3c], 0x10
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x28]
jae 0x40b46c
lea eax, [ebp + 0x28]
push eax
call fcn.0042f5ef
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x45a1f0
mov word [ebp - 0x22], ax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40b425
push 0x4433f8
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x40b4a3
xor bl, bl
jmp 0x40b4f5
push 0x10
lea ecx, [ebp - 0x24]
push ecx
push esi
call eax
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40b4d8
cmp dword [ebp + 0x40], 0
jne 0x40b425
push dword [0x45d808]
call fcn.00401d20
lea eax, [ebp - 0x28]
push eax
call fcn.00405fb0
pop ecx
jmp 0x40b425
cmp dword [ebp + 0x40], 0
jne 0x40b4f3
push dword [0x45d808]
call fcn.00401d20
lea eax, [ebp - 0x28]
push eax
call fcn.00405fb0
pop ecx
mov bl, 1
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
push 1
lea ecx, [ebp + 8]
call fcn.00409968
push 0
push 1
lea ecx, [ebp + 0x24]
call fcn.00409968
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
mov al, bl
pop ebx
call fcn.0042d7f1
leave
ret
Function at 0x40d66a
Capabilities:
Encode data using base64

Disassembly:
mov eax, 0x43e7e7
call fcn.0042eda4
sub esp, 0x28
mov eax, dword [0x456d70]
push esi
xor esi, esi
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x14], 0xf
call fcn.00406f49
mov eax, dword [ebp + 0x10]
cmp eax, esi
mov dword [ebp - 4], esi
je 0x40d7d0
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
push ebx
mov al, byte [edi]
mov byte [ebp + esi + 0x10], al
mov bl, byte [ebp + 0x11]
inc esi
inc edi
cmp esi, 3
jne 0x40d721
mov al, byte [ebp + 0x10]
shr al, 2
mov byte [ebp - 0x30], al
mov al, byte [ebp + 0x10]
and al, 3
shl al, 4
mov cl, bl
shr cl, 4
add al, cl
mov cl, byte [ebp + 0x12]
mov byte [ebp - 0x2f], al
mov al, bl
and al, 0xf
shl al, 2
shr cl, 6
add al, cl
mov byte [ebp - 0x2e], al
mov al, byte [ebp + 0x12]
and al, 0x3f
mov byte [ebp - 0x2d], al
xor esi, esi
cmp dword [0x45db34], 0x10
mov eax, dword [0x45db20]
jae 0x40d705
mov eax, 0x45db20
movzx ecx, byte [ebp + esi - 0x30]
movsx eax, byte [ecx + eax]
push eax
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040b79a
inc esi
cmp esi, 4
jl 0x40d6f2
xor esi, esi
dec dword [ebp - 0x34]
jne 0x40d6ab
test esi, esi
je 0x40d7ce
cmp esi, 3
jge 0x40d74f
push 3
pop ecx
sub ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
lea edi, [ebp + esi + 0x10]
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov bl, byte [ebp + 0x11]
mov al, byte [ebp + 0x10]
mov cl, al
shr cl, 2
mov byte [ebp - 0x30], cl
and al, 3
mov cl, bl
shl al, 4
shr cl, 4
add al, cl
mov byte [ebp - 0x2f], al
mov al, byte [ebp + 0x12]
and bl, 0xf
mov cl, al
shl bl, 2
shr cl, 6
add bl, cl
mov byte [ebp - 0x2e], bl
and al, 0x3f
lea edi, [esi + 1]
xor ebx, ebx
test edi, edi
mov byte [ebp - 0x2d], al
jle 0x40d7b6
cmp dword [0x45db34], 0x10
mov eax, dword [0x45db20]
jae 0x40d79d
mov eax, 0x45db20
movzx ecx, byte [ebp + ebx - 0x30]
movsx eax, byte [ecx + eax]
push eax
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040b79a
inc ebx
cmp ebx, edi
jl 0x40d78a
push 3
pop edi
cmp esi, edi
jge 0x40d7ce
sub edi, esi
push 0x3d
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040b79a
dec edi
jne 0x40d7bf
pop ebx
pop edi
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2c]
push eax
call fcn.0040d2ff
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.00409968
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
call fcn.0042d7f1
leave
ret