joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401cbc
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 4
call fcn.00405732
add esp, 4
mov dword [ebp - 0xc], eax
mov ebx, eax
mov dword [ebx], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], esp
push 0xf003f
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x401d20
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x401e73
mov dword [ebp - 0x14], esp
push 0xf01ff
mov ebx, dword [ebp + 8]
push dword [ebx]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x401d59
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x401e47
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
je 0x401d8a
push eax
mov ebx, eax
call fcn.004010de
inc eax
push eax
call fcn.00405732
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ebx, dword [ebp - 0x14]
mov ebx, dword [ebx]
test ebx, ebx
je 0x401d9d
push ebx
call fcn.00405744
add esp, 4
pop eax
mov ebx, dword [ebp - 0x14]
mov dword [ebx], eax
mov dword [ebp - 0x14], esp
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x401dc5
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x14], esp
push dword [ebp - 0xc]
push 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x401def
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], esp
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x401e14
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x14], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x401e36
push 6
call fcn.00405738
add esp, 4
cmp dword [ebp - 0x10], 0
mov eax, 0
setne al
jmp 0x401e7d
mov dword [ebp - 0x14], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x401e69
push 6
call fcn.00405738
add esp, 4
mov eax, 0
jmp 0x401e7d
mov eax, 0
jmp 0x401e7d
push eax
mov ebx, dword [ebp - 0xc]
push ebx
push ebx
mov ebx, dword [ebx]
test ebx, ebx
je 0x401e92
push ebx
call fcn.00405744
add esp, 4
pop ebx
call fcn.00405744
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 8
Function at 0x401ea2
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
push dword [ebp + 8]
call fcn.00402065
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 1
jne 0x402055
mov dword [ebp - 0x10], esp
push 2
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x401f03
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40204b
mov dword [ebp - 0x10], esp
push 0xf01ff
mov ebx, dword [ebp + 8]
push dword [ebx]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x401f3c
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x402029
mov dword [ebp - 0x10], esp
push 0
push 0
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x401f75
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x10], esp
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x401f97
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x10], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x401fb9
push 6
call fcn.00405738
add esp, 4
push dword [ebp + 8]
call fcn.00402065
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 4
je 0x401fe2
cmp dword [ebp - 0xc], 0x1388
jge 0x401fe2
mov eax, 1
jmp 0x401fe4
xor eax, eax
test eax, eax
je 0x401ffb
push 0x3e8
call fcn.004021c4
inc dword [ebp - 0xc]
jmp 0x401fb9
push dword [ebp + 8]
call fcn.00402065
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 4
jne 0x40201f
mov eax, 1
jmp 0x40205f
mov eax, 0
jmp 0x40205f
mov dword [ebp - 0x10], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x40204b
push 6
call fcn.00405738
add esp, 4
mov eax, 0
jmp 0x40205f
mov eax, 1
jmp 0x40205f
mov esp, ebp
pop ebp
ret 4
Function at 0x402065
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 0x1c
call fcn.00405732
add esp, 4
mov dword [ebp - 0xc], eax
mov ebx, eax
mov edi, eax
xor eax, eax
mov ecx, 7
rep stosd dword es:[edi], eax
mov dword [ebp - 0x10], esp
push 2
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x4020c7
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x402176
mov dword [ebp - 0x10], esp
push 0xf01ff
mov ebx, dword [ebp + 8]
push dword [ebx]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x402100
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x402154
mov dword [ebp - 0x10], esp
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x402132
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x10], esp
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x402154
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x10], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x402176
push 6
call fcn.00405738
add esp, 4
mov ebx, dword [ebp - 0xc]
add ebx, 4
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx]
jmp 0x402189
push eax
mov ebx, dword [ebp - 0xc]
push ebx
call fcn.00405744
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 4
Function at 0x402311
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 0x1c
call fcn.00405732
add esp, 4
mov dword [ebp - 0xc], eax
mov ebx, eax
mov edi, eax
xor eax, eax
mov ecx, 7
rep stosd dword es:[edi], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], esp
push 2
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x40237a
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x402490
mov dword [ebp - 0x14], esp
push 0xf01ff
mov ebx, dword [ebp + 8]
push dword [ebx]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x4023b3
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x402464
mov dword [ebp - 0x14], esp
push dword [ebp - 0xc]
push 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_ControlService]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x4023ea
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x14], esp
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x40240c
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], esp
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x402431
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x14], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x402453
push 6
call fcn.00405738
add esp, 4
cmp dword [ebp - 0x10], 0
mov eax, 0
sete al
jmp 0x40249a
mov dword [ebp - 0x14], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x402486
push 6
call fcn.00405738
add esp, 4
mov eax, 0
jmp 0x40249a
mov eax, 0
jmp 0x40249a
push eax
mov ebx, dword [ebp - 0xc]
push ebx
call fcn.00405744
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 4
Function at 0x4024ae
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 0x1c
call fcn.00405732
add esp, 4
mov dword [ebp - 0xc], eax
mov ebx, eax
mov edi, eax
xor eax, eax
mov ecx, 7
rep stosd dword es:[edi], eax
mov dword [ebp - 0x10], 0
push dword [ebp + 8]
call fcn.00402065
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 1
je 0x40267c
mov dword [ebp - 0x14], esp
push 0xf003f
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x40252c
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x402672
mov dword [ebp - 0x14], esp
push 0xf01ff
mov ebx, dword [ebp + 8]
push dword [ebx]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x402565
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x402650
mov dword [ebp - 0x14], esp
push dword [ebp - 0xc]
push 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_ControlService]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x40259c
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x14], esp
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x4025be
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 0x14], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x4025e0
push 6
call fcn.00405738
add esp, 4
push dword [ebp + 8]
call fcn.00402065
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 1
je 0x402609
cmp dword [ebp - 0x10], 0x1388
jge 0x402609
mov eax, 1
jmp 0x40260b
xor eax, eax
test eax, eax
je 0x402622
push 0x3e8
call fcn.004021c4
inc dword [ebp - 0x10]
jmp 0x4025e0
push dword [ebp + 8]
call fcn.00402065
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 1
jne 0x402646
mov eax, 1
jmp 0x402686
mov eax, 0
jmp 0x402686
mov dword [ebp - 0x14], esp
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x402672
push 6
call fcn.00405738
add esp, 4
mov eax, 0
jmp 0x402686
mov eax, 1
jmp 0x402686
push eax
mov ebx, dword [ebp - 0xc]
push ebx
call fcn.00405744
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 4
Function at 0x402e98
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push ebx
xor eax, eax
mov ebx, dword fs:[0x18]
mov ecx, dword fs:[0x30]
test ecx, ecx
jns 0x402ed0
mov ecx, 0x530000
cmp dword [ebx + 0x58], ecx
jne 0x402ebe
mov al, 1
jmp 0x402f21
cmp dword [ebx + 0x54], ecx
jne 0x402ec7
mov al, 2
jmp 0x402f21
cmp dword [ebx + 0x7c], ecx
jne 0x402f21
mov al, 3
jmp 0x402f21
mov ebx, dword [ecx + 0xa8]
mov ecx, dword [ecx + 0xa4]
cmp ecx, 4
ja 0x402ee5
mov al, 4
jmp 0x402f21
cmp ecx, 5
jne 0x402f05
cmp ebx, 0
jne 0x402ef3
mov al, 5
jmp 0x402f21
cmp ebx, 1
jne 0x402efc
mov al, 6
jmp 0x402f21
cmp ebx, 2
jne 0x402f05
mov al, 7
jmp 0x402f21
cmp ecx, 6
jne 0x402f11
cmp ebx, 0
jne 0x402f13
mov al, 8
jmp 0x402f21
cmp ebx, 1
jne 0x402f1a
mov al, 9
cmp ebx, 2
jne 0x402f21
mov al, 0xa
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404450
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push str.exit
mov ebx, dword [ebp + 8]
push dword [ebx]
call fcn.00401041
add esp, 8
cmp eax, 0
jne 0x404491
call fcn.004043f0
mov eax, 0
jmp 0x40456b
push 0x41743e
mov ebx, dword [ebp + 8]
push dword [ebx]
mov ecx, 2
call fcn.00401149
add esp, 8
mov dword [ebp - 0xc], eax
push reloc.WS2_32.dll_connect
push 0
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x4044be
mov eax, 0x417240
push eax
push 1
mov ebx, 0x198
call fcn.004065d0
add esp, 0x10
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x4044e4
push ebx
call fcn.00405744
add esp, 4
mov eax, dword [ebp - 0x10]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x4044f8
push ebx
call fcn.00405744
add esp, 4
pop eax
mov dword [ebp - 4], eax
push htons
push 0
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40450f
mov eax, 0x41733d
push eax
push 1
mov ebx, 0x194
call fcn.00406e80
add esp, 0x10
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], esp
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov eax, dword [ebp - 4]
test eax, eax
je 0x40453e
add eax, 8
push eax
push dword [0x417738]
call dword [sym.imp.KERNEL32.dll_WriteFile]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x404561
push 6
call fcn.00405738
add esp, 4
mov eax, dword [0x417738]
jmp 0x40456b
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40457c
push ebx
call fcn.00405744
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 4
Function at 0x4049a2
Capabilities:
Download url
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], esp
push 0
push 0
mov ebx, dword [ebp + 0xc]
push dword [ebx]
mov ebx, dword [ebp + 8]
push dword [ebx]
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileA]
nop
nop
nop
nop
cmp dword [ebp - 0xc], esp
je 0x4049f1
push 6
call fcn.00405738
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x404a05
mov dword [ebp - 8], 1
mov eax, dword [ebp - 8]
jmp 0x404a0d
mov esp, ebp
pop ebp
ret 8
Function at 0x405e60
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x14
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, eax
mov al, 0x20
mov cl, byte [edi]
inc edi
cmp cl, 0x22
jne 0x405e7a
mov al, cl
mov dl, byte [edi]
inc edi
cmp dl, al
je 0x405e88
mov cl, byte [edi]
inc edi
cmp cl, al
jne 0x405e81
cmp al, 0x20
je 0x405e92
cmp byte [edi], 0x20
jne 0x405e92
inc edi
lea ecx, [esp + 0xc]
call fcn.004077c0
mov dword [esp + 0xc], 0x415204
mov al, byte [edi]
test al, al
je 0x405f56
mov esi, dword [esp + 0x28]
cmp al, 0x22
jne 0x405efe
mov al, byte [edi + 1]
inc edi
test al, al
mov esi, edi
je 0x405ed9
mov al, byte [esi]
cmp al, 0x22
je 0x405ed9
test al, al
jge 0x405ed1
mov al, byte [esi + 1]
test al, al
je 0x405ed9
inc esi
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x405ebf
mov edx, esi
sub edx, edi
push edx
push edi
call fcn.00407c50
add esp, 8
lea ecx, [esp + 0xc]
push eax
call fcn.00407a50
mov al, byte [esi]
mov edi, esi
test al, al
je 0x405f4c
lea edi, [esi + 1]
jmp 0x405f4c
cmp al, 0x20
jg 0x405f0a
cmp byte [esi], 0
jl 0x405f0a
inc edi
jmp 0x405f4c
test al, al
mov esi, edi
je 0x405f32
mov al, byte [esi]
cmp al, 0x22
je 0x405f32
cmp al, 0x20
jg 0x405f1e
test al, al
jge 0x405f32
test al, al
jge 0x405f2a
mov al, byte [esi + 1]
test al, al
je 0x405f32
inc esi
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x405f10
mov eax, esi
sub eax, edi
push eax
push edi
call fcn.00407c50
add esp, 8
lea ecx, [esp + 0xc]
push eax
call fcn.00407a50
mov edi, esi
mov al, byte [edi]
test al, al
jne 0x405eb1
mov ebx, dword [esp + 0x28]
mov eax, dword [ebx]
test eax, eax
je 0x405f69
push eax
call fcn.00407bf0
add esp, 4
mov edi, dword [esp + 0x1c]
shr edi, 2
shl edi, 2
lea ecx, [edi + 8]
push ecx
call fcn.004058e0
mov dword [eax], 1
mov edx, dword [esp + 0x20]
shr edx, 2
mov dword [eax + 4], edx
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
add esp, 4
neg esi
sbb esi, esi
and esi, ecx
mov ecx, edi
mov edx, ecx
lea edi, [eax + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xc]
mov dword [ebx], eax
mov dword [esp + 0xc], 0x415200
call fcn.004079c0
pop edi
pop esi
pop ebx
add esp, 0x14
ret

