joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401e85
Capabilities:
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4062b0
push 0x404b3a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 4], 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
call sub.MSVCRT.dll_malloc
pop ecx
mov edi, eax
mov dword [ebp - 0x24], edi
test edi, edi
je 0x401fc5
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, edi
mov dword [ebp - 0x1c], esi
cmp byte [edi], 0x5c
jne 0x401f2c
lea eax, [edi + 1]
cmp byte [eax], 0x5c
jne 0x401f2c
mov esi, eax
mov dword [ebp - 0x1c], esi
inc esi
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x401f07
cmp al, 0x5c
je 0x401f07
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x401eef
cmp byte [esi], 0
je 0x401f10
inc esi
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x401f25
cmp al, 0x5c
je 0x401f25
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x401f0d
cmp byte [esi], 0
je 0x401f4b
jmp 0x401f47
lea eax, [edi + 1]
cmp byte [eax], 0x3a
jne 0x401f4b
mov esi, eax
mov dword [ebp - 0x1c], esi
inc esi
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x401f4b
cmp al, 0x5c
jne 0x401f4b
inc esi
mov dword [ebp - 0x1c], esi
or ebx, 0xffffffff
mov al, byte [esi]
test al, al
je 0x401fa7
cmp al, 0x5c
jne 0x401f99
and byte [esi], 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x401f83
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x401f96
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jmp 0x401f88
and eax, 0x10
cmp al, 0x10
je 0x401f96
push edi
call sub.MSVCRT.dll_free
pop ecx
mov dword [ebp - 4], ebx
jmp 0x401fc9
mov byte [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov dword [ebp - 0x1c], esi
jmp 0x401f4e
mov dword [ebp - 4], ebx
push edi
call sub.MSVCRT.dll_free
pop ecx
mov al, 1
jmp 0x401fcb
or dword [ebp - 4], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x401fdc
Capabilities:
Create process on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
push ebx
push esi
push edi
mov esi, 0x104
xor edi, edi
push esi
lea eax, [ebp - 0x160]
push edi
push eax
mov dword [ebp - 8], esi
call sub.MSVCRT.dll_memset
push 0x2e
push dword [ebp + 8]
call sub.MSVCRT.dll_strrchr
add esp, 0x14
cmp eax, edi
je 0x402168
lea ecx, [ebp - 4]
push ecx
push 0xf003f
push edi
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402168
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x160]
push eax
push edi
push dword [ebp - 4]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
call edi
push dword [ebp - 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
push 0x1f4
lea eax, [ebp - 0x354]
push 0
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x354]
push str._s_shellopencommand
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [ebp - 4]
push eax
push 0xf003f
lea eax, [ebp - 0x354]
push 0
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402168
push esi
push eax
lea eax, [ebp - 0x160]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 8]
mov dword [ebp - 8], esi
xor esi, esi
push eax
lea eax, [ebp - 0x160]
push eax
push esi
push dword [ebp - 4]
call edi
push dword [ebp - 4]
call ebx
lea eax, [ebp - 0x160]
push 0x40808c
push eax
call sub.MSVCRT.dll_strstr
pop ecx
cmp eax, esi
pop ecx
jne 0x402125
lea eax, [ebp - 0x160]
push 0x408088
push eax
call sub.MSVCRT.dll_strstr
pop ecx
cmp eax, esi
pop ecx
jne 0x402125
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x160]
push 0x408084
push eax
call edi
push dword [ebp + 8]
lea eax, [ebp - 0x160]
push eax
call edi
jmp 0x40212f
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x10
xor eax, eax
cmp dword [ebp + 0xc], esi
pop ecx
lea edi, [ebp - 0x58]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x5c], 0x44
je 0x40214c
mov dword [ebp - 0x54], str.WinSta0Default
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x160]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
pop esi
xor al, al
pop ebx
leave
ret 8

