joyce8/EMBER2024-capa huggingface dataset:
Function at 0x507c02
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push esi
push edi
xor edi, edi
cmp dword [ebp + 0xc], edi
jle 0x507c20
mov esi, dword [ebp + 8]
cmp esi, edi
je 0x507c20
cmp byte [esi], 0
jne 0x507c32
xor eax, eax
inc eax
pop edi
pop esi
leave
ret
push 0x800
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [0x509d08], edi
jne 0x507c27
mov edi, dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push ebx
lea eax, [ebp - 0x11c]
push esi
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea eax, [ebp - 0x11c]
lea esi, [ebp - 0x11c]
push eax
dec esi
call ebx
cmp byte [eax + esi], 0x5c
je 0x507c79
lea eax, [ebp - 0x11c]
push 0x502f48
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x11c]
push 0x50385c
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
push 0x140
lea eax, [ebp - 0x25c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
and dword [ebp - 4], 0
cmp dword [ebp - 4], 0
lea eax, [ebp - 0x25c]
push eax
jne 0x507ce0
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x507ccb
and dword [ebp - 4], 0
cmp dword [ebp - 4], 0
je 0x507d9d
push dword [ebp + 8]
call fcn.005073ae
pop ecx
jmp 0x507cf1
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
test eax, eax
je 0x507d94
cmp byte [ebp - 0x230], 0x2e
jne 0x507d15
cmp byte [ebp - 0x22f], 0
je 0x507ca5
cmp byte [ebp - 0x22f], 0x2e
jne 0x507d15
cmp byte [ebp - 0x22e], 0
je 0x507ca5
push dword [ebp + 8]
lea eax, [ebp - 0x11c]
push eax
call edi
lea eax, [ebp - 0x11c]
push eax
call ebx
cmp byte [eax + esi], 0x5c
je 0x507d42
lea eax, [ebp - 0x11c]
push 0x502f48
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
test byte [ebp - 0x25c], 0x10
je 0x507d7f
push 0x4b
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov eax, dword [ebp + 0xc]
dec eax
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.00507c02
pop ecx
pop ecx
jmp 0x507ca5
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.005077a3
jmp 0x507d78
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_FindClose]
xor eax, eax
pop ebx
jmp 0x507c23
Function at 0x507da5
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push edi
lea eax, [ebp - 0x84]
push 0x50387c
push eax
call esi
lea eax, [ebp - 0x44]
push 0x50386c
push eax
call esi
and dword [ebp - 4], 0
mov edi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
mov esi, 0x184
mov ebx, 0x502f48
push esi
lea eax, [ebp - 0x208]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp - 4], 0
lea eax, [ebp - 0x208]
push esi
push eax
jne 0x507e0c
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
jmp 0x507e17
push 0x503860
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
cmp byte [ebp - 0x208], 0
je 0x507e81
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea ecx, [ebp - 0x208]
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x507e44
lea eax, [ebp - 0x208]
push ebx
push eax
call edi
cmp dword [ebp - 4], 1
jne 0x507e61
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x208]
push eax
call edi
lea eax, [ebp - 0x208]
push ebx
push eax
call edi
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x208]
push eax
call edi
lea eax, [ebp - 0x208]
push 5
push eax
call fcn.00507c02
pop ecx
pop ecx
inc dword [ebp - 4]
cmp dword [ebp - 4], 2
jl 0x507de4
pop edi
pop esi
pop ebx
leave
ret