Function at 0x4060b0
Capabilities:
Query environment variable

Disassembly:
push ebp
push esi
push edi
push 0x104
call fcn.004058e0
mov ebp, dword [esp + 0x18]
add esp, 4
mov edi, eax
push 0x104
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
cmp esi, 0x104
jbe 0x406107
push ebx
push edi
call fcn.00405970
push esi
mov ebx, esi
call fcn.004058e0
add esp, 8
mov edi, eax
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
cmp esi, ebx
ja 0x4060de
mov eax, edi
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebp
ret
Function at 0x406450
Capabilities:
Get hostname
Initialize winsock library

Disassembly:
sub esp, 0x294
lea eax, [esp + 0x104]
push esi
push eax
push 0x202
xor esi, esi
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4064a5
lea ecx, [esp + 4]
push 0x104
push ecx
call sub.WS2_32.dll_gethostname
test eax, eax
jne 0x4064a0
push edi
lea edi, [esp + 8]
or ecx, 0xffffffff
lea edx, [esp + 8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
call fcn.00407c50
add esp, 8
mov esi, eax
pop edi
call sub.WS2_32.dll_WSACleanup
mov eax, esi
pop esi
add esp, 0x294
ret

Function at 0x406690
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
push edi
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x406722
mov eax, dword [esp + 0x10]
push ebx
mov ebx, 1
push ebp
cmp eax, ebx
push esi
mov dword [esp + 0x10], ebx
jle 0x406714
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [esp + 0x2c]
mov eax, dword [esi]
lea edx, [esp + 0x14]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push edi
call ebp
test eax, eax
je 0x40670c
mov eax, dword [esp + 0x1c]
inc ebx
add esi, 0xc
cmp ebx, eax
jl 0x4066d5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
mov dword [esp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret

Function at 0x406bc0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push edi
push 0
push 0x20
push 3
push 0
push 3
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x406c29
push ebx
lea ecx, [esp + 0x10]
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea edx, [ebx + 8]
push edx
call fcn.004058e0
add esp, 4
mov esi, eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esi + 8]
push ebx
push ecx
push edi
mov dword [esi], 1
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
ret
Function at 0x406f70
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
test ebx, ebx
push edi
jne 0x406f83
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push ebx
call fcn.004080f0
add esp, 4
test eax, eax
jne 0x406f95
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [esp + 0x24]
test edi, edi
jg 0x406fa4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, dword [ebx]
xor esi, esi
cmp eax, 1
jne 0x406ffb
mov ebx, dword [ebx + 4]
push edi
call fcn.0040af9f
add esp, 4
mov ebp, eax
lea eax, [esp + 0x18]
push esi
push eax
push edi
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406fde
push ebp
call fcn.0040aa08
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x18]
push ecx
push ebp
call fcn.00407d80
push ebp
mov esi, eax
call fcn.0040aa08
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40703d
mov ebx, dword [ebx + 4]
lea edx, [edi + 8]
push edx
call fcn.004058e0
mov esi, eax
add esp, 4
lea ecx, [esi + 8]
mov dword [esi], 1
mov dword [esi + 4], edi
mov eax, dword [ebx]
push edi
push ecx
mov ecx, ebx
call dword [eax + 0x20]
test eax, eax
jne 0x40703a
push esi
call fcn.00405970
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [esi + 4], eax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x408d40
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
sub esp, 0x10
push esi
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov ecx, dword [esp + 0x1c]
mov esi, eax
xor eax, eax
push ecx
mov dword [esp + 8], eax
mov word [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call sub.WS2_32.dll_inet_addr
mov edx, dword [esp + 0x20]
mov dword [esp + 8], eax
push edx
call sub.WS2_32.dll_htons
mov word [esp + 6], ax
lea eax, [esp + 4]
push 0x10
push eax
push esi
call sub.WS2_32.dll_connect
test eax, eax
jne 0x408d9f
mov eax, esi
pop esi
add esp, 0x10
ret
push esi
call sub.WS2_32.dll_closesocket
xor eax, eax
pop esi
add esp, 0x10
ret
Function at 0x408f00
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x1ac
lea eax, [esp + 0x1c]
push ebx
push esi
push edi
push eax
push 1
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x409023
mov ebx, dword [esp + 0x1c0]
test ebx, ebx
jl 0x409023
cmp ebx, 0xffff
jg 0x409023
mov edi, dword [esp + 0x1c4]
push edi
call fcn.0040a090
add esp, 4
cmp eax, 1
jne 0x408f70
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x408f86
lea ecx, [esp + 0x14]
push ecx
push edi
call fcn.0040a280
add esp, 8
test eax, eax
je 0x409023
mov esi, dword [esp + 0x1bc]
xor edx, edx
lea ecx, [esp + 0x14]
push ebx
lea eax, [esi + 0x34]
push ecx
push esi
mov dword [eax], edx
mov byte [eax + 4], dl
call fcn.00408d40
add esp, 0xc
mov dword [esi + 0xc], eax
test eax, eax
je 0x409023
push eax
call fcn.00409280
push esi
lea edx, [esp + 0x18]
push 0x408db0
push edx
mov dword [esi + 0x10], 0
call fcn.0040a2d0
mov eax, dword [esp + 0x20]
add esp, 0x10
mov dword [esi + 0x14], eax
mov eax, dword [esi + 4]
test eax, eax
jne 0x40900c
push esi
lea ecx, [esp + 0x10]
push 0x408e20
push ecx
call fcn.0040a2d0
mov edx, dword [esp + 0x18]
push esi
lea eax, [esp + 0x1c]
push 0x408e90
push eax
mov dword [esi + 0x18], edx
call fcn.0040a2d0
mov ecx, dword [esp + 0x24]
add esp, 0x18
mov dword [esi + 0x1c], ecx
call fcn.00408c70
mov dword [esi + 8], eax
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1ac
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1ac
ret

Function at 0x409280
Capabilities:
Set socket configuration

Disassembly:
push ecx
mov ecx, dword [esp + 8]
lea eax, [esp]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0xc], 1
call sub.WS2_32.dll_ioctlsocket
xor edx, edx
test eax, eax
setge dl
mov eax, edx
pop ecx
ret
Function at 0x40a280
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x40a28f
ret
mov ecx, dword [eax + 0xc]
push esi
push edi
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call sub.WS2_32.dll_inet_ntoa
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
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]
pop edi
pop esi
ret

Function at 0x40a2d0
Capabilities:
Create thread

Disassembly:
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
push eax
push 0
push ecx
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esp + 4]
xor edx, edx
test eax, eax
setne dl
mov dword [ecx], eax
mov eax, edx
ret

Function at 0x40a300
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x40a319
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
ret