joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404140
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, dword [esp + 0x18]
cmp eax, 3
ja case.default.0x404151
jmp dword [eax*4 + 0x40b450]
cmp dword [0x40d114], 0
je 0x404260
push 0x40d118
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x40d130]
test edi, edi
je 0x404255
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40419b
mov edi, dword [edi + 8]
test edi, edi
je 0x404255
push dword [edi]
call ebx
mov esi, eax
call ebp
test eax, eax
jne 0x404190
test esi, esi
je 0x404190
mov ecx, dword [edi + 4]
call dword [0x40b8d4]
push esi
call ecx
add esp, 4
jmp 0x404190
call fcn.00403a50
jmp case.default.0x404151
cmp dword [0x40d114], 0
je case.default.0x404151
push 0x40d118
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x40d130]
test edi, edi
je 0x404248
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x404207
mov edi, dword [edi + 8]
test edi, edi
je 0x404248
push dword [edi]
call ebx
mov esi, eax
call ebp
test eax, eax
jne 0x404200
test esi, esi
je 0x404200
mov ecx, dword [edi + 4]
call dword [0x40b8d4]
push esi
call ecx
add esp, 4
jmp 0x404200
cmp dword [0x40d114], 0
jne 0x40423c
push 0x40d118
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x40d114], 1
jmp case.default.0x404151
push 0x40d118
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp case.default.0x404151
push 0x40d118
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x40d114]
cmp eax, 1
jne case.default.0x404151
mov eax, dword [0x40d130]
test eax, eax
je 0x404292
nop word cs:[eax + eax]
mov esi, dword [eax + 8]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, esi
test esi, esi
jne 0x404280
mov dword [0x40d130], 0
mov dword [0x40d114], 0
push 0x40d118
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, 1
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4043c0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push edi
push esi
mov esi, dword [0x40a004]
movzx ecx, word [esi]
xor eax, eax
cmp ecx, 0x5a4d
jne 0x404426
mov ecx, dword [esi + 0x3c]
cmp dword [esi + ecx], 0x4550
jne 0x404426
add esi, ecx
movzx ecx, word [esi + 0x18]
cmp ecx, 0x10b
jne 0x404426
movzx ecx, word [esi + 6]
test ecx, ecx
je 0x404426
mov edx, dword [esp + 0xc]
sub edx, dword [0x40a004]
movzx edi, word [esi + 0x14]
add esi, edi
add esi, 0x18
jmp 0x404416
add esi, 0x28
dec ecx
je 0x404426
mov edi, dword [esi + 0xc]
cmp edi, edx
ja 0x404410
add edi, dword [esi + 8]
cmp edi, edx
jbe 0x404410
mov eax, esi
pop esi
pop edi
ret
Function at 0x4016d0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
add ecx, 0x40
push 0x40c238
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov eax, dword [0x40ef88]
add esp, 0xc
test eax, eax
je 0x401707
push eax
push str.Total_of__ld_requests_completed_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push 1
call dword [sym.imp.MSVCRT.dll_exit]
nop