Function at 0x402171
Capabilities:
Create a process with modified i/o handles and window
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
xor esi, esi
push 0x44
lea eax, [ebp - 0x54]
push esi
push eax
call sub.MSVCRT.dll_memset
mov ax, word [ebp + 0xc]
add esp, 0xc
mov word [ebp - 0x24], ax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push esi
push 1
push esi
push esi
mov dword [ebp - 0x28], 0x101
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
xor al, al
pop esi
leave
ret 8
Function at 0x4021b8
Capabilities:
Get disk information
Get disk size
Get file system object information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x784
push ebx
push esi
lea eax, [ebp - 0x224]
push edi
push eax
mov dword [ebp - 0x20], ecx
push 0x100
mov byte [ebp - 0x784], 0x67
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
xor ebx, ebx
push 1
cmp byte [ebp - 0x224], bl
lea edi, [ebp - 0x224]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
pop esi
je 0x402351
jmp 0x40220d
xor ebx, ebx
push 0x104
lea eax, [ebp - 0x124]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x124]
push 0x104
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
push 0x410
lea eax, [ebp - 0x384]
push 0x160
push eax
push 0x80
push edi
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
lea eax, [ebp - 0x274]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
lea eax, [ebp - 0x124]
push eax
inc ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
mov dword [ebp - 0xc], eax
mov al, byte [edi]
cmp al, 0x41
je 0x4022bb
cmp al, 0x42
je 0x4022bb
lea eax, [ebp - 0x14]
push 0
push eax
lea eax, [ebp - 0x1c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
test eax, eax
je 0x4022bb
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push 0x14
pop ecx
call fcn.00404b50
mov edx, dword [ebp - 0x18]
push 0x14
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x1c]
pop ecx
call fcn.00404b50
mov dword [ebp - 4], eax
jmp 0x4022c3
and dword [ebp - 8], 0
and dword [ebp - 4], 0
mov al, byte [edi]
push edi
mov byte [ebp + esi - 0x784], al
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov byte [ebp + esi - 0x783], al
lea eax, [ebp - 8]
push 4
push eax
lea eax, [ebp + esi - 0x782]
push eax
call sub.MSVCRT.dll_memcpy
lea eax, [ebp - 4]
push 4
push eax
lea eax, [ebp + esi - 0x77e]
push eax
call sub.MSVCRT.dll_memcpy
lea eax, [ebp - 0x274]
push ebx
push eax
lea eax, [ebp + esi - 0x77a]
push eax
call sub.MSVCRT.dll_memcpy
push dword [ebp - 0xc]
lea eax, [ebp - 0x124]
push eax
lea eax, [ebx + esi]
lea eax, [ebp + eax - 0x77a]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 0xc]
add esp, 0x30
add eax, ebx
push edi
lea esi, [esi + eax + 0xa]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [edi + eax + 1], 0
lea edi, [edi + eax + 1]
jne 0x40220b
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x784]
push esi
push eax
call fcn.0040331b
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402366
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
push esi
mov eax, 0x2800
push edi
mov esi, ecx
push eax
push 0x40
and dword [esi + 0x1c], 0
mov dword [ebp - 8], esi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [ebp + 8]
mov edi, eax
lea eax, [ebp - 0x24c]
push str._s.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4023d7
lea eax, [ebp + 0xb]
push 1
push eax
mov ecx, esi
mov byte [ebp + 0xb], 0x68
call fcn.0040331b
jmp 0x4024da
push ebx
push 1
mov byte [edi], 0x68
pop esi
mov eax, dword [ebp - 4]
add eax, 0xfffffdf8
cmp esi, eax
jbe 0x4023ff
add dword [ebp - 4], 0x208
push 0x42
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov edi, eax
lea eax, [ebp - 0x11c]
push 0x4080ac
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x4024a3
lea eax, [ebp - 0x11c]
push 0x4080a8
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x4024a3
mov al, byte [ebp - 0x148]
and al, 0x10
mov byte [esi + edi], al
lea eax, [ebp - 0x11c]
push eax
inc esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
lea eax, [ebp - 0x11c]
push ebx
push eax
lea eax, [esi + edi]
push eax
call sub.MSVCRT.dll_memcpy
add esi, ebx
lea eax, [ebp - 0x12c]
push 4
push eax
and byte [esi + edi], 0
inc esi
lea ebx, [esi + edi]
push ebx
call sub.MSVCRT.dll_memcpy
lea eax, [ebp - 0x128]
push 4
add ebx, 4
push eax
push ebx
call sub.MSVCRT.dll_memcpy
add esi, 8
lea eax, [ebp - 0x134]
push 8
push eax
lea eax, [esi + edi]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x30
add esi, 8
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4023de
mov ecx, dword [ebp - 8]
push esi
push edi
call fcn.0040331b
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, esi
pop ebx
pop edi
pop esi
leave
ret 4
Function at 0x4025b3
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
xor edi, edi
lea esi, [ecx + 0x20]
push 0x104
push edi
push esi
mov dword [ebp - 0xc], ecx
call sub.MSVCRT.dll_memset
push dword [ebp + 8]
push esi
call sub.MSVCRT.dll_strcpy
add esp, 0x14
push edi
push 0x80
push 3
push edi
push 1
push closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4025ff
xor eax, eax
jmp 0x402677
lea eax, [ebp - 4]
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
call ebx
mov edi, eax
add edi, 0xa
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
push edi
push 0
push esi
call sub.MSVCRT.dll_memset
mov byte [esi], 0x69
mov eax, dword [ebp - 4]
add esp, 0xc
mov dword [esi + 1], eax
mov eax, dword [ebp - 8]
push dword [ebp + 8]
mov dword [esi + 5], eax
call ebx
inc eax
push eax
lea eax, [esi + 9]
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp - 0xc]
add esp, 0xc
push edi
push esi
call fcn.0040331b
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
pop ebx
pop edi
pop esi
leave
ret 4