Function at 0x507e93
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
push esi
mov esi, 0x104
lea eax, [ebp - 0x104]
push esi
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x104]
push esi
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
mov bl, byte [ebp - 0x104]
lea eax, [ebp - 0x103]
push 0x503898
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
lea eax, [ebp - 0x104]
push 0xf
push eax
call fcn.00507c02
mov esi, dword [sym.imp.KERNEL32.DLL_GetDriveTypeA]
pop ecx
pop ecx
mov byte [ebp - 0x104], 0x43
cmp byte [ebp - 0x104], bl
je 0x507f23
lea eax, [ebp - 0x104]
push eax
call esi
cmp eax, 3
je 0x507f13
cmp eax, 6
jne 0x507f23
lea eax, [ebp - 0x104]
push 0xf
push eax
call fcn.00507c02
pop ecx
pop ecx
inc byte [ebp - 0x104]
cmp byte [ebp - 0x104], 0x5a
jl 0x507ef8
mov byte [ebp - 0x104], 0x43
cmp byte [ebp - 0x104], bl
je 0x507f5f
lea eax, [ebp - 0x104]
push eax
call esi
cmp eax, 4
jne 0x507f5f
lea eax, [ebp - 0x104]
push 5
push eax
call fcn.00507c02
pop ecx
pop ecx
inc byte [ebp - 0x104]
cmp byte [ebp - 0x104], 0x5a
jl 0x507f39
pop esi
pop ebx
leave
ret
Function at 0x507fa8
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x507fb6
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
cmp edi, 8
mov ecx, 0xff
not esi
jl 0x508083
mov eax, edi
push ebx
shr eax, 3
mov ebx, eax
neg ebx
lea edi, [edi + ebx*8]
mov dword [ebp + 0x10], edi
mov bl, byte [edx]
mov edi, esi
xor ebx, esi
and ebx, ecx
shr edi, 8
mov esi, dword [ebx*4 + 0x5038a8]
xor esi, edi
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
mov edi, dword [ebx*4 + 0x5038a8]
xor edi, esi
inc edx
mov bl, byte [edx]
xor ebx, edi
and ebx, ecx
shr edi, 8
mov esi, dword [ebx*4 + 0x5038a8]
xor esi, edi
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
mov edi, dword [ebx*4 + 0x5038a8]
xor edi, esi
inc edx
mov bl, byte [edx]
xor ebx, edi
and ebx, ecx
shr edi, 8
mov esi, dword [ebx*4 + 0x5038a8]
xor esi, edi
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
mov edi, dword [ebx*4 + 0x5038a8]
xor edi, esi
inc edx
mov bl, byte [edx]
xor ebx, edi
and ebx, ecx
shr edi, 8
mov esi, dword [ebx*4 + 0x5038a8]
xor esi, edi
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
mov edi, dword [ebx*4 + 0x5038a8]
xor esi, edi
inc edx
dec eax
jne 0x507fde
mov edi, dword [ebp + 0x10]
pop ebx
test edi, edi
je 0x50809d
mov al, byte [edx]
xor eax, esi
and eax, ecx
shr esi, 8
mov eax, dword [eax*4 + 0x5038a8]
xor esi, eax
inc edx
dec edi
jne 0x508087
mov eax, esi
pop edi
not eax
pop esi
pop ebp
ret