Function at 0x401d80
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push esi
mov esi, dword [ebp + 0xc]
push esi
lea eax, [ebp - 0x78]
push 0x78
push eax
push esi
call fcn.00407da0
mov ecx, dword [ebp + 8]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push eax
push ecx
add edx, 0x40
push str._s:__s___d__n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov eax, dword [0x40ef88]
add esp, 0x14
test eax, eax
je 0x401dcc
push eax
push str.Total_of__ld_requests_completed_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push esi
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x404050
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x412b0c]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
push eax
call fcn.00405180
mov dword [0x412b00], eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov esi, dword [sym.imp.MSVCRT.dll_strncmp]
not ecx
dec ecx
cmp ecx, 7
jbe 0x40415d
push 7
push str.http:__
push ebx
call esi
add esp, 0xc
test eax, eax
jne 0x40415d
add ebx, 7
push 0x2f
push ebx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
mov dword [ebp + 8], eax
test eax, eax
je 0x404207
mov esi, eax
mov eax, dword [0x412b0c]
sub esi, ebx
lea edx, [esi + 1]
push edx
push eax
call fcn.00404520
mov ecx, esi
mov esi, ebx
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 8]
mov ecx, eax
sub ecx, ebx
mov byte [ecx + esi], 0
mov edx, dword [0x412b0c]
push edx
push eax
lea eax, [ebp - 4]
push 0x4102b4
push eax
push 0x4102c0
call fcn.00406210
test eax, eax
jne 0x404207
mov eax, dword [0x4102c0]
test eax, eax
je 0x404207
mov eax, dword [ebp - 4]
test eax, eax
jne 0x404207
mov ecx, dword [0x412b0c]
push esi
push ecx
call fcn.00405180
mov dword [0x4102a4], eax
mov byte [esi], 0
cmp byte [ebx], 0x5b
jne 0x4041a7
mov edx, dword [0x4102c0]
mov eax, dword [0x412b0c]
push edx
push str.__s_
push eax
call fcn.00404f30
add esp, 0xc
mov dword [0x40f664], eax
jmp 0x4041b3
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 8
jbe 0x40409e
push 8
push str.https:__
push ebx
call esi
add esp, 0xc
test eax, eax
jne 0x40409e
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push str.SSL_not_compiled_in__no_https_support_n
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov ecx, dword [0x4102c0]
mov dword [0x40f664], ecx
mov ax, word [0x4102b4]
test ax, ax
jne 0x4041da
mov word [0x4102b4], 0x50
pop edi
pop esi
mov dword [0x40f66c], 0x40efac
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp ax, 0x50
je 0x4041c7
xor edx, edx
mov dx, ax
mov eax, dword [0x412b0c]
push edx
push 0x40e090
push eax
call fcn.00404f30
add esp, 0xc
mov dword [0x40f66c], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4054d0
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.004056b0
test eax, eax
jne 0x4055d8
cmp dword [0x40f464], 0x14
jl 0x4055d6
mov eax, dword [0x40f02c]
test eax, eax
jne 0x4055d6
mov dword [0x40f02c], 1
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
test esi, esi
je 0x40555b
mov eax, dword [0x40f018]
test eax, eax
jne 0x405531
push eax
push str.CommandLineToArgvW
push 4
call fcn.00409ca0
add esp, 0xc
mov dword [0x40f018], eax
lea ecx, [ebp - 4]
push ecx
push esi
call eax
mov esi, eax
test esi, esi
je 0x40555b
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
push edx
push esi
push eax
call fcn.00409940
mov ecx, dword [ebp + 8]
add esp, 0xc
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov ebx, eax
push 0xffffffffffffffff
push ebx
call dword [sym.imp.MSVCRT.dll___p__environ]
push eax
call fcn.004055e0
mov edi, dword [ebp + 0x10]
add esp, 0xc
test edi, edi
je 0x4055aa
lea esi, [eax*4 + 4]
push esi
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [edi], eax
call dword [sym.imp.MSVCRT.dll___p__environ]
mov edi, dword [edi]
mov ecx, esi
mov esi, dword [eax]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov esi, dword [sym.imp.MSVCRT.dll___p__wenviron]
call esi
mov ecx, dword [eax]
pop ebx
test ecx, ecx
je 0x4055d6
call esi
mov edi, dword [eax]
call esi
push edi
mov dword [eax], 0
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x4056b0
Capabilities:
Allocate thread local storage
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x40f030]
mov ecx, eax
inc eax
test ecx, ecx
mov dword [0x40f030], eax
je 0x4056d0
xor eax, eax
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 8]
push edx
call fcn.00409a90
add esp, 4
test eax, eax
jne 0x405766
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x40f4c4], eax
call fcn.00404400
test eax, eax
jne 0x40576b
push eax
push eax
push eax
lea eax, [ebp - 4]
push eax
call fcn.004048c0
test eax, eax
je 0x405711
mov eax, 0x4e22
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push str.apr_initialize
push ecx
call fcn.00404f50
lea edx, [ebp - 0x198]
push edx
push 2
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x40576b
mov ax, word [ebp - 0x198]
cmp al, 2
jne 0x405760
xor ecx, ecx
mov cl, ah
test cl, cl
jne 0x405760
mov edx, dword [ebp - 4]
push edx
call fcn.00409790
mov eax, dword [ebp - 4]
push eax
call fcn.004097a0
add esp, 8
xor eax, eax
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov eax, 0x11
mov esp, ebp
pop ebp
ret
Function at 0x405fc0
Capabilities:
Connect socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x40616f
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x40616f
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi + 0x14]
lea edx, [esi + 0x28]
push ecx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
jne 0x406138
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
je 0x40610a
call esi
add eax, 0xafc80
cmp eax, 0xb23b3
jne 0x406174
mov edi, dword [ebx + 0x20]
mov esi, dword [ebx + 0x24]
mov eax, edi
or eax, esi
jne 0x40603d
pop edi
pop esi
mov eax, 0xb23b4
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 4]
mov ecx, 1
test esi, esi
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x210], ecx
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x10c], ecx
jg 0x40606b
jl 0x406067
test edi, edi
jae 0x40606b
xor eax, eax
jmp 0x406090
push 0
push 0xf4240
push esi
push edi
call fcn.0040a880
push 0
push 0xf4240
push esi
push edi
mov dword [ebp - 8], eax
call fcn.0040a940
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
lea ecx, [ebp - 0x10c]
push eax
lea edx, [ebp - 0x210]
push ecx
push edx
push 0
push 0x41
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x4060fe
test eax, eax
jne 0x4060c3
pop edi
pop esi
mov eax, 0xb23cc
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebx + 4]
lea eax, [ebp - 0x10c]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x406135
mov ecx, dword [ebx + 4]
lea edx, [ebp + 0xc]
lea eax, [ebp + 8]
push edx
push eax
push 0x1007
push 0xffff
push ecx
mov dword [ebp + 0xc], 4
call dword [sym.imp.WSOCK32.dll_getsockopt]
test eax, eax
je 0x406125
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
jne 0x406115
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
call esi
pop edi
pop esi
add eax, 0xafc80
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
test eax, eax
jne 0x406117
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x10]
mov dword [ebx + 0x14], esi
cmp word [eax + 0x2a], 0
jne 0x40614c
mov dword [ebx + 0x2c], 1
mov ecx, dword [eax + 0x18]
mov esi, dword [eax + 0x20]
mov edi, 0x40f0a4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40610a
pop edi
mov dword [ebx + 0x30], 1
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, 0x975ef
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x406390
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
cmp esi, ebx
push edi
mov dword [ebp - 0xc], esi
jne 0x4063aa
mov esi, str.0.0.0.0
mov al, byte [esi]
cmp al, 0x30
jl 0x40646d
cmp al, 0x39
jg 0x40646d
push str.0123456789.
push esi
call dword [sym.imp.MSVCRT.dll_strspn]
mov edx, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ecx
jne 0x40646d
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp + 0xc], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0xc]
cmp dword [ecx], ebx
je 0x4064b6
mov dword [ebp - 4], ebx
mov edx, dword [ebp + 0x1c]
push 0x38
push edx
call fcn.00404520
mov edi, eax
xor eax, eax
mov esi, edi
mov ecx, 0xe
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp - 4]
mov dword [esi], eax
mov edx, dword [ecx + 0xc]
mov eax, dword [edi + edx]
mov edx, dword [ebp + 0x14]
push edx
push 2
mov ecx, dword [eax]
push esi
mov dword [esi + 0x2c], ecx
call fcn.004061c0
add esp, 0xc
test ebx, ebx
jne 0x406495
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x406466
push eax
mov eax, dword [ebp + 0x1c]
push eax
call fcn.00405180
mov dword [esi + 4], eax
mov ecx, dword [ebp + 8]
mov dword [ecx], esi
jmp 0x40649e
push esi
call dword [sym.imp.WSOCK32.dll_gethostbyname]
cmp eax, ebx
mov dword [ebp + 0xc], eax
jne 0x406400
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
je 0x4064b6
call esi
pop edi
pop esi
add eax, 0xafc80
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx + 4]
mov dword [esi + 4], edx
mov dword [ebx + 0x24], esi
mov eax, dword [ebp + 0xc]
add edi, 4
mov ebx, esi
mov dword [ebp - 4], edi
mov ecx, dword [eax + 0xc]
cmp dword [edi + ecx], 0
jne 0x406411
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 8]
push 0
mov eax, dword [esi]
push 0
lea edx, [ebp - 4]
mov dword [ebp - 0xc], eax
push 0
push edx
mov edx, dword [ecx + 4]
lea eax, [ebp - 0xc]
push 1
push eax
push edx
mov dword [ebp - 4], 0
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x4081ea
push edi
mov edi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call edi
test eax, eax
jne 0x4081d5
mov dword [esi], eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
call edi
mov dword [esi], 0
pop edi
add eax, 0xafc80
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 4]
mov dword [esi], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x408200
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push 0
lea edx, [ebp - 8]
push 0
mov eax, dword [esi]
push edx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 4]
mov dword [ebp - 0xc], ecx
push eax
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x10]
push 1
push ecx
push eax
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
jne 0x408273
push edi
mov edi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call edi
test eax, eax
jne 0x40825e
mov dword [esi], eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
call edi
mov dword [esi], 0
pop edi
add eax, 0xafc80
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 4]
mov dword [esi], eax
pop esi
neg eax
sbb eax, eax
and eax, 0xfffeee82
add eax, 0x1117e
mov esp, ebp
pop ebp
ret 0xc