Function at 0x40267d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], ecx
cmp dword [edi + 4], 0xffffffff
jne 0x40269c
call fcn.00402740
xor eax, eax
jmp 0x402739
xor esi, esi
add ecx, 0x20
push esi
push 0x80
push 3
push esi
push 1
push closesocket
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
or eax, 0xffffffff
cmp ebx, eax
je 0x402739
push esi
push edi
push dword [edi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x2000
push 0x40
mov dword [ebp + 8], esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
push 8
push edi
lea eax, [esi + 1]
mov byte [esi], 0x6a
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp + 8]
push 0
push eax
lea eax, [esi + 9]
push 0x1ff7
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
test eax, eax
jbe 0x402727
mov ecx, dword [ebp - 4]
add eax, 9
push eax
push esi
call fcn.0040331b
mov dword [ebp - 4], eax
jmp 0x40272f
mov ecx, dword [ebp - 4]
call fcn.00402740
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40283d
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
mov eax, 0x405188
call fcn.00404aa8
sub esp, 0x468
push ebx
push esi
push 0x104
lea eax, [ebp - 0x370]
push 0
mov ebx, ecx
push eax
call sub.MSVCRT.dll_memset
mov esi, dword [ebp + 8]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + esi - 1], 0x5c
mov dword [ebp - 0x10], 0x4080d0
jne 0x402886
mov dword [ebp - 0x10], 0x4087e4
push dword [ebp - 0x10]
lea eax, [ebp - 0x370]
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push str._s_s.
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x168]
push eax
lea eax, [ebp - 0x370]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x4028c4
xor al, al
jmp 0x40298d
push edi
mov edi, str._s_s_s
cmp byte [ebp - 0x13c], 0x2e
je 0x402969
lea eax, [ebp - 0x13c]
test byte [ebp - 0x168], 0x10
push eax
push dword [ebp - 0x10]
push dword [ebp + 8]
push edi
je 0x40290a
lea eax, [ebp - 0x474]
push eax
call esi
add esp, 0x14
lea eax, [ebp - 0x474]
mov ecx, ebx
push eax
call fcn.0040283d
jmp 0x402969
lea eax, [ebp - 0x26c]
push eax
call esi
mov al, byte [ebp + 0xb]
add esp, 0x14
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
push 0
call fcn.00402d02
lea eax, [ebp - 0x26c]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ebp - 0x24]
call fcn.00402d9c
mov eax, dword [ebx + 0x14]
lea ecx, [ebx + 0x10]
and dword [ebp - 4], 0
lea edx, [ebp - 0x24]
push edx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00402d3e
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x24]
call fcn.00402d02
lea eax, [ebp - 0x168]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4028ca
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4

Function at 0x402b5a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0
mov edi, ecx
mov eax, dword [esi]
push 0x80
mov dword [ebp - 4], eax
mov eax, dword [esi + 4]
push 3
mov dword [ebp + 8], eax
push 0
push 2
lea eax, [edi + 0x20]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 8]
push 0
push eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff8
add esi, 8
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
push 4
add dword [ebp + 8], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x13]
push eax
mov byte [ebp - 0x14], 0x70
call sub.MSVCRT.dll_memcpy
lea eax, [ebp + 8]
push 4
push eax
lea eax, [ebp - 0xf]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x18
lea eax, [ebp - 0x14]
mov ecx, edi
push 9
push eax
call fcn.0040331b
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x403202
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x9e50], ebx
mov dword [esi], 0x4062c4
jbe 0x40323c
push edi
lea edi, [esi + 0x210]
push 0xffffffffffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
add edi, 4
cmp ebx, dword [esi + 0x9e50]
jb 0x40321d
pop edi
mov ecx, esi
call fcn.00403308
pop esi
pop ebx
ret

