joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405b54
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov dword [ebp - 8], eax
lea ecx, [eax + 8]
push ebx
mov bx, word [eax]
mov dword [ebp - 8], ecx
mov ax, word [ecx]
call fcn.0040ea2b
test al, al
jne 0x405b78
inc ecx
inc ecx
mov dword [ebp - 8], ecx
push 0x63
lea eax, [ebp - 0x78]
push eax
push str.DEBUGMDG
mov byte [ebp - 0x78], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x78], 0x31
jne 0x405b9a
mov byte [0x4c8bf0], 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push dword [ebp - 8]
and dword [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov dword [0x4c8bf4], eax
call fcn.00448399
lea ecx, [ebp - 0xc]
call fcn.0043fd9a
push 1
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x14]
mov ecx, 0x4c9048
call fcn.0044dca2
push dword [ebp - 0xc]
lea ecx, [ebp - 0x10]
call fcn.0044845d
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0xc]
mov dword [ebp - 8], eax
call fcn.00439cfd
lea ecx, [ebp - 0x14]
call fcn.00439cfd
mov ecx, dword [ebp - 8]
call fcn.0040401b
push str._InstallService
mov edi, eax
push 0xf
pop esi
mov dword [ebp - 8], edi
call fcn.00402cfd
test al, al
pop ecx
pop edi
pop esi
je 0x405c3b
push 0x1e
push str._Service
push dword [ebp - 8]
mov byte [ebp - 1], 0x49
call fcn.00413203
mov ecx, dword [ebp - 8]
add esp, 0xc
add ecx, 0x1e
call fcn.0040401b
mov dword [ebp - 8], eax
jmp 0x405c56
push 8
lea eax, [ebp - 8]
push eax
push 0x4af2e0
call fcn.00441bc4
add esp, 0xc
test al, al
je 0x405cb5
mov byte [ebp - 1], 0x53
cmp bx, 0x22
jne 0x405c90
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp - 8]
lea ecx, [edx + eax*2 - 2]
cmp ecx, edx
jbe 0x405c90
mov ax, word [ecx]
call fcn.0040ea2b
test al, al
je 0x405c82
dec ecx
dec ecx
cmp ecx, edx
ja 0x405c70
cmp ecx, edx
jbe 0x405c90
cmp word [ecx], 0x22
jne 0x405c90
and word [ecx], 0
sub dword [ebp - 8], 2
movsx ax, byte [ebp - 1]
mov ecx, dword [ebp - 8]
mov word [ecx], ax
sub dword [ebp - 8], 2
mov eax, dword [ebp - 8]
mov word [eax], 0x7e
push dword [ebp - 8]
call fcn.0040e88e
jmp 0x405cd5
push 0xe
lea eax, [ebp - 8]
push eax
push str._RemoveService
call fcn.00441bc4
add esp, 0xc
test al, al
pop ebx
je 0x405cde
push dword [ebp - 8]
call fcn.00405f71
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea ecx, [ebp - 0x10]
call fcn.00439cfd
xor eax, eax
leave
ret
Function at 0x405d76
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov dword [0x4c8bfc], eax
cmp word [eax], 0x7e
push edi
mov dword [ebp - 0x14], 0x100
mov byte [ebp - 1], bl
jne 0x405db0
inc eax
inc eax
mov dword [0x4c8bfc], eax
cmp word [eax], 0x49
sete byte [ebp - 1]
inc eax
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp + 8]
push eax
call fcn.0040549b
pop ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
sub esi, dword [ebp - 0x10]
mov eax, 0x400
sar esi, 1
cmp esi, eax
jle 0x405dd2
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.00439c95
push 6
push dword [ebp - 0xc]
push str.__gui_
call fcn.0043af01
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0x10
test al, al
je 0x405e27
mov eax, dword [ebp - 0xc]
add eax, 0xc
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x14], ebx
call fcn.00439c95
pop ecx
push dword [ebp + 8]
call edi
inc eax
add eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.004131b9
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x828]
push eax
call fcn.00413203
add esp, 0xc
push dword [ebp - 0x10]
mov word [ebp + esi - 0x828], bx
mov byte [0x4cc003], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 8]
call fcn.0043fdb8
mov eax, dword [ebp - 8]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x405f64
mov eax, dword [ebp - 8]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 8]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp + 8], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x405ead
mov ax, word [edx]
call fcn.0040ea2b
test al, al
je 0x405eab
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x405e9c
cmp di, bx
mov edx, dword [ebp - 8]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x405ece
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp + 8], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x4af330
push edi
call fcn.00413203
push esi
push dword [ebp - 0x10]
add edi, 0x1e
push edi
call fcn.0040542c
add esp, 0x18
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x405f61
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
or eax, 0x10
push ebx
push 2
push eax
push 0xf01ff
lea eax, [ebp - 0x828]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x405f61
cmp byte [ebp - 1], bl
je 0x405f61
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x828]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x405f61
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push dword [ebp + 8]
call esi
push edi
call esi
lea ecx, [ebp - 8]
call fcn.00439cfd
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405f71
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edx, esi
xor ebx, ebx
jmp 0x405f93
call fcn.0040ea2b
test al, al
jne 0x405f9b
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x405f88
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x405fac
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.00413203
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x405fcc
inc esi
inc esi
mov ax, word [esi]
call fcn.0040ea2b
test al, al
jne 0x405fca
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 4], eax
je 0x40603a
push 0x10020
lea ecx, [ebp - 0x824]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [ebp + 8], eax
je 0x40603a
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, 0xc8
push edi
call esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x406040
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406130
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, str.service:
lea edi, [ebp - 0x7f8]
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]
xor eax, eax
mov ecx, 0x1f9
lea edi, [ebp - 0x7e6]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
call fcn.0040401b
mov edx, eax
mov ecx, edx
call fcn.004040e2
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x40617e
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.0040542c
add esp, 0xc
lea eax, [ebp - 0x7f8]
push eax
push 0x64
xor edi, edi
push edi
push 0x8000004
push edi
push 0xffffffffffffffff
mov word [ebp + esi*2 - 0x7e8], di
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
cmp ebx, edi
je 0x4061f3
push edi
push edi
push edi
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
je 0x4061f3
push 0x64
push edi
push esi
call fcn.0040402e
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4c70f4], eax
mov dword [0x4c8c04], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407963
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
push 0x169
lea ecx, [ebp - 0x18]
call fcn.0043fdb8
mov eax, dword [ebp - 0x18]
push 0x104
push dword [ebp + 8]
add eax, 0xc8
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
xor esi, esi
cmp dword [ebp + 0xc], esi
mov dword [ebp - 0x20], esi
je 0x4079a9
cmp dword [ebp + 0xc], 0xffffffff
mov dword [ebp - 4], 1
jne 0x4079ac
mov dword [ebp - 4], esi
push ebx
mov ebx, dword [ebp + 0x10]
cmp ebx, esi
je 0x4079c2
push 0x64
mov ecx, ebx
call fcn.0043fddf
mov eax, dword [ebx]
mov word [eax], si
cmp dword [ebp - 4], esi
je 0x4079d9
mov ecx, dword [ebp + 0xc]
push 0x64
call fcn.0043fddf
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov word [eax], si
push 0x4c9c14
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], esi
call fcn.00403e2d
pop ecx
mov byte [ebp - 0x24], al
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 8], esi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
cmp edi, esi
je 0x407ae7
push edi
push 2
mov dword [ebp - 0x1c], esi
mov dword [ebp + 0x10], esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
push esi
push edi
push dword [ebp - 8]
push dword [ebp - 0xc]
call sub.VERSION.dll_GetFileVersionInfoW
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x10]
push eax
push 0x4af5ac
push esi
call sub.VERSION.dll_VerQueryValueW
test ebx, ebx
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
mov edi, str._u._u._u._u
je 0x407a84
mov eax, dword [ebp + 0x10]
mov dx, word [eax + 0x10]
mov cx, word [eax + 0x12]
mov word [ebp - 0xe], dx
mov dx, word [eax + 0x16]
movzx eax, word [eax + 0x14]
push eax
movzx eax, dx
push eax
movzx eax, word [ebp - 0xe]
push eax
movzx eax, cx
push eax
push edi
push dword [ebx]
call esi
add esp, 0x18
cmp dword [ebp - 4], 0
je 0x407ab5
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0xa]
mov dx, word [eax + 8]
mov bx, word [eax + 0xe]
movzx eax, word [eax + 0xc]
push eax
movzx eax, bx
push eax
movzx eax, dx
push eax
movzx eax, cx
push eax
mov eax, dword [ebp + 0xc]
push edi
push dword [eax]
call esi
add esp, 0x18
mov eax, dword [ebp + 0x10]
xor edi, edi
xor ecx, ecx
cmp dword [ebp + 0xc], edi
jne 0x407ac9
mov esi, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
jmp 0x407acf
mov esi, dword [eax + 8]
mov eax, dword [eax + 0xc]
push dword [ebp - 0x14]
or edi, eax
or esi, ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x407aea
mov edi, dword [ebp - 0x20]
cmp byte [ebp - 0x24], 0
pop ebx
je 0x407afa
push dword [ebp - 0x28]
call fcn.00403e3e
pop ecx
push 0x4c9c14
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x18]
call fcn.00439cfd
mov eax, edi
pop edi
mov edx, esi
pop esi
leave
ret
Function at 0x408a66
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
mov esi, eax
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4c8bf8], 0
call ebx
and dword [esi], 0
test edi, edi
je 0x408aa5
mov eax, dword [edi]
test eax, eax
je 0x408aa5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateJobObject]
push dword [edi]
call ebx
and dword [edi], 0
cmp byte [esp + 0x10], 0
je 0x408abd
push 1
push 0
push str.shutdown__a
call fcn.00405cea
add esp, 0xc
push dword [0x4c8c70]
call fcn.00404160
cmp byte [esp + 0x10], 0
pop ecx
je 0x408ae9
push 3
pop esi
push 0
call dword [sym.imp.ADVAPI32.dll_AbortSystemShutdownW]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
dec esi
jne 0x408ad3
pop esi
pop ebx
ret
Function at 0x40ebb9
Capabilities:
Check os version
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x4c8cf8
mov dword [0x4c8cf8], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [0x4c8cfc], 5
je 0x40ebe1
xor eax, eax
leave
ret
mov eax, dword [0x4c8d00]
push ebx
push edi
xor edi, edi
sub eax, edi
je 0x40ebfc
dec eax
jne 0x40ec7d
mov ebx, 0x39000
jmp 0x40ec01
mov ebx, 0x30000
push esi
push str.DevicePhysicalMemory
lea eax, [ebp - 8]
push eax
call dword [0x4c8cc0]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov esi, 0x4c8e28
push esi
mov dword [ebp - 0x20], 0x18
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
call dword [0x4c8c98]
cmp eax, 0xc0000022
jne 0x40ec78
lea eax, [ebp - 0x20]
push eax
push 0x60000
push esi
call dword [0x4c8c98]
push dword [0x4c8e28]
call fcn.0040eaeb
pop ecx
push dword [0x4c8e28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x20]
push eax
push 6
push esi
call dword [0x4c8c98]
cmp eax, edi
pop esi
jge 0x40ec81
xor eax, eax
jmp 0x40eca5
push 0x1000
push ebx
push edi
push 6
push dword [0x4c8e28]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x4c8e24], eax
neg eax
sbb eax, eax
and eax, dword [0x4c8e28]
pop edi
pop ebx
leave
ret

