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

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push esi
xor esi, esi
mov dword [esp + 4], esi
mov dword [eax], esi
lea eax, [esp + 8]
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x53b5e2
push ebx
mov ebx, dword [esp + 0xc]
push edi
test ebx, ebx
je 0x53b5cc
push ebp
mov eax, dword [ebx + 4]
cmp eax, 2
jne 0x53b47f
lea ebp, [eax + 0xe]
jmp 0x53b48b
cmp eax, 0x17
jne 0x53b539
lea ebp, [eax + 5]
cmp dword [ebx + 0x18], 0
je 0x53b539
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x53b539
cmp eax, ebp
jb 0x53b539
push 0x20
call dword [0x6412b0]
mov edi, eax
add esp, 4
test edi, edi
je 0x53b5c1
mov ecx, dword [ebx]
mov dword [edi], ecx
mov ecx, dword [ebx + 4]
mov dword [edi + 4], ecx
mov ecx, dword [ebx + 8]
mov dword [edi + 8], ecx
mov eax, dword [ebx + 0xc]
push ebp
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], ebp
mov dword [edi + 0x18], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
call dword [0x6412b0]
add esp, 4
mov dword [edi + 0x18], eax
test eax, eax
je 0x53b5b0
push ebp
push dword [ebx + 0x18]
push eax
call fcn.004eecb0
mov eax, dword [ebx + 0x14]
add esp, 0xc
test eax, eax
je 0x53b525
push eax
call dword [0x6412bc]
add esp, 4
mov dword [edi + 0x14], eax
test eax, eax
je 0x53b596
mov eax, dword [esp + 0x10]
test esi, esi
cmove esi, edi
test eax, eax
je 0x53b535
mov dword [eax + 0x1c], edi
mov dword [esp + 0x10], edi
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x53b472
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
pop ebp
test eax, eax
je 0x53b558
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebx, ebx
je 0x53b5c8
test esi, esi
je 0x53b585
push dword [esi + 0x18]
call dword [0x6412b4]
push dword [esi + 0x14]
call dword [0x6412b4]
mov edi, dword [esi + 0x1c]
push esi
call dword [0x6412b4]
add esp, 0xc
mov esi, edi
test edi, edi
jne 0x53b560
mov eax, dword [esp + 0x28]
xor esi, esi
pop edi
mov dword [eax], esi
mov eax, ebx
pop ebx
pop esi
add esp, 0xc
ret
push dword [edi + 0x18]
mov ebx, 8
call dword [0x6412b4]
push edi
call dword [0x6412b4]
add esp, 8
jmp 0x53b548
push edi
mov ebx, 8
call dword [0x6412b4]
add esp, 4
jmp 0x53b548
mov ebx, 8
jmp 0x53b548
test esi, esi
jne 0x53b5d8
mov ebx, 0x2af9
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
pop edi
mov dword [eax], esi
mov eax, ebx
pop ebx
pop esi
add esp, 0xc
ret
Function at 0x53f310
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1004
call fcn.004ed3f0
mov eax, dword [0x640844]
xor eax, esp
mov dword [esp + 0x1000], eax
mov eax, dword [esp + 0x1008]
push eax
call fcn.0051558d
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x53f379
push 0x1000
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x53f379
lea eax, [esp]
push eax
call dword [0x6412bc]
add esp, 4
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.004ed0cc
add esp, 0x1004
ret
mov ecx, dword [esp + 0x1000]
xor eax, eax
xor ecx, esp
call fcn.004ed0cc
add esp, 0x1004
ret

