joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4089aa
Capabilities:
Link many functions at runtime

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebp, ebp
push str.advapi32.dll
mov eax, dword [edi + 0x98]
mov dword [eax + 0x298], ebp
mov eax, dword [edi + 0x98]
mov dword [eax + 0x294], ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, ebp
jne 0x4089ed
push ebp
push str.advapi32
call fcn.0040ba53
pop ecx
pop ecx
jmp 0x408bc1
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptAcquireContextA
push ebx
call esi
push str.CryptDestroyKey
push ebx
mov dword [0x4243ac], eax
call esi
push str.CryptGetKeyParam
push ebx
mov dword [0x4243a0], eax
call esi
push str.CryptSetKeyParam
push ebx
mov dword [0x424478], eax
call esi
push str.CryptExportKey
push ebx
mov dword [0x424488], eax
call esi
push str.CryptGetUserKey
push ebx
mov dword [0x42438c], eax
call esi
push str.CryptEncrypt
push ebx
mov dword [0x424390], eax
call esi
push str.CryptGenKey
push ebx
mov dword [0x42447c], eax
call esi
push str.CryptGenRandom
push ebx
mov dword [0x424388], eax
call esi
push str.CryptImportKey
push ebx
mov dword [0x42448c], eax
call esi
push str.CryptDecrypt
push ebx
mov dword [0x424394], eax
call esi
push str.CryptCreateHash
push ebx
mov dword [0x424484], eax
call esi
push str.CryptHashData
push ebx
mov dword [0x424480], eax
call esi
push str.CryptSignHashA
push ebx
mov dword [0x4243a8], eax
call esi
push str.CryptVerifySignatureA
push ebx
mov dword [0x42439c], eax
call esi
push str.CryptReleaseContext
push ebx
mov dword [0x424398], eax
call esi
cmp dword [0x4243ac], ebp
mov dword [0x4243a4], eax
push ebp
jne 0x408ad6
push str.GetProcAddress
jmp 0x4089e1
mov ecx, edi
call fcn.00408bcd
push 3
xor esi, esi
pop ebx
mov eax, dword [edi + 0x98]
mov ecx, dword [eax + 0x294]
cmp ecx, ebp
je 0x408afa
cmp dword [eax + 0x29c], ebp
je 0x408b0a
cmp dword [eax + 0x298], ebp
je 0x408b6e
cmp dword [eax + 0x2ac], ebp
jne 0x408b6e
inc esi
cmp esi, ebx
jg 0x408b88
cmp ecx, ebp
je 0x408b27
push ebp
push ecx
call dword [0x4243a4]
mov eax, dword [edi + 0x98]
mov dword [eax + 0x294], ebp
mov eax, dword [edi + 0x98]
mov eax, dword [eax + 0x298]
cmp eax, ebp
je 0x408b4b
push ebp
push eax
call dword [0x4243a4]
mov eax, dword [edi + 0x98]
mov dword [eax + 0x298], ebp
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, ebx
jne 0x408b5f
push 2
pop eax
jmp 0x408b61
xor eax, eax
push eax
mov ecx, edi
call fcn.00408bcd
jmp 0x408ae2
cmp esi, ebx
jg 0x408b88
mov eax, dword [edi + 0x98]
cmp dword [eax + 0x29c], ebp
jne 0x408bab
cmp dword [eax + 0x2ac], ebp
jne 0x408bab
mov eax, dword [edi]
push 1
push 0x420890
push str.RSA_failed._Create_New_RSA_key_
mov ecx, edi
call dword [eax + 0x90]
cmp eax, 1
jne 0x408bab
push ebx
mov ecx, edi
call fcn.00408bcd
mov edi, dword [edi + 0x98]
cmp dword [edi + 0x29c], ebp
jne 0x408bc5
cmp dword [edi + 0x2ac], ebp
jne 0x408bc5
xor eax, eax
jmp 0x408bc8
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40b7e6
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x960
mov dl, byte [0x424380]
push ebx
push esi
mov ebx, 0xff
push edi
mov esi, ecx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x55f]
mov byte [ebp - 0x560], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x95f]
mov byte [ebp - 0x960], dl
rep stosd dword es:[edi], eax
and dword [ebp - 4], 0
add ebx, 5
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
cmp byte [eax], 0
je 0x40b86a
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x560]
push ecx
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x40b86a
mov eax, dword [ebp - 4]
test eax, eax
je 0x40b86a
and byte [eax - 1], 0
push ebx
push dword [ebp - 4]
lea eax, [ebp - 0x960]
jmp 0x40b87a
cmp dword [ebp + 0x14], 0
je 0x40b883
push ebx
lea eax, [ebp - 0x560]
push dword [ebp + 0x14]
push eax
call fcn.0040af28
add esp, 0xc
push 0x58
lea eax, [ebp - 0x5c]
pop edi
push edi
push 0
push eax
call fcn.00416ce0
mov eax, dword [esi]
add esp, 0xc
test eax, eax
mov dword [ebp - 0x5c], edi
je 0x40b8a6
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x58], eax
jmp 0x40b8aa
and dword [ebp - 0x58], 0
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [ebp - 0x50], eax
mov edi, 0x400
test eax, eax
lea eax, [ebp - 0x960]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x560]
mov dword [ebp - 0x30], eax
mov eax, dword [esi + 4]
setne cl
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x44], ecx
neg eax
sbb eax, eax
and eax, 0x20
or eax, 0x80004
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x40b90b
cmp eax, 1
je 0x40b90b
cmp eax, 3
jne 0x40b907
mov eax, 0x100000
jmp 0x40b91c
xor eax, eax
jmp 0x40b91c
dec eax
neg eax
sbb eax, eax
and ax, 0xfe00
add eax, 0x200
or ah, 0x10
or dword [ebp - 0x28], eax
lea eax, [ebp - 0x160]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [esi + 8]
test eax, eax
je 0x40b945
cmp eax, 1
je 0x40b945
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.comdlg32.dll_GetSaveFileNameA]
jmp 0x40b94f
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.comdlg32.dll_GetOpenFileNameA]
mov dword [ebp + 0x10], eax
lea eax, [ebp - 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [ebp + 0x10], 0
je 0x40b9a5
cmp dword [esi + 8], 1
jne 0x40b97d
lea eax, [ebp - 0x960]
push edi
push eax
push dword [ebp + 8]
call fcn.00416d40
jmp 0x40b989
push ebx
push dword [ebp - 0x40]
push dword [ebp + 8]
call fcn.0040af28
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x40b9a5
movzx eax, word [ebp - 0x24]
push eax
push dword [ebp - 0x40]
push dword [ebp + 0x14]
call fcn.0040af28
add esp, 0xc
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x40c0f1
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x40c118
push esi
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x40c11a
push esi
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x40c118
mov eax, dword [eax + 0xc]
pop esi
mov eax, dword [eax]
mov eax, dword [eax]
ret
xor eax, eax
pop esi
ret

Function at 0x40c152
Capabilities:
Get hostname
Get session user name
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
and dword [esi + 8], 0
call fcn.0040bd0a
mov edi, dword [ebp + 8]
push dword [ebp + 0xc]
or dword [esi + 4], 0xffffffff
or dword [esi], 0xffffffff
and dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov dword [esi + 0x84], edi
call sub.WSOCK32.dll_htons
movzx eax, ax
mov dword [esi + 0x88], eax
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [esi + 0x10], eax
test eax, eax
setne cl
push ecx
mov ecx, esi
call fcn.0040c224
test eax, eax
je 0x40c216
push 0x32
lea ecx, [ebp - 4]
pop ebx
lea eax, [esi + 0x52]
push ecx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x40c1cc
push eax
push str.gethostname__
call fcn.0040baac
pop ecx
pop ecx
jmp 0x40c216
test edi, edi
jne 0x40c1ea
lea eax, [esi + 0x52]
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x40c1ea
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esi + 0x84], eax
lea eax, [ebp - 4]
lea edi, [esi + 0x20]
push eax
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
cmp eax, 1
je 0x40c20f
push ebx
push str.no_name
push edi
call fcn.0040af28
add esp, 0xc
mov dword [esi + 8], 1
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40c89f
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor ebx, ebx
push 0x10
lea eax, [ebp - 0x10]
push ebx
push eax
mov esi, ecx
call fcn.00416ce0
mov ax, word [ebp + 0xc]
add esp, 0xc
mov word [ebp - 0xe], ax
lea eax, [ebp - 0x10]
push 0x10
push eax
mov edi, dword [ebp + 8]
push ebx
push dword [ebp + 0x14]
mov word [ebp - 0x10], 2
mov dword [ebp - 0xc], edi
push dword [ebp + 0x10]
push dword [esi]
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x40c95e
call sub.WSOCK32.dll_WSAGetLastError
sub eax, 0x2742
je 0x40c921
sub eax, 0xf
jne 0x40c95a
cmp dword [0x4244b4], ebx
jne 0x40c95a
push ebx
push edi
mov dword [0x4244b4], 1
call sub.WSOCK32.dll_inet_ntoa
push eax
push str.sendto___failed._r_nPlease_set_default_gateway_in_TCP_IP_settings
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40c95a
mov ecx, esi
call fcn.0040c494
cmp eax, 1
jne 0x40c95a
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x40c941
push eax
mov ecx, esi
call fcn.0040c552
cmp eax, 1
jne 0x40c95a
lea eax, [ebp - 0x10]
push 0x10
push eax
push ebx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [esi]
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x40c95e
xor eax, eax
jmp 0x40c961
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x40c9a2
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
lea eax, [ebp - 0xc]
push edi
push eax
lea eax, [ebp - 0x20]
xor edi, edi
push eax
inc edi
push dword [ecx + 4]
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], 0x10
mov dword [ebp - 0x10], edi
call sub.WSOCK32.dll_accept
mov esi, dword [ebp + 0xc]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
je 0x40ca5e
push ebx
lea ecx, [ebp - 0x10]
push 4
push ecx
mov ebx, 0xffff
push edi
push ebx
push eax
call sub.WSOCK32.dll_setsockopt
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x18], edi
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], edi
movzx eax, word [ebp - 0x1e]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 0x300]
jmp 0x40ca2e
lea eax, [ebp - 4]
push 4
push eax
push 0x1001
push ebx
push dword [esi + 8]
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x40ca35
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
test eax, eax
mov dword [ebp - 4], eax
jg 0x40ca0e
mov ecx, dword [ebp - 8]
push esi
push dword [ebp + 8]
call fcn.0040cb6b
test eax, eax
pop ebx
je 0x40ca56
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x20], eax
mov dword [esi + 0x1c], eax
mov eax, edi
jmp 0x40ca60
push dword [esi + 8]
call sub.WSOCK32.dll_closesocket
xor eax, eax
pop edi
pop esi
leave
ret 8
Function at 0x40ca66
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
push 0
and dword [esi + 0x14], 0
inc edi
push edi
push 2
mov ebx, ecx
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 8], eax
je 0x40cb62
lea ecx, [ebp - 4]
mov dword [ebp - 4], edi
push ecx
push 0x8004667e
push eax
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
jne 0x40cb62
lea eax, [ebp - 4]
push 4
push eax
push edi
mov edi, 0xffff
push edi
push dword [esi + 8]
call sub.WSOCK32.dll_setsockopt
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + 0x300]
jmp 0x40caeb
lea eax, [ebp + 0xc]
push 4
push eax
push 0x1002
push edi
push dword [esi + 8]
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x40caf2
mov eax, dword [ebp + 0xc]
cdq
sub eax, edx
sar eax, 1
test eax, eax
mov dword [ebp + 0xc], eax
jg 0x40cacb
push esi
mov ecx, ebx
push dword [ebp + 8]
call fcn.0040cb6b
test eax, eax
je 0x40cb5a
push 0x10
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.00416ce0
mov ax, word [esi + 0x10]
add esp, 0xc
mov word [ebp - 0x12], ax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push 0x10
push eax
push dword [esi + 8]
mov word [ebp - 0x14], 2
call sub.WSOCK32.dll_connect
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
jne 0x40cb49
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x40cb5a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x20], eax
mov dword [esi + 0x1c], eax
xor eax, eax
inc eax
jmp 0x40cb64
push dword [esi + 8]
call sub.WSOCK32.dll_closesocket
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40e655
Capabilities:
Create thread
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x508
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x421c]
mov ecx, str._x:_x:
cmp dword [eax + 8], edi
jne 0x40e679
mov ecx, str._x:_x:_x:
mov eax, dword [eax + 4]
push ebx
push edi
push dword [eax + 8]
lea eax, [ebp - 0x108]
push dword [esi + 0xb0]
push ecx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esi + 0x421c]
add esp, 0x14
xor edx, edx
mov eax, dword [eax]
push edi
push edi
mov dword [eax + 0x18], 1
mov eax, dword [esi + 0x421c]
mov ecx, dword [esi + 0x38]
cmp dword [eax + 8], edi
mov eax, dword [ecx + 0xc]
setne dl
lea ebx, [eax + 1]
mov dword [ecx + 0xc], ebx
lea ebx, [ebp - 0x108]
lea edx, [edx + edx + 0x60]
push ebx
push edx
push eax
lea eax, [ebp - 0x508]
push eax
call fcn.0040c5de
mov eax, dword [esi + 0x421c]
mov ecx, dword [esi + 0x38]
push dword [eax]
push dword [esi + 0x20]
call fcn.0040cb9e
lea eax, [ebp - 0x508]
push edi
push eax
call fcn.004173a0
pop ecx
push eax
lea eax, [ebp - 0x508]
push eax
mov eax, dword [esi + 0x421c]
mov eax, dword [eax]
push dword [eax + 8]
call sub.WSOCK32.dll_send
mov ebx, eax
lea eax, [ebp - 0x508]
push eax
call fcn.004173a0
pop ecx
cmp ebx, eax
pop ebx
jl 0x40e821
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x421c]
mov ecx, dword [ecx]
mov dword [ecx + 0x20], eax
mov eax, dword [esi + 0x421c]
mov eax, dword [eax]
mov ecx, dword [eax + 0x20]
mov dword [eax + 0x1c], ecx
mov eax, dword [esi + 0x421c]
cmp dword [eax + 0x70], edi
jne 0x40e75f
mov ecx, dword [eax]
mov ecx, dword [ecx + 0x1c]
mov dword [eax + 0x70], ecx
mov eax, dword [esi + 0x421c]
cmp dword [eax + 8], edi
jne 0x40e775
push dword [eax + 4]
lea ecx, [eax + 0x10]
call fcn.0040e82d
mov eax, dword [esi + 0x418c]
push dword [eax + 0x2fc]
call fcn.00416cc4
pop ecx
mov ecx, dword [esi + 0x421c]
mov dword [ecx + 0x50], eax
mov eax, dword [esi + 0x421c]
cmp dword [eax + 8], edi
jne 0x40e7f6
mov ecx, dword [eax + 0x28]
or ecx, dword [eax + 0x2c]
jne 0x40e7f6
mov ecx, esi
call fcn.0040eeda
cmp eax, 1
jne 0x40e7c6
push eax
mov ecx, esi
call fcn.0040e9a4
mov eax, dword [esi + 0x421c]
mov dword [eax + 0x7c], 8
jmp 0x40e7d3
mov eax, dword [esi + 0x421c]
mov dword [eax + 0x7c], 9
mov ecx, dword [esi + 0x421c]
mov eax, dword [esi]
push 0x20
mov ecx, dword [ecx]
push dword [ecx + 8]
mov ecx, esi
push 0x483
call dword [eax + 0xa0]
xor eax, eax
inc eax
pop edi
pop esi
leave
ret
or dword [eax + 0x58], 0xffffffff
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x40e889
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi + 0x421c]
mov dword [ecx + 0x58], eax
mov eax, dword [esi + 0x421c]
cmp dword [eax + 0x58], edi
jne 0x40e7ef
push edi
mov ecx, esi
call fcn.0040f4b2
xor eax, eax
jmp 0x40e7f2
Function at 0x40eeda
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x421c]
cmp dword [eax + 8], edi
lea edx, [eax + 0x184]
jne 0x40ef00
lea edx, [eax + 0x80]
mov ecx, dword [eax + 0x1c]
cmp ecx, edi
je 0x40ef0b
mov eax, ecx
jmp 0x40ef0e
mov eax, dword [eax + 0x20]
push eax
lea eax, [ebp - 0x400]
push edx
push eax
call fcn.0040bc71
add esp, 0xc
cmp eax, 0x104
jl 0x40ef2e
push edi
push 0x421778
jmp 0x40ef5e
mov eax, dword [esi + 0x421c]
add eax, 0x10
mov ecx, dword [eax + 0xc]
cmp ecx, edi
je 0x40ef42
mov eax, ecx
jmp 0x40ef45
mov eax, dword [eax + 0x10]
push eax
lea eax, [ebp - 0x400]
push eax
call fcn.0040bc39
pop ecx
pop ecx
test eax, eax
push edi
jne 0x40ef67
push 0x421798
lea ecx, [ebp - 0x400]
push ecx
jmp 0x40efaa
push 0x80
push 2
push edi
push 3
lea eax, [ebp - 0x400]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [esi + 0x421c]
mov dword [ecx + 0x54], eax
mov eax, dword [esi + 0x421c]
cmp dword [eax + 0x54], 0xffffffff
jne 0x40efb8
cmp dword [eax + 8], edi
jne 0x40efb4
lea ecx, [ebp - 0x400]
push edi
push ecx
push str.Cant_create_file
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x90]
xor eax, eax
jmp 0x40efd0
test byte [eax + 0x25], 1
je 0x40efcd
lea eax, [ebp - 0x400]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
inc eax
pop edi
pop esi
leave
ret
Function at 0x40efd4
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0x421c]
mov edi, dword [ecx + 0x40]
mov ebx, dword [ecx + 0x28]
sub edi, dword [ecx + 0x48]
sub ebx, dword [ecx + 0x40]
mov eax, dword [ecx + 0x2c]
sbb eax, dword [ecx + 0x44]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x418c]
mov eax, dword [eax + 0x2fc]
sub eax, edi
cdq
cmp dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
jl 0x40f01d
jg 0x40f017
cmp ebx, eax
jbe 0x40f01d
mov ebx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
mov eax, dword [ecx + 0x50]
push 0
add eax, edi
push ebx
push eax
mov eax, dword [ecx]
push dword [eax + 8]
call sub.WSOCK32.dll_recv
mov ebx, eax
test ebx, ebx
jle 0x40f135
mov eax, dword [esi + 0x421c]
cmp dword [eax + 0x54], 0xffffffff
jne 0x40f055
mov ecx, esi
call fcn.0040eeda
test eax, eax
je 0x40f135
mov ecx, dword [esi + 0x421c]
mov eax, ebx
cdq
add edi, ebx
mov ebx, edx
mov edx, dword [ecx + 0x40]
mov dword [ebp - 0x10], eax
add edx, eax
mov eax, dword [ecx + 0x44]
adc eax, ebx
cmp eax, dword [ecx + 0x2c]
jg 0x40f089
jl 0x40f07b
cmp edx, dword [ecx + 0x28]
jae 0x40f089
mov eax, dword [esi + 0x418c]
cmp dword [eax + 0x2fc], edi
jne 0x40f0b5
lea eax, [ebp - 4]
push 0
push eax
push edi
push dword [ecx + 0x50]
push dword [ecx + 0x54]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x40f11f
cmp edi, dword [ebp - 4]
jne 0x40f11f
mov ecx, dword [esi + 0x421c]
mov eax, edi
cdq
add dword [ecx + 0x48], eax
adc dword [ecx + 0x4c], edx
mov eax, dword [esi + 0x421c]
mov ecx, dword [ebp - 0x10]
add dword [eax + 0x40], ecx
adc dword [eax + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x421c]
mov edx, eax
mov ecx, dword [ecx]
sub edx, dword [ecx + 0x20]
cmp edx, 0x3e8
jb 0x40f0f5
mov dword [ecx + 0x20], eax
mov eax, dword [esi]
push 0
push 0
push 0x470
mov ecx, esi
call dword [eax + 0xa0]
mov esi, dword [esi + 0x421c]
mov eax, dword [esi + 0x44]
cmp eax, dword [esi + 0x2c]
jl 0x40f11a
jg 0x40f10d
mov eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x28]
jb 0x40f11a
mov eax, dword [esi + 8]
neg eax
sbb eax, eax
add eax, 8
mov dword [esi + 0x7c], eax
xor eax, eax
inc eax
jmp 0x40f137
mov eax, dword [esi]
push 0
push 0x420890
push str.Cant_write_file
mov ecx, esi
call dword [eax + 0x90]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4156c5
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push esi
mov esi, dword [ebp + 0xc]
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x4156e8
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x415744
push 0x140
push 0
push esi
call fcn.00416ce0
add esp, 0xc
push 0
push 0x2000000
push 3
push 0
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x415749
lea eax, [ebp - 0x34]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
push edi
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0xc], 0
je 0x415749
lea eax, [ebp - 0x34]
push 0x1c
push eax
push esi
call fcn.00416d40
add esp, 0xc
xor eax, eax
inc eax
jmp 0x41575e
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [esi], eax
mov eax, ecx
pop edi
pop esi
leave
ret