Function at 0x40eca9
Capabilities:
Read file via mapping

Disassembly:
mov ecx, dword [esp + 4]
push edi
mov edi, dword [esp + 0xc]
mov eax, edi
shr eax, 0x16
mov eax, dword [ecx + eax*4]
test al, 1
jne 0x40ecc2
xor eax, eax
pop edi
ret
test al, al
push esi
jns 0x40ecd5
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40ed1d
push 0x1000
and eax, 0xfffff000
push eax
push 0
push 4
push dword [0x4c8e28]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, edi
shr ecx, 0xc
and ecx, 0x3ff
mov ecx, dword [eax + ecx*4]
test ecx, 1
jne 0x40ed0a
xor eax, eax
jmp 0x40ed1f
mov esi, ecx
xor esi, edi
and esi, 0xfff
push eax
xor esi, ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, esi
pop esi
pop edi
ret

Function at 0x40ed22
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x4c8e24]
call fcn.0040eca9
pop ecx
pop ecx
push 0x1000
mov esi, eax
and eax, 0xfffff000
push eax
push 0
push 6
push dword [0x4c8e28]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
jne 0x40ed57
pop esi
ret
shr esi, 2
and esi, 0x3ff
mov esi, dword [eax + esi*4]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, esi
pop esi
ret