Function at 0x544b00
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x88
mov eax, dword [0x640844]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x9c]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0x80
push eax
mov ebp, dword [edi + 0x1c4]
or esi, 0xffffffff
mov ebx, dword [edi]
push ebp
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x544b62
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
push ebp
push edi
call fcn.0052b690
add esp, 8
cmp esi, 0xffffffff
jne 0x544b86
push str.Error_accept__ing_server_connect
push ebx
call fcn.0052aac0
add esp, 8
mov eax, 0x1e
jmp 0x544bf8
push str.Connection_accepted_from_server_n
push ebx
call fcn.0052abb0
and dword [edi + 0x29c], 0xffffefff
push 1
push esi
mov dword [edi + 0x1c4], esi
call fcn.00553230
add esp, 0x10
mov byte [edi + 0x1d1], 1
cmp dword [ebx + 0x608], 0
je 0x544bf6
push 1
push ebx
call fcn.0051c120
mov eax, dword [ebx + 0x608]
push 1
push esi
push dword [ebx + 0x60c]
call eax
push 0
push ebx
mov esi, eax
call fcn.0051c120
add esp, 0x1c
test esi, esi
je 0x544bf6
push edi
call fcn.005450a0
add esp, 4
mov eax, 0x2a
jmp 0x544bf8
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ed0cc
add esp, 0x88
ret
Function at 0x54c130
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
mov byte [esp + 0x16], al
lea eax, [esp + 0x14]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x1c0]
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x54c17c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.0052aac0
add esp, 0xc
push dword [esp + 0x18]
push ebx
push str.SENT
push dword [esi]
call fcn.0054bd30
add esp, 0x10
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
mov eax, dword [esp + 8]
push ebx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov ebx, dword [eax + 0x14c]
jne 0x54c40e
push ebp
push edi
lea ebp, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], ebp
cmp ebp, edi
jae 0x54c30e
lea eax, [ebp + 1]
mov byte [ebp], 0xff
mov dword [edi], eax
cmp eax, edi
jae 0x54c30e
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x54c30e
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
movzx eax, ax
mov dword [esp + 0x1c], eax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov edx, dword [esp + 0x1c]
movzx ecx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x54c379
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x54c379
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x54c379
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x54c379
shr ecx, 8
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x54c379
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x54c379
mov byte [eax], 0xf0
mov eax, dword [edi]
inc eax
mov esi, dword [esp + 0x10]
mov dword [ebx + 0x1eb4], eax
sub eax, ebp
sub eax, 2
mov dword [edi], ebp
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push esi
call fcn.0054be40
mov edi, dword [esp + 0x28]
add esp, 0x10
push 0
push 3
push ebp
push dword [edi + 0x1c0]
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x54c3cd
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0052aac0
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push edi
call fcn.0054c1a0
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [edi + 0x1c0]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x54c40b
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0052aac0
add esp, 0xc
pop esi
pop edi
pop ebp
pop ebx
pop ecx
ret
Function at 0x54d940
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x8c
mov eax, dword [0x640844]
xor eax, esp
mov dword [esp + 0x88], eax
push ebx
push ebp
mov ebp, dword [esp + 0x98]
lea eax, [esp + 8]
push esi
push edi
push eax
mov edi, dword [ebp + 0x4a8]
lea eax, [esp + 0x1c]
mov ebx, dword [ebp]
push eax
mov dword [esp + 0x18], 0x80
mov eax, dword [edi + 0x154]
push 0
add eax, 4
push eax
push dword [edi + 0x15c]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x148], 0
mov dword [edi + 0x14c], eax
jne 0x54d9c6
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
lea eax, [edi + 0xc8]
push eax
call fcn.004eecb0
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [edi + 0x148], eax
mov esi, dword [edi + 0x14c]
cmp esi, 4
jge 0x54da01
push str.Received_too_short_packet
push ebx
call fcn.0052aac0
add esp, 8
mov dword [edi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ed0cc
add esp, 0x8c
ret
mov edx, dword [edi + 0x15c]
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xc], ecx
dec ecx
cmp ecx, 5
ja case.0x54da20.1
jmp dword [ecx*4 + 0x54db34]
cmp esi, 4
jle case.0x54da20.4
movzx ecx, byte [edx + 2]
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x40]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x54da20.4
lea eax, [esi - 4]
push eax
lea eax, [edx + 4]
push eax
push 1
push ebp
call fcn.0052aa00
mov esi, eax
add esp, 0x10
test esi, esi
je 0x54da78
push 5
push edi
call fcn.0054e4e0
add esp, 8
mov eax, esi
jmp 0x54d9e8
mov eax, dword [edi + 0x14c]
sub eax, 4
cdq
add dword [ebx + 0x98], eax
adc dword [ebx + 0x9c], edx
push dword [ebx + 0x9c]
push dword [ebx + 0x98]
push ebx
call fcn.00538050
jmp 0x54db08
movzx ecx, byte [edx + 2]
lea eax, [edx + 4]
mov dword [esp + 0x14], eax
add esi, 0xfffffffc
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
lea eax, [edx + 4]
push esi
push eax
mov dword [edi + 8], ecx
call fcn.0054d610
add esp, 8
cmp eax, esi
jae case.0x54da20.4
push dword [esp + 0x14]
push str.TFTP_error:__s_n
push ebx
call fcn.0052abb0
jmp 0x54db08
lea eax, [esi - 2]
push eax
lea eax, [edx + 2]
push eax
push edi
call fcn.0054d6c0
add esp, 0xc
test eax, eax
je case.0x54da20.4
jmp 0x54d9e8
push str.Internal_error:_Unexpected_packet
push 0x5e0fa8
push ebx
call fcn.0052aac0
add esp, 0xc
push ebp
call fcn.00538420
add esp, 4
test eax, eax
je 0x54d9e6
push 5
push edi
call fcn.0054e4e0
add esp, 8
mov eax, 0x2a
jmp 0x54d9e8
Function at 0x55dc70
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
sub esp, 0x24
mov eax, dword [0x640844]
xor eax, esp
mov dword [esp + 0x20], eax
push edi
mov edi, dword [esp + 0x30]
lea eax, [esp + 4]
push 0xf0000000
push 1
push 0
push 0
push eax
mov dword [esp + 0x1c], 8
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x55dd70
push esi
mov esi, dword [esp + 0x38]
push 8
mov dword [esp + 0x18], 0x208
mov dword [esp + 0x1c], 0x6601
mov dl, byte [esi + 1]
mov cl, byte [esi]
mov al, dl
shr al, 1
mov byte [esp + 0x24], cl
shl cl, 7
or al, cl
shl dl, 6
mov cl, byte [esi + 2]
mov byte [esp + 0x25], al
mov al, cl
shr al, 2
or al, dl
shl cl, 5
mov dl, byte [esi + 3]
mov byte [esp + 0x26], al
mov al, dl
shr al, 3
or al, cl
shl dl, 4
mov cl, byte [esi + 4]
mov byte [esp + 0x27], al
mov al, cl
shr al, 4
or al, dl
shl cl, 3
mov dl, byte [esi + 5]
mov byte [esp + 0x28], al
mov al, dl
shr al, 5
or al, cl
shl dl, 2
mov cl, byte [esi + 6]
mov byte [esp + 0x29], al
mov al, cl
shr al, 6
add cl, cl
or al, dl
mov dword [esp + 0x20], 8
mov byte [esp + 0x2a], al
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0x2f], cl
call fcn.00560860
add esp, 8
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x14
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
pop esi
test eax, eax
jne 0x55dd82
push eax
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor al, al
pop edi
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004ed0cc
add esp, 0x24
ret
mov eax, dword [esp + 0x2c]
push dword [esp + 8]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [edi + 4], eax
lea eax, [esp + 0xc]
push eax
push edi
push 0
push 0
push 0
push dword [esp + 0x24]
mov dword [edi], ecx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [esp + 0x24]
mov al, 1
pop edi
xor ecx, esp
call fcn.004ed0cc
add esp, 0x24
ret
Function at 0x5608b0
Capabilities:
Hash data using md4
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0xc
push 0xf0000000
push 1
push 0
push 0
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
mov dword [esp + 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x5608f5
lea eax, [esp + 8]
push eax
push 0
push 0
push 0x8002
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
push dword [esp + 0x18]
call fcn.0052d250
add esp, 4
push 0
push eax
push dword [esp + 0x1c]
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
push 0
lea eax, [esp + 4]
mov dword [esp + 4], 0
push eax
push 0
push 2
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
cmp dword [esp], 0x10
jne 0x56094c
push 0
lea eax, [esp + 4]
push eax
push dword [esp + 0x18]
push 2
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov eax, dword [esp + 8]
test eax, eax
je 0x56095b
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 4]
test eax, eax
je 0x56096c
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
add esp, 0xc
ret