Function at 0x403426
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push ebx
push esi
push edi
xor ebx, ebx
push dword [ebp + 0x10]
push ebx
push dword [ebp + 0xc]
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push str._computername_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov esi, str.SOFTWAREMicrosoft
lea edi, [ebp - 0x20]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebp - 4]
push eax
push 1
movsb byte es:[edi], byte [esi]
pop esi
lea eax, [ebp - 0x20]
push esi
push ebx
push eax
push closesocket
call dword [0x40921c]
test eax, eax
jne 0x4034e4
mov eax, 0xff
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
push eax
lea eax, [ebp - 0x120]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 8]
push eax
push ebx
push 0x4081a0
push dword [ebp - 4]
call dword [0x4089f4]
test eax, eax
jne 0x4034db
push dword [ebp + 0x10]
push ebx
push dword [ebp + 0xc]
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x120]
push eax
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strcpy
add esp, 0x14
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f4
and byte [ebp - 0x1a], 0
lea eax, [ebp - 0xf0]
push esi
push eax
mov byte [ebp - 0xf4], 0x66
mov dword [ebp - 0xf0], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0x1f4]
push 0x100
push eax
push dword [ebp + 8]
call fcn.00403426
push 0x10
lea eax, [ebp - 0x14]
pop esi
push esi
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
lea eax, [ebp - 4]
mov dword [ebp - 4], esi
mov esi, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_getsockname]
lea eax, [ebp - 0x10]
push 4
push eax
lea eax, [ebp - 0x50]
push eax
call sub.MSVCRT.dll_memcpy
lea eax, [ebp - 0x1f4]
push 0x32
push eax
lea eax, [ebp - 0x4c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x18
call fcn.004033a4
mov dword [ebp - 0x54], eax
call fcn.004033f1
mov byte [ebp - 0x1a], al
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0xf4]
push 0xe0
push eax
mov ecx, esi
call fcn.00401abc
pop esi
leave
ret
Function at 0x4035ae
Capabilities:
Get file size
Query environment variable
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
mov byte [ebp - 0x114], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x217]
mov byte [ebp - 0x218], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, str.hello_word_
push edi
call sub.MSVCRT.dll_printf
mov dword [esp], str.GetModuleFileNameA
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, 0x104
lea eax, [ebp - 0x218]
push esi
push eax
push str._temp_Winlog.EXE
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea eax, [ebp - 0x114]
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x114]
push esi
push eax
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push edi
call sub.MSVCRT.dll_printf
lea eax, [ebp - 0x114]
mov dword [esp], str.TempWinlog.EXE
push eax
call sub.MSVCRT.dll_strstr
mov esi, eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x218]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 0x10
test eax, eax
je 0x403791
cmp esi, ebx
jne 0x403791
lea eax, [ebp - 0x218]
push eax
push 0x40922c
call sub.MSVCRT.dll_strcpy
pop ecx
lea eax, [ebp - 0x114]
pop ecx
push ebx
push ebx
push 3
push ebx
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40378d
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x40378d
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
push esi
push ebx
push edi
mov dword [ebp - 8], edi
call sub.MSVCRT.dll_memset
add esp, 0x10
cmp edi, ebx
je 0x40378d
lea eax, [ebp - 0x10]
push ebx
push eax
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x218]
push 0x4081cc
push eax
call sub.MSVCRT.dll_fopen
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
je 0x40372f
push edi
push 1
push esi
push dword [ebp - 8]
call sub.MSVCRT.dll_fwrite
push edi
call sub.MSVCRT.dll_fclose
add esp, 0x14
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x218]
push 0x4081c8
push eax
call sub.MSVCRT.dll_fopen
mov esi, eax
push 2
push ebx
push esi
call sub.MSVCRT.dll_fseek
push ebx
call sub.MSVCRT.dll_time
push eax
call sub.MSVCRT.dll_srand
push 4
pop edi
push 2
push ebx
push esi
mov dword [ebp - 0xc], edi
call sub.MSVCRT.dll_fseek
push esi
push edi
lea eax, [ebp - 0xc]
push 1
push eax
call sub.MSVCRT.dll_fwrite
push esi
call sub.MSVCRT.dll_fclose
push dword [ebp - 8]
call sub.MSVCRT.dll_free
add esp, 0x40
xor al, al
jmp 0x403793
mov al, 1
pop edi
pop esi
pop ebx
leave
ret