Function at 0x416334
Capabilities:
Set registry value

Disassembly:
push esi
mov esi, ecx
push dword [esp + 0xc]
call fcn.004173a0
pop ecx
inc eax
push eax
mov eax, dword [esi + 4]
push dword [esp + 0x10]
push 1
push 0
push dword [esp + 0x18]
push dword [esi + eax*4 + 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
neg eax
sbb eax, eax
pop esi
inc eax
ret 8

Function at 0x41a4a5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4241f0
cmp edx, dword [eax]
je 0x41a4c7
add eax, 8
inc ecx
cmp eax, 0x424280
jl 0x41a4b8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4241f0]
jne 0x41a5f5
mov eax, dword [0x424514]
cmp eax, 1
je 0x41a5cf
test eax, eax
jne 0x41a4f8
cmp dword [0x421f04], 1
je 0x41a5cf
cmp edx, 0xfc
je 0x41a5f5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41a52f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00417110
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004173a0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x41a572
lea eax, [ebp - 0x1a4]
push eax
call fcn.004173a0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x41ce60
push edi
call fcn.004180d0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00417110
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00417120
lea eax, [ebp - 0xa0]
push 0x41ce40
push eax
call fcn.00417120
push dword [esi + 0x4241f4]
lea eax, [ebp - 0xa0]
push eax
call fcn.00417120
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0041abaa
add esp, 0x2c
pop edi
jmp 0x41a5f5
lea eax, [ebp + 8]
lea esi, [esi + 0x4241f4]
push 0
push eax
push dword [esi]
call fcn.004173a0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x42e00c
nop
nop
pop eax
nop
nop
nop
add eax, 0x403ac5
nop
nop
sub eax, 0x403a6b
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x42e030
nop
nop
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x42e01e
nop
nop
nop
popal
nop
nop
nop
nop
jmp loc.00401219

Function at 0x431000
Capabilities:
Encode data using xor

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
push 4
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
cmp eax, 0
nop
nop
nop
je 0x431072
nop
nop
nop
nop
nop
mov ebx, 0x40915c
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x1fbf615b
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
nop
loop 0x431060
mov eax, section..rsrc
nop
cmp eax, 0
nop
nop
nop
nop
je 0x4310d2
nop
nop
nop
mov ebx, 0x42f3f8
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x7cf45dbd
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x4310c0
nop
nop
nop
nop
nop
popal
nop
jmp 0x401219