Function at 0x5609c0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [0x6412b0]
mov edi, eax
add esp, 4
test edi, edi
jne 0x5609e7
pop edi
pop esi
pop ecx
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x1c]
mov dword [edi + 8], eax
push ebp
cmp ebx, dword [esi + 0x10]
jbe 0x560a32
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [esp + 0x24]
push dword [edi + 4]
call eax
mov ebp, dword [edi + 8]
push dword [edi + 4]
add ebp, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ebp
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov ecx, dword [edi + 4]
mov dword [esp + 0x20], ebx
jmp 0x560a36
mov ebp, dword [esp + 0x1c]
mov eax, dword [esi]
push ecx
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [esp + 0x28]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x560a96
mov dword [esp + 0x10], eax
mov ebx, eax
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x24], al
lea eax, [esp + 0x24]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub ebx, 1
jne 0x560a55
mov ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0x10]
jae 0x560ac7
nop dword [eax + eax]
mov eax, dword [esi + 4]
push 1
push 0x5fd2d6
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x5fd2d7
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x560aa0
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
pop ecx
ret
Function at 0x5612b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x640844]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x56136a
cmp byte [esi + 0x3d], 0
je 0x56136a
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x561358
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
mov edx, dword [ecx]
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x561320
sub eax, 1
je 0x561324
sub eax, 2
jne 0x561358
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x561341
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.004f8637
add esp, 0x10
cmp edi, eax
jne 0x561358
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret
Function at 0x561700
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x640844]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x561730
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x56176c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x56176c
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x561852
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x561794
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x5617c7
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.004faadb
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
mov edx, dword [ecx]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x1c]
sub eax, 0
je 0x561825
sub eax, 1
je 0x561825
sub eax, 2
jne 0x561852
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.00560c30
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x561842
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.004f8637
add esp, 0x10
cmp edi, eax
jne 0x561852
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x561757
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ed0cc
mov esp, ebp
pop ebp
ret 4
Function at 0x570210
Capabilities:
Access the windows event log
Write file on windows