Function at 0x508128
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
push ebx
push esi
xor esi, esi
push edi
push esi
push esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.DLL_ReadFile]
mov dword [ebp - 8], esi
mov ebx, 0x400
jmp 0x50816f
cmp dword [ebp - 4], esi
je 0x508188
push dword [ebp - 4]
lea eax, [ebp - 0x408]
push eax
push dword [ebp - 8]
call fcn.00507fa8
add esp, 0xc
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x408]
push ebx
push eax
push dword [ebp + 8]
mov dword [ebp - 4], esi
call edi
test eax, eax
jne 0x508152
push esi
push esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x5083d7
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
sub esp, 0x414
push esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
mov esi, dword [esp + 0x41c]
test esi, esi
jne 0x508400
push esi
call dword [sym.imp.KERNEL32.DLL_ExitThread]
push 5
lea edi, [esp + 8]
pop ecx
lea eax, [esp + 0x18]
push 0x503d78
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [esp + 0x18]
push 0x503d68
push eax
call esi
call fcn.00505808
movzx eax, ax
push 0x64
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
pop ebx
mov ebp, dword [sym.imp.KERNEL32.DLL_lstrlenA]
cdq
mov ecx, ebx
idiv ecx
cmp edx, 0x50
jge 0x50847f
call fcn.00505808
movzx eax, ax
cdq
mov ecx, ebx
idiv ecx
mov eax, 0x503d64
cmp edx, 0x50
jl 0x508468
mov eax, 0x503d60
push eax
lea eax, [esp + 0x1c]
push 0x503d48
push eax
call ebp
lea eax, [esp + eax + 0x20]
push eax
call edi
add esp, 0xc
call fcn.00505808
movzx eax, ax
cdq
mov ecx, ebx
idiv ecx
cmp edx, 0x50
jge 0x50849d
lea eax, [esp + 0x18]
push 0x503d24
push eax
call esi
lea eax, [esp + 0x18]
push 0x503ce0
push eax
call esi
call fcn.00505808
movzx eax, ax
cdq
mov ecx, ebx
idiv ecx
mov eax, 0x503cd8
cmp edx, 0x50
jl 0x5084c5
mov eax, 0x503d60
push eax
lea eax, [esp + 0x1c]
push dword [esp + 8]
push 0x503cc8
push eax
call ebp
lea eax, [esp + eax + 0x24]
push eax
call edi
add esp, 0x10
call fcn.00505808
movzx eax, ax
cdq
idiv ebx
cmp edx, 0x5a
jge 0x5084fc
lea eax, [esp + 0x18]
push 0x503cac
push eax
call esi
lea eax, [esp + 0x18]
push 0x503ca8
push eax
call esi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
mov ebx, dword [sym.imp.KERNEL32.DLL_Sleep]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
lea eax, [esp + 8]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x508540
push esi
call edi
push 0x400
call ebx
jmp 0x508514
lea eax, [esp + 0x18]
push 0
push eax
call ebp
push eax
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
call fcn.00505808
movzx eax, ax
cdq
mov ecx, 0x3e8
idiv ecx
add edx, 0xfa
push edx
call ebx
push esi
call edi
jmp 0x508514
Function at 0x508574
Capabilities:
Create thread
Resolve dns

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebp, 0x503dbc
jmp 0x508593
push 0xea60
call dword [sym.imp.KERNEL32.DLL_Sleep]
call fcn.00505bab
test eax, eax
je 0x508588
call fcn.00505808
movzx eax, ax
push 0x64
cdq
pop ecx
idiv ecx
cmp edx, 0x21
jge 0x5085cb
mov ebx, 0x503dac
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x5085e4
mov ebx, 0x503da0
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x5085e4
mov ebx, 0x503d8c
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x5085e4
push ebp
mov ebx, ebp
call edi
mov esi, eax
test esi, esi
je 0x508588
push 0x14
lea eax, [esp + 0x18]
push 0
push eax
call sub.MSVCRT.dll_memset
mov word [esp + 0x24], 2
mov eax, dword [esi + 0xc]
add esp, 0xc
mov eax, dword [eax]
push 0x50
mov eax, dword [eax]
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x3f
mov word [esp + 0x1e], ax
mov dword [esp + 0x18], ebx
pop esi
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
xor eax, eax
push eax
push ecx
push fcn.005083d7
push eax
push eax
call dword [sym.imp.KERNEL32.DLL_CreateThread]
dec esi
jne 0x50861b
lea eax, [esp + 0x14]
push eax
call fcn.005083d7
Function at 0x508e6a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push 3
add eax, 0x2b7
push connect
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
jne 0x508e9e
xor eax, eax
inc eax
jmp 0x508f7a
push ebx
push esi
xor esi, esi
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], edi
xor ebx, ebx
mov dword [ebp - 0x10], edi
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 4], eax
jb 0x508ed7
lea eax, [ebp - 0x14]
push edi
push eax
lea eax, [ebp - 0x418]
push 0x400
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp dword [ebp - 0x14], edi
je 0x508f38
mov dword [ebp - 4], edi
mov eax, dword [ebp - 4]
inc esi
inc dword [ebp - 4]
cmp esi, 3
mov al, byte [ebp + eax - 0x418]
mov byte [ebp + esi - 0xd], al
jne 0x508ead
lea edx, [ebp - 8]
lea eax, [ebp - 0xc]
call fcn.00508e06
xor esi, esi
mov eax, dword [ebp + 8]
mov cl, byte [ebp + esi - 8]
mov byte [ebx + eax], cl
inc ebx
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x4c
jb 0x508f1c
mov byte [ebx + eax], 0xd
inc ebx
mov dword [ebp - 0x10], edi
mov byte [ebx + eax], 0xa
inc ebx
inc esi
cmp esi, 4
jb 0x508efb
push 3
lea eax, [ebp - 0xc]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
xor esi, esi
jmp 0x508ead
cmp esi, edi
je 0x508f66
lea edx, [ebp - 8]
lea eax, [ebp - 0xc]
call fcn.00508e06
cmp esi, 3
jae 0x508f50
mov byte [ebp - 5], 0x3d
cmp esi, 2
jae 0x508f59
mov byte [ebp - 6], 0x3d
mov eax, dword [ebp + 8]
lea esi, [ebp - 8]
lea edi, [ebx + eax]
add ebx, 4
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 8]
push dword [ebp - 0x18]
and byte [ebx + eax], 0
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop esi
xor eax, eax
pop ebx
pop edi
leave
ret
Function at 0x509172
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
je 0x509259
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
cmp eax, 7
jl 0x509259
push 0x448
lea eax, [ebp - 0x448]
push ebx
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x448]
mov dword [ebp - 0x448], esi
push eax
call fcn.0050864a
add esp, 0x10
lea eax, [ebp - 0x448]
call fcn.0050870a
lea eax, [ebp - 0x448]
call fcn.00508841
lea esi, [ebp - 0x448]
call fcn.00508937
test eax, eax
jne 0x509259
mov eax, dword [ebp - 0x8c]
push 3
shl eax, 2
cdq
pop ecx
idiv ecx
mov ecx, 0x400
add eax, 0x239f
cdq
idiv ecx
shl eax, 0xa
push eax
push 0x40
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x509236
mov byte [eax], bl
lea eax, [ebp - 0x448]
call fcn.00508f7d
lea eax, [ebp - 0x448]
push eax
call fcn.0050909d
test eax, eax
pop ecx
je 0x50925d
cmp byte [ebp - 0x292], bl
je 0x50924b
lea eax, [ebp - 0x191]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
cmp dword [ebp - 8], ebx
je 0x509259
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
xor eax, eax
jmp 0x509275
cmp byte [ebp - 0x292], bl
je 0x509272
lea eax, [ebp - 0x191]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
mov eax, dword [ebp - 8]
pop esi
pop ebx
leave
ret