Function at 0x408330
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov eax, ebx
or eax, edi
jne 0x40836e
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
or ecx, eax
je 0x40845d
mov edx, dword [esi + 4]
push edx
call fcn.004082e0
add esp, 4
test eax, eax
je 0x40845d
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
test edi, edi
jl 0x408411
jg 0x408380
test ebx, ebx
jbe 0x408407
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x24]
or eax, ecx
jne 0x40839e
mov ecx, dword [esi + 4]
push ecx
call fcn.00408290
add esp, 4
test eax, eax
jne 0x408465
mov edx, dword [esi + 0x20]
cmp edx, ebx
jne 0x4083b0
mov eax, dword [esi + 0x24]
cmp eax, edi
je 0x40845d
mov ecx, dword [ebp + 0x10]
push 0
push 0x3e8
push ecx
push ebx
lea edi, [esi + 0x18]
call fcn.0040a880
mov edx, dword [esi + 4]
mov ebx, dword [sym.imp.WSOCK32.dll_setsockopt]
push 4
push edi
push 0x1006
push 0xffff
push edx
mov dword [edi], eax
call ebx
mov eax, dword [esi + 4]
push 4
push edi
push 0x1005
push 0xffff
push eax
call ebx
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov dword [esi + 0x24], edi
mov dword [esi + 0x20], ebx
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret 0xc
test edi, edi
jg 0x40845d
jl 0x408411
test ebx, ebx
jae 0x40845d
mov ecx, dword [esi + 4]
mov dword [ebp + 8], 0
push ecx
call fcn.00408290
add esp, 4
test eax, eax
jne 0x408465
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea edx, [ebp + 8]
push 4
push edx
push 0x1006
push 0xffff
push eax
call edi
mov edx, dword [esi + 4]
lea ecx, [ebp + 8]
push 4
push ecx
push 0x1005
push 0xffff
push edx
call edi
mov edi, dword [ebp + 0x10]
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], edi
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x409740
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x409780
mov ecx, dword [ebp + 0xc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x40977a
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x40976e
pop esi
pop ebp
ret 8
call esi
add eax, 0xafc80
pop esi
pop ebp
ret 8
xor eax, eax
pop ebp
ret 8
mov eax, 0x4e3b
pop ebp
ret 8

Function at 0x409a90
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x40f464]
push esi
test eax, eax
push edi
jne 0x409c7c
push 0x40f398
mov dword [0x40f398], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [0x40f3a8]
cmp eax, 2
jne 0x409bee
mov al, byte [0x40f3ac]
mov esi, 0x40f3ac
test al, al
je 0x409b0e
mov edi, dword [sym.imp.MSVCRT.dll__isctype]
mov eax, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [eax], 1
jle 0x409af1
xor ecx, ecx
push 4
mov cl, byte [esi]
push ecx
call edi
add esp, 8
jmp 0x409b02
mov eax, dword [sym.imp.MSVCRT.dll__pctype]
xor edx, edx
mov dl, byte [esi]
mov ecx, dword [eax]
mov al, byte [ecx + edx*2]
and eax, 4
test eax, eax
jne 0x409b3c
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x409ad9
mov eax, dword [0x40f468]
mov ecx, dword [0x40f39c]
cmp ecx, 3
jb 0x409c72
je 0x409c72
cmp ecx, 4
jne 0x409b8f
cmp eax, 2
jae 0x409b52
mov eax, 0x28
jmp 0x409c77
cmp byte [esi], 0
je 0x409b0e
push esi
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [0x40f468], eax
jmp 0x409b13
ja 0x409b5e
mov eax, 0x2a
jmp 0x409c77
cmp eax, 3
ja 0x409b6d
mov eax, 0x2b
jmp 0x409c77
cmp eax, 4
ja 0x409b7c
mov eax, 0x2c
jmp 0x409c77
mov edx, 5
cmp edx, eax
sbb eax, eax
neg eax
add eax, 0x2d
jmp 0x409c77
cmp ecx, 5
jne 0x409bd2
mov ecx, dword [0x40f3a0]
test ecx, ecx
jne 0x409bbe
test eax, eax
jne 0x409bac
mov eax, 0x32
jmp 0x409c77
xor ecx, ecx
cmp eax, 1
setne cl
add ecx, 0x33
mov eax, ecx
jmp 0x409c77
cmp ecx, 2
jne 0x409bcd
mov eax, 0x46
jmp 0x409c77
cmp eax, 1
jae 0x409bdc
mov eax, 0x3c
jmp 0x409c77
xor edx, edx
cmp eax, 1
setne dl
add edx, 0x3d
mov eax, edx
jmp 0x409c77
cmp eax, 1
jne 0x409c72
mov al, byte [0x40f3ac]
mov esi, 0x40f3ac
test al, al
je 0x409c3c
mov edi, dword [sym.imp.MSVCRT.dll__isctype]
mov eax, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [eax], 1
jle 0x409c1f
xor ecx, ecx
push 1
mov cl, byte [esi]
push ecx
call edi
add esp, 8
jmp 0x409c30
mov eax, dword [sym.imp.MSVCRT.dll__pctype]
xor edx, edx
mov dl, byte [esi]
mov ecx, dword [eax]
mov al, byte [ecx + edx*2]
and eax, 1
test eax, eax
jne 0x409c3c
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x409c07
mov eax, dword [0x40f3a0]
cmp eax, 0xa
jae 0x409c56
mov cl, byte [esi]
xor eax, eax
cmp cl, 0x43
setge al
lea eax, [eax + eax + 0xa]
jmp 0x409c77
cmp eax, 0x5a
jae 0x409c6b
mov cl, byte [esi]
xor eax, eax
cmp cl, 0x41
setge al
lea eax, [eax + eax + 0xe]
jmp 0x409c77
mov eax, 0x12
jmp 0x409c77
mov eax, 1
mov dword [0x40f464], eax
mov edx, dword [ebp + 8]
pop edi
mov dword [edx], eax
mov esi, dword [0x40f464]
xor eax, eax
cmp esi, 1
setge al
dec eax
pop esi
and eax, 0x4e2e
pop ebp
ret
Function at 0x40a610
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
mov al, byte [esi + 0x2c]
test al, al
je 0x40a6e1
mov ecx, dword [esi + 0x44]
xor eax, eax
push ebx
cmp ecx, 1
push edi
mov dword [ebp - 4], eax
mov dword [ebp + 8], eax
jne 0x40a6d5
mov edi, dword [esi + 0x3c]
cmp edi, eax
je 0x40a6d5
mov ebx, dword [esi + 0x38]
cmp edi, 0xffffffff
jbe 0x40a651
or eax, 0xffffffff
jmp 0x40a653
mov eax, edi
mov edx, dword [esi + 4]
lea ecx, [ebp - 4]
push 0
push ecx
push eax
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a698
mov eax, dword [ebp - 4]
mov edx, dword [esi + 0x48]
mov ecx, dword [esi + 0x4c]
add edx, eax
adc ecx, 0
sub edi, eax
add ebx, eax
mov dword [esi + 0x48], edx
test edi, edi
mov dword [esi + 0x4c], ecx
ja 0x40a647
mov eax, dword [ebp + 8]
pop edi
mov dword [esi + 0x3c], 0
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 4
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jne 0x40a6a9
mov dword [ebp + 8], eax
jmp 0x40a6b3
call edi
add eax, 0xafc80
mov dword [ebp + 8], eax
mov eax, dword [ebp - 4]
mov edx, dword [esi + 0x48]
mov ecx, dword [esi + 0x4c]
add edx, eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x48], edx
adc ecx, 0
test eax, eax
mov dword [esi + 0x4c], ecx
jne 0x40a6d5
mov dword [esi + 0x3c], 0
mov eax, dword [ebp + 8]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 4
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x40a740
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push ebx
push esi
lea ecx, [edx - 2]
xor esi, esi
push edi
mov edi, dword [ebp + 0xc]
test ecx, ecx
jle 0x40a7c3
xor edx, edx
xor ebx, ebx
mov dl, byte [edi + esi]
add esi, 3
shr edx, 2
inc eax
mov dl, byte [edx + 0x40b708]
mov byte [eax - 1], dl
mov dl, byte [edi + esi - 3]
mov bl, byte [edi + esi - 2]
and edx, 3
shl edx, 4
shr ebx, 4
or edx, ebx
xor ebx, ebx
inc eax
mov dl, byte [edx + 0x40b708]
mov byte [eax - 1], dl
mov dl, byte [edi + esi - 2]
mov bl, byte [edi + esi - 1]
and edx, 0xf
shl edx, 2
shr ebx, 6
or edx, ebx
inc eax
mov dl, byte [edx + 0x40b708]
mov byte [eax - 1], dl
mov dl, byte [edi + esi - 1]
and edx, 0x3f
inc eax
cmp esi, ecx
mov dl, byte [edx + 0x40b708]
mov byte [eax - 1], dl
jl 0x40a758
mov edx, dword [ebp + 0x10]
cmp esi, edx
jge 0x40a826
xor ecx, ecx
mov cl, byte [esi + edi]
shr ecx, 2
inc eax
dec edx
mov cl, byte [ecx + 0x40b708]
cmp esi, edx
mov byte [eax - 1], cl
mov dl, byte [esi + edi]
jne 0x40a7f6
and edx, 3
shl edx, 4
inc eax
mov cl, byte [edx + 0x40b708]
mov byte [eax - 1], cl
mov byte [eax], 0x3d
jmp 0x40a821
lea ecx, [esi + edi + 1]
xor ebx, ebx
and edx, 3
mov bl, byte [ecx]
shl edx, 4
shr ebx, 4
or edx, ebx
inc eax
mov dl, byte [edx + 0x40b708]
mov byte [eax - 1], dl
mov cl, byte [ecx]
and ecx, 0xf
mov dl, byte [ecx*4 + 0x40b708]
mov byte [eax], dl
inc eax
mov byte [eax], 0x3d
inc eax
mov edx, dword [ebp + 8]
mov byte [eax], 0
sub eax, edx
pop edi
pop esi
inc eax
pop ebx
pop ebp
ret 0xc