Disassembly:
mov eax, 0x108
call fcn.004ed3f0
mov eax, dword [0x640844]
xor eax, esp
mov dword [esp + 0x104], eax
push esi
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
test esi, esi
je 0x5702af
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
je 0x5702af
lea eax, [esp + 0x114]
push eax
push 0
push dword [esp + 0x118]
lea eax, [esp + 0x14]
push 0x100
push eax
call fcn.00428770
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.004f64b1
add esp, 0x1c
or ecx, 0xffffffff
test eax, eax
cmovs eax, ecx
lea ecx, [esp + 4]
push 0
push ecx
test eax, eax
mov ecx, 0x100
cmovs eax, ecx
push eax
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004ed0cc
add esp, 0x108
ret
lea eax, [esp + 0x114]
push eax
push 0
push dword [esp + 0x118]
lea eax, [esp + 0x14]
push 0xff
push eax
call fcn.00428770
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.004f64b1
add esp, 0x1c
mov byte [esp + 0x107], 0
call fcn.005700d0
test eax, eax
jle 0x570343
push str.OpenSSL
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
test esi, esi
je 0x570357
push 0
lea eax, [esp + 0xc]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push eax
push 0
push 1
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004ed0cc
add esp, 0x108
ret
push 0x10
push str.OpenSSL:_FATAL
lea eax, [esp + 0x10]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x108]
pop esi
xor ecx, esp
call fcn.004ed0cc
add esp, 0x108
ret
Function at 0x595280
Capabilities:
Check if file exists

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
push esi
push dword [esp + 0x10]
call fcn.00595350
mov edi, eax
add esp, 8
test edi, edi
jne 0x595311
push 0xaf
push str..crypto_bio_bss_file.c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
push 2
call fcn.0056f540
push 0x61a06c
push esi
push 0x61a070
push dword [esp + 0x2c]
push str.fopen_
push 5
call fcn.0056ed90
add esp, 0x2c
call fcn.004f24f9
cmp dword [eax], 2
je 0x5952ef
call fcn.004f24f9
cmp dword [eax], 6
je 0x5952ef
lea eax, [edi + 2]
mov ecx, 0xb8
jmp 0x5952f9
mov eax, 0x80
mov ecx, 0xb6
push ecx
push str..crypto_bio_bss_file.c
push eax
push 0x6d
push 0x20
call fcn.0056f540
add esp, 0x14
xor eax, eax
pop edi
pop esi
ret
push 0x641818
call fcn.0056e280
mov esi, eax
add esp, 4
test esi, esi
jne 0x595332
push edi
call fcn.004f7b75
add esp, 4
xor eax, eax
pop edi
pop esi
ret
push 0
push esi
call fcn.0056deb0
push edi
push 1
push 0x6a
push esi
call fcn.0056dee0
add esp, 0x18
mov eax, esi
pop edi
pop esi
ret