Function at 0x509279
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
push esi
xor esi, esi
xor ebx, ebx
inc esi
push edi
cmp dword [ebp + 0x10], esi
mov dword [ebp - 4], ebx
jle 0x509304
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], esi
sub dword [ebp - 8], edi
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x5092de
mov ecx, dword [ebp + 8]
xor edx, edx
mov dword [ebp - 0x110], ecx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x114], esi
imul edx, edx, 0x3e8
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x114]
push ebx
push eax
push ebx
mov dword [ebp - 0xc], edx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x509304
push ebx
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebx
jl 0x509312
je 0x509304
mov al, byte [edi]
inc dword [ebp - 4]
inc edi
cmp al, 0xa
je 0x509304
mov eax, dword [ebp - 8]
add eax, edi
cmp eax, dword [ebp + 0x10]
jl 0x50929b
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov byte [eax + ecx], bl
pop edi
pop esi
pop ebx
leave
ret
or eax, 0xffffffff
jmp 0x50930d

Function at 0x509317
Capabilities:
Resolve dns

Disassembly:
push esi
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, eax
cmp esi, 0xffffffff
je 0x50932f
test esi, esi
jne 0x509341
cmp byte [edi], 0x30
je 0x509348
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x509341
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov esi, dword [eax]
cmp esi, 0xffffffff
jne 0x509348
xor esi, esi
mov eax, esi
pop esi
ret
Function at 0x50954a
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
cmp dword [ebp + 0x10], 0
je 0x50958d
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x400]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.USER32.dll_wvsprintfA]
lea eax, [ebp - 0x400]
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
lea eax, [ebp - 0x400]
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_send]
push esi
mov esi, 0x400
jmp 0x5095c8
lea ecx, [ebp - 0x400]
xor eax, eax
mov dl, byte [ecx]
cmp dl, 0x20
je 0x5095a9
cmp dl, 9
jne 0x5095bc
inc ecx
jmp 0x50959d
cmp dl, 0x39
jg 0x5095c3
movsx edx, dl
lea eax, [eax + eax*4]
inc ecx
lea eax, [edx + eax*2 - 0x30]
mov dl, byte [ecx]
cmp dl, 0x30
jge 0x5095ac
cmp byte [ecx], 0x2d
jne 0x5095e4
push dword [ebp + 0xc]
lea eax, [ebp - 0x400]
push esi
push eax
push dword [ebp + 8]
call fcn.00509279
add esp, 0x10
test eax, eax
jg 0x509595
xor eax, eax
pop esi
leave
ret
Function at 0x50989d
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
push edi
lea eax, [ebp - 0x124]
push 0x504c80
push eax
call fcn.00505cb9
lea eax, [ebp - 0xa4]
push 0x504c74
push eax
call fcn.00505cb9
add esp, 0x10
lea eax, [ebp - 4]
xor edi, edi
push eax
push 0x20019
lea eax, [ebp - 0x124]
push edi
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x5098f6
xor eax, eax
inc eax
jmp 0x5099e9
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
push esi
mov esi, 0x100
lea eax, [ebp - 0x324]
push esi
push eax
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
push edi
jmp 0x5099c9
lea eax, [ebp - 0x10]
inc dword [ebp - 8]
push eax
push 0x20019
lea eax, [ebp - 0x324]
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x5099be
push esi
lea eax, [ebp - 0x224]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], esi
push eax
lea eax, [ebp - 0x224]
push eax
push edi
lea eax, [ebp - 0xa4]
push edi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x5099b0
lea edi, [ebp - 0x224]
call fcn.00509317
test eax, eax
mov dword [ebp - 0x20], eax
je 0x5099ae
push 0x19
mov word [ebp - 0x24], 2
call dword [sym.imp.WS2_32.dll_htons]
push dword [ebp + 8]
mov word [ebp - 0x22], ax
lea eax, [ebp - 0x24]
push eax
call fcn.005095e7
pop ecx
test eax, eax
pop ecx
jne 0x5099ae
mov dword [ebp - 0xc], 1
xor edi, edi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0xc], edi
jne 0x5099d6
lea eax, [ebp - 0x324]
push esi
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call ebx
test eax, eax
je 0x509917
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp dword [ebp - 0xc], edi
pop esi
pop ebx
sete al
pop edi
leave
ret
Function at 0x401770
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x403518
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x409980], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x40997c], ecx
shl ecx, 8
add ecx, edx
mov dword [0x409978], ecx
shr eax, 0x10
mov dword [0x409974], eax
call fcn.004033e0
test eax, eax
jne 0x4017da
push 0x1c
call fcn.00401910
add esp, 4
mov dword [ebp - 4], 0
call fcn.004031e0
call fcn.004031d0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ad70], eax
call fcn.00402da0
mov dword [0x40995c], eax
test eax, eax
je 0x40180d
mov eax, dword [0x40ad70]
test eax, eax
jne 0x401817
push 0xffffffffffffffff
call fcn.00401970
add esp, 4
call fcn.00402af0
call fcn.00402a00
call fcn.00401940
mov esi, dword [0x40ad70]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x4018f6
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x40185e
test al, al
je 0x40185e
and eax, 0xff
push eax
call fcn.004029a0
add esp, 4
test eax, eax
je 0x401838
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401838
cmp byte [esi], 0x22
jne 0x401867
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x401877
cmp al, 0x20
ja 0x401877
inc esi
mov dword [ebp - 0x64], esi
jmp 0x401867
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x401898
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40189d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00401970
jmp 0x4018db
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x401867
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4018f6