Function at 0x40ee45
Capabilities:
Check mutex on windows

Disassembly:
push esi
push dword [esp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
je 0x40ee63
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, esi
pop esi
ret
Function at 0x40ef35
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 7
push 0xc0000000
push str.C:pe.debug.log
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40ef91
push esi
push 2
push ebx
push ebx
push edi
call fcn.0043ae64
mov esi, dword [ebp + 8]
add esp, 0x10
cmp byte [esi], bl
je 0x40ef89
push ebx
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebx
leave
ret

Function at 0x40f121
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
push 0x80000000
push dword [ebp + 8]
call fcn.0040f0a0
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x40f1b8
push esi
push eax
call fcn.0040f0ff
mov esi, dword [ebp + 0x10]
test esi, esi
pop ecx
mov dword [ebp - 8], eax
je 0x40f153
mov dword [esi], eax
jmp 0x40f156
lea esi, [ebp - 8]
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x40f17c
add eax, 0x10
push eax
lea ecx, [ebp + 0xc]
call fcn.0043fc43
mov edi, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
lea ecx, [ebp + 0xc]
call fcn.00439cfd
test edi, edi
je 0x40f1ac
and dword [ebp + 0xc], 0
push 0
lea eax, [ebp + 0xc]
push eax
push dword [esi]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x40f19b
xor eax, eax
push 6
mov dword [esi], eax
add eax, edi
push 0
push eax
call fcn.0049a7e0
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
jmp 0x40f1bb
mov edi, dword [ebp + 0xc]
mov eax, edi
pop edi
leave
ret

Function at 0x40f9d1
Capabilities:
Parse pe header

Disassembly:
cmp dword [esp + 8], 0x40
jb 0x40f9e6
mov eax, dword [esp + 4]
mov dword [ecx + 0x10], eax
cmp word [eax], 0x5a4d
je 0x40f9ea
xor eax, eax
jmp 0x40fa5f
mov edx, dword [eax + 0x3c]
push esi
lea esi, [edx + 0xf8]
cmp dword [esp + 0xc], esi
jae 0x40f9fe
xor eax, eax
jmp 0x40fa5e
add edx, eax
mov dword [ecx + 0x14], edx
cmp dword [edx], 0x4550
jne 0x40f9fa
mov si, word [edx + 0x16]
test si, 0x2002
movzx eax, si
je 0x40f9fa
test byte [edx + 0x16], 2
je 0x40f9fa
cmp word [edx + 0x14], 0xe0
jne 0x40f9fa
add edx, 0xf8
push edi
mov edi, dword [ecx + 0x14]
xor esi, esi
mov dword [ecx + 0x18], edx
cmp word [edi + 6], si
jbe 0x40fa5d
add edx, 0x10
mov edi, dword [edx + 4]
add edi, dword [edx]
cmp edi, dword [esp + 0x10]
ja 0x40fa5b
mov edi, dword [ecx + 0x14]
movzx edi, word [edi + 6]
inc esi
add edx, 0x28
cmp esi, edi
jl 0x40fa3f
jmp 0x40fa5d
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x40fad3
Capabilities:
Set thread local storage value

Disassembly:
push ebx
push esi
xor esi, esi
cmp dword [0x4c8b98], esi
setne bl
test bl, bl
je 0x40fb33
push 0x28
push 8
push dword [0x4c9150]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x40fb07
push 2
call fcn.0043fad1
cmp eax, 4
pop ecx
je 0x40fae4
mov dword [esi + 4], 0xaa55
and dword [esi + 4], 0
mov dword [esi], 0x20
or dword [esi + 0x1c], 0xffffffff
add esi, 8
push esi
mov dword [esi + 0x10], 0xfff80000
push dword [0x4c8b98]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40fb3d
mov dword [eax], esi
pop esi
mov al, bl
pop ebx
ret

Function at 0x40fb42
Capabilities:
Get thread local storage value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push edi
mov edi, 0x4c8ca0
jne 0x40fb6d
push dword [0x4c8b98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
je 0x40fb76
cmp dword [eax], ebx
je 0x40fb76
mov edi, eax
jmp 0x40fb76
cmp dword [ebp + 0xc], 0xffffffff
je 0x40fb76
mov edi, dword [ebp + 0xc]
cmp dword [edi], ebx
lea esi, [edi + 4]
je 0x40fbcb
cmp byte [ebp + 8], bl
je 0x40fbcb
cmp dword [esi + 4], ebx
jle 0x40fbcb
mov eax, dword [esi]
cmp word [eax], bx
je 0x40fbcb
test byte [0x4c93ac], 2
push eax
je 0x40fbb0
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
push dword [esi]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x40fbcb
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp + 0xc]
push ecx
add eax, eax
push eax
push dword [esi]
mov dword [ebp + 0xc], ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
dec eax
cmp eax, 0x1ffff
jb 0x40fbe9
push 0x10002
mov ecx, esi
mov dword [esi + 8], 0x10000
call fcn.0043fddf
mov eax, dword [esi]
mov word [eax], bx
pop edi
mov dword [esi + 4], ebx
pop esi
pop ebx
leave
ret

Function at 0x40ff31
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
xor esi, esi
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
cmp dword [ebp + 0x10], esi
je 0x40ff69
cdq
jmp 0x40ff7c
cmp dword [ebp + 0xc], esi
je 0x40ff76
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x40ff7c
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
pop esi
leave
ret
Function at 0x40ffa7
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push dword [0x4c8b98]
mov edi, 0x4c8ca0
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor ebx, ebx
cmp eax, ebx
je 0x40ffd1
cmp dword [eax], ebx
je 0x40ffd1
mov dword [ebp - 4], eax
mov edi, eax
cmp dword [edi], ebx
lea esi, [edi + 4]
je 0x410095
push 0x4c9c14
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi], ebx
je 0x41008a
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
sub ecx, eax
cmp ecx, 0xc96
jge 0x41000f
add eax, 0x10c96
push eax
mov ecx, esi
mov dword [esi + 8], eax
call fcn.0043fddf
mov eax, dword [esi + 4]
mov ecx, dword [esi]
lea eax, [ecx + eax*2 + 0x1000]
mov word [eax], bx
mov edi, dword [ebp + 0xc]
cmp edi, 0xffff
ja 0x410040
push 0x400
push eax
push dword [ebp + 0xc]
mov edi, eax
push dword [0x4c8c2c]
call dword [sym.imp.USER32.dll_LoadStringW]
mov ecx, dword [esi]
mov eax, dword [esi + 4]
lea eax, [ecx + eax*2]
lea ecx, [ebp + 0x10]
push ecx
push edi
push 0x7fd
push eax
call fcn.0049ab51
add esp, 0x10
cmp eax, ebx
jge 0x410061
xor eax, eax
add dword [esi + 4], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov word [ecx + eax*2], bx
cmp dword [esi + 4], 0x10000
jg 0x41007e
cmp byte [0x4c8cb9], bl
je 0x41008a
push dword [ebp - 4]
push 1
call fcn.0040fb42
pop ecx
pop ecx
push 0x4c9c14
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41009a
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
push edi
push dword [0x4c8b98]
mov edi, 0x4c8ca0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor ebx, ebx
cmp eax, ebx
je 0x4100ba
cmp dword [eax], ebx
je 0x4100ba
mov edi, eax
cmp dword [edi], ebx
lea esi, [edi + 4]
je 0x41014b
push 0x4c9c14
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi], ebx
je 0x410140
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
sub ecx, eax
cmp ecx, 0x896
jge 0x4100f4
add eax, 0x10896
push eax
mov ecx, esi
mov dword [esi + 8], eax
call fcn.0043fddf
mov ecx, dword [esi]
mov eax, dword [esi + 4]
lea eax, [ecx + eax*2]
lea ecx, [esp + 0x18]
push ecx
push dword [esp + 0x18]
push 0x7fd
push eax
call fcn.0049ab51
add esp, 0x10
cmp eax, ebx
jge 0x410119
xor eax, eax
add dword [esi + 4], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov word [ecx + eax*2], bx
cmp dword [esi + 4], 0x10000
jg 0x410136
cmp byte [0x4c8cb9], bl
je 0x410140
push edi
push 1
call fcn.0040fb42
pop ecx
pop ecx
push 0x4c9c14
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
ret