Function at 0x596a40
Capabilities:
Encode data using base64

Disassembly:
mov eax, 4
call fcn.004ed3f0
push esi
mov esi, dword [esp + 0x14]
xor ecx, ecx
mov dword [esp + 4], ecx
test esi, esi
jle 0x596b43
mov edx, dword [esp + 0xc]
push ebx
push ebp
push edi
mov edi, dword [esp + 0x1c]
inc edi
nop dword [eax]
movzx eax, byte [edi - 1]
cmp esi, 3
jb 0x596ac8
movzx ecx, byte [edi]
shl eax, 8
or eax, ecx
movzx ecx, byte [edi + 1]
shl eax, 8
or eax, ecx
mov ecx, eax
shr ecx, 0x12
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edx], cl
mov ecx, eax
shr ecx, 0xc
and ecx, 0x3f
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edx + 1], cl
mov ecx, eax
and ecx, 0x3f
shr eax, 6
add edx, 2
and eax, 0x3f
mov bl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov ecx, edx
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x596b14
shl eax, 0x10
cmp esi, 2
jne 0x596ad8
movzx ecx, byte [edi]
shl ecx, 8
or eax, ecx
mov ecx, eax
shr ecx, 0x12
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edx], cl
mov ecx, eax
shr ecx, 0xc
and ecx, 0x3f
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edx + 1], cl
add edx, 2
mov ecx, edx
cmp esi, 1
jne 0x596b06
mov al, 0x3d
jmp 0x596b12
shr eax, 6
and eax, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov bl, 0x3d
lea ebp, [ecx + 2]
mov byte [edx], al
mov byte [ecx + 1], bl
sub esi, 3
mov ecx, dword [esp + 0x10]
add edi, 3
add ecx, 4
mov edx, ebp
mov dword [esp + 0x10], ecx
test esi, esi
jg 0x596a70
pop edi
mov byte [ebp], 0
mov eax, ecx
pop ebp
pop ebx
pop esi
pop ecx
ret
mov eax, dword [esp + 0xc]
pop esi
mov byte [eax], cl
mov eax, ecx
pop ecx
ret