Function at 0x4019b0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x4099b0]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x4019cf
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x4099ac], 1
mov byte [0x4099a8], bl
jne 0x401a29
mov ecx, dword [0x40ad68]
test ecx, ecx
je 0x401a17
mov esi, dword [0x40ad64]
sub esi, 4
cmp esi, ecx
jb 0x401a17
mov eax, dword [esi]
test eax, eax
je 0x401a10
call eax
mov ecx, dword [0x40ad68]
sub esi, 4
cmp esi, ecx
jae 0x401a02
push 0x40701c
push 0x407014
call fcn.00401a60
add esp, 8
push 0x407024
push 0x407020
call fcn.00401a60
add esp, 8
test ebx, ebx
jne 0x401a50
push ebp
mov dword [0x4099b0], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x402da0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x409ac0]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x402de2
call edi
mov esi, eax
test esi, esi
je 0x402dcc
mov eax, 1
jmp 0x402ddd
call ebp
mov ebx, eax
test ebx, ebx
je 0x402eef
mov eax, 2
mov dword [0x409ac0], eax
cmp eax, 1
jne 0x402e82
test esi, esi
jne 0x402dfb
call edi
mov esi, eax
test esi, esi
je 0x402eef
cmp word [esi], 0
mov eax, esi
je 0x402e15
add eax, 2
cmp word [eax], 0
jne 0x402e03
add eax, 2
cmp word [eax], 0
jne 0x402e03
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x402e74
push edi
call fcn.004041a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x402e74
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x402e66
push ebx
call fcn.00404150
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x402eef
test ebx, ebx
jne 0x402e93
call ebp
mov ebx, eax
test ebx, ebx
je 0x402eef
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x402eab
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402e9b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402e9b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004041a0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x402ecd
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret