joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x41c]
push ebx
mov ebx, edx
sub esp, 0x430
mov edx, dword [eax]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x104
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x14
test eax, eax
jne 0x401049
cmp word [ebp - 0x41c], 0
jne 0x401058
xor ebx, ebx
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x214]
mov dword [esp], esi
mov dword [esp + 8], 0x104
lea esi, [ebp - 0x420]
mov dword [esp + 4], edi
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
sub esp, 0xc
mov dword [esp], edi
call dword [sym.imp.shlwapi.dll_PathFindExtensionW]
sub esp, 4
mov dword [esp + 4], 0x40f000
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x401198
cmp ebx, 5
je 0x401198
lea eax, [ebp - 0x424]
mov dword [esp + 0xc], 0x416a08
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0x416518
call dword [sym.imp.ole32.dll_CoCreateInstance]
sub esp, 0x14
test eax, eax
js 0x401180
mov eax, dword [ebp - 0x424]
mov ecx, dword [eax]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x417fd8
mov dword [esp], eax
call dword [ecx]
sub esp, 0xc
test eax, eax
js 0x401180
mov eax, dword [ebp - 0x420]
mov ecx, dword [eax]
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [ecx + 0x14]
mov dword [ebp - 0x428], eax
mov eax, dword [ebp - 0x420]
sub esp, 0xc
mov ecx, dword [eax]
mov dword [esp], eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x428]
sub esp, 4
test eax, eax
js 0x401180
mov ecx, dword [ebp - 0x424]
test ecx, ecx
je 0x401198
lea edx, [ebx + 1]
mov eax, ecx
mov dword [ebp - 0x428], ecx
call section..text
mov ecx, dword [ebp - 0x428]
mov ebx, eax
mov eax, dword [ecx]
mov dword [esp], ecx
call dword [eax + 8]
sub esp, 4
jmp 0x40104b
mov eax, dword [ebp - 0x424]
mov ecx, dword [eax]
mov dword [esp], eax
call dword [ecx + 8]
sub esp, 4
lea esi, [esi]
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_GetBinaryTypeW]
sub esp, 8
test eax, eax
je 0x401049
xor ebx, ebx
cmp dword [ebp - 0x420], 6
sete bl
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x401220
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
mov ebx, eax
sub esp, 0x10
movzx eax, word [edx]
test ax, ax
je 0x401370
mov ecx, 1
jmp 0x40124f
movzx eax, word [edx + 2]
add edx, 2
add ecx, 1
test ax, ax
je 0x40126a
cmp ax, 0x22
je 0x40125b
cmp ax, 0x5c
jne 0x401240
movzx eax, word [edx + 2]
add edx, 2
add ecx, 2
test ax, ax
jne 0x40124f
add ecx, ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edi, eax
movzx eax, word [esi]
sub esp, 0xc
mov edx, edi
test ax, ax
je 0x4012e5
mov ecx, dword [0x40f2c8]
movd xmm0, dword [str.__]
jmp 0x4012cc
cmp ax, 0x5c
je 0x401360
mov word [edx], ax
add edx, 2
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
je 0x4012e5
cmp ax, 0x22
jne 0x4012b0
movzx eax, word [esi + 2]
movd dword [edx], xmm0
add esi, 2
add edx, 4
test ax, ax
jne 0x4012cc
xor eax, eax
mov word [edx], ax
mov dword [esp], edi
call fcn.004062f0
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov esi, eax
mov dword [esp], str.__s___s__n
call fcn.004011d0
mov dword [esp + 8], edi
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x10], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [edx], ecx
add edx, 4
jmp 0x4012c0
mov ecx, 2
jmp 0x40126c
Function at 0x402510
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x218]
push ebx
xor ebx, ebx
sub esp, 0x228
mov dword [ebp - 0x21c], 1
mov edi, dword [ebx*4 + 0x40f280]
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp], 0
mov dword [esp + 8], edi
call dword [sym.imp.shell32.dll_SHGetSpecialFolderPathW]
sub esp, 0x10
test eax, eax
jne 0x402580
test byte [0x40d004], 8
jne 0x402648
add ebx, 1
cmp ebx, 4
jne 0x40252e
mov eax, dword [ebp - 0x21c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp word [ebp - 0x218], 0
mov eax, esi
je 0x4025c0
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402590
sub eax, esi
cmp eax, 0x206
jbe 0x4025c0
test byte [0x40d004], 8
jne 0x402678
mov dword [ebp - 0x21c], 0
jmp 0x402566
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x4025d9
test al, 0x10
jne 0x4026e0
test byte [0x40d004], 8
je 0x402566
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x402706
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40f022
test edx, edx
jne 0x402615
mov eax, esi
call fcn.00401380
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._s_is_not_a_directory__skipping_it_n
mov dword [esp + 8], str.cx_process_all_menus
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
call fcn.00401600
jmp 0x402566
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.unable_to_get_the_path_of_folder__08lx_n
mov dword [esp + 8], str.cx_process_all_menus
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
call fcn.00401600
jmp 0x402566
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x4026f4
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x40f022
test ecx, ecx
jne 0x4026a7
mov eax, esi
call fcn.00401380
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.Ignoring_special_folder__08lx_because_its_path_is_too_long:__s_n
mov dword [esp + 8], str.cx_process_all_menus
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
call fcn.00401600
jmp 0x4025af
mov eax, esi
call fcn.00401650
test eax, eax
je 0x4025af
jmp 0x402566
mov dword [esp + 4], esi
mov dword [esp], 0x40f015
call fcn.00401540
jmp 0x4026a7
mov dword [esp + 4], esi
mov dword [esp], 0x40f015
call fcn.00401540
jmp 0x402615
Function at 0x4027f0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathSkipRootW]
mov edi, dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 4
test eax, eax
je 0x402868
mov ebx, eax
movzx eax, word [eax]
mov edi, dword [sym.imp.kernel32.dll_CreateDirectoryW]
test ax, ax
jne 0x402834
jmp 0x402868
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x402868
cmp ax, 0x5c
jne 0x402828
xor eax, eax
add ebx, 2
mov word [ebx - 2], ax
mov dword [esp + 4], 0
mov dword [esp], esi
call edi
mov edx, 0x5c
mov word [ebx - 2], dx
movzx eax, word [ebx]
sub esp, 8
test ax, ax
jne 0x402834
lea esi, [esi]
mov dword [esp + 4], 0
mov dword [esp], esi
call edi
mov edx, eax
sub esp, 8
mov eax, 1
test edx, edx
jne 0x402896
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xb7
sete al
movzx eax, al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x402f80
Capabilities:
Check if process is running under wine
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
mov ebx, eax
lea eax, [ebp - 0x10]
sub esp, 0x1c
mov dword [esp + 8], eax
mov dword [esp + 4], str.SoftwareWineMenuFiles
mov dword [esp], 0x80000001
call dword [sym.imp.advapi32.dll_RegCreateKeyW]
sub esp, 0xc
test eax, eax
jne 0x403010
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x40301a
cmp word [esi], 0
mov eax, esi
je 0x40302d
nop
add eax, 2
cmp word [eax], 0
jne 0x402fc0
sub eax, esi
add eax, 2
mov dword [esp + 0x10], esi
mov dword [esp + 4], ebx
mov dword [esp], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
mov ebx, eax
mov dword [esp], edi
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword fs:[0x18]
mov dword [edx + 0x34], eax
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 2
jmp 0x402fce

Function at 0x403040
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, 0x1000
sub esp, 0x1c
jmp 0x403060
cmp ebx, eax
jg 0x4030b0
lea ebx, [eax + 1]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
lea esi, [ebx + ebx]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x4030ba
lea eax, [ebp + 0xc]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp], 4
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0
call dword [sym.imp.ucrtbase.dll___stdio_common_vswprintf]
test eax, eax
jns 0x403050
mov ebx, esi
jmp 0x403057
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x40d014], 2
jne 0x4030d0
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x4030c3
Function at 0x403100
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
mov esi, edx
push ebx
sub esp, 0x18
movzx ecx, word [edx]
mov dword [ebp - 0x10], eax
test cx, cx
je 0x403150
lea edi, [edx + 2]
xor edx, edx
lea esi, [esi]
mov ebx, 0x10
lea esi, [esi]
mov eax, edx
shr dx, 1
xor eax, ecx
shr cx, 1
and eax, 1
neg eax
and ax, 0xa001
xor edx, eax
sub ebx, 1
jne 0x403128
movzx ecx, word [edi]
add edi, 2
test cx, cx
jne 0x403120
movzx edi, dx
mov ebx, dword [sym.imp.ucrtbase.dll_wcsrchr]
mov dword [esp], esi
mov dword [esp + 4], 0x5c
call ebx
mov dword [esp + 4], 0x2e
lea ecx, [eax + 2]
test eax, eax
cmovne esi, ecx
mov dword [esp], esi
call ebx
mov edx, eax
sub edx, esi
sar edx, 1
test eax, eax
je 0x4031a9
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov dword [esp], str._04X__.s._d
mov dword [esp + 0x10], eax
call fcn.00403040
add esp, 0x18
pop ebx
pop esi
pop edi
pop ebp
ret
cmp word [esi], 0
je 0x4031c9
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4031b8
sub eax, esi
sar eax, 1
mov edx, eax
jmp 0x403182
xor edx, edx
jmp 0x403182

Function at 0x4031d0
Capabilities:
Query or enumerate registry key
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, 0x800
sub esp, 0x28
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], 0x800
jmp 0x403209
cmp eax, 0xea
jne 0x403268
mov eax, dword [ebp - 0x10]
lea ebx, [eax + eax]
mov dword [ebp - 0x10], ebx
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x40327d
lea eax, [ebp - 0x10]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov eax, dword [ebp - 0x14]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x4031f0
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
xor edi, edi
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x40d014], 2
jne 0x403293
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x403286
Function at 0x4032c0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, eax
sub esp, 0x10
cmp word [eax], 0
je 0x403308
nop
add eax, 2
cmp word [eax], 0
jne 0x4032d0
sub eax, ebx
add eax, 2
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x40330f
xor edx, edx
lea esi, [esi]
movzx ecx, word [ebx + edx]
mov word [eax + edx], cx
add edx, 2
test cx, cx
jne 0x4032f0
mov ebx, dword [ebp - 4]
leave
ret
mov eax, 2
jmp 0x4032de
test byte [0x40d014], 2
jne 0x403325
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x403318

Function at 0x403350
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x1c
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
mov dword [ebp - 0x10], edx
call edx
sub esp, 0x18
mov edi, eax
add eax, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x10]
test eax, eax
je 0x4033dc
mov ebx, eax
mov dword [esp + 0x14], edi
mov dword [esp + 8], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call edx
mov eax, ebx
sub esp, 0x18
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x40d014], 2
jne 0x4033f2
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x4033e5
Function at 0x403420
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x10]
push ebx
mov ebx, ecx
sub esp, 0x2c
mov dword [ebp - 0x18], eax
mov esi, dword [sym.imp.shlwapi.dll_AssocQueryStringW]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x10], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0
call esi
sub esp, 0x18
test eax, eax
js 0x4034d0
mov eax, dword [ebp - 0x10]
add eax, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4034d9
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [ebp - 0x20], eax
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], 0
mov dword [esp + 4], eax
call esi
mov edx, dword [ebp - 0x20]
sub esp, 0x18
test eax, eax
js 0x4034c0
mov eax, dword [ebp - 0x14]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
lea esi, [esi]
mov dword [ebp - 0x14], 0
jmp 0x4034ae
test byte [0x40d014], 2
jne 0x4034ef
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x4034e2
Function at 0x4038b0
Capabilities:
Query or enumerate registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x10]
push ebx
mov ebx, ecx
sub esp, 0x30
mov dword [ebp - 0x14], eax
mov esi, dword [sym.imp.advapi32.dll_RegGetValueW]
mov dword [ebp - 0x18], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 2
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call esi
sub esp, 0x1c
test eax, eax
jne 0x403961
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x40396d
mov dword [ebp - 0x20], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], eax
mov dword [ebp - 0x1c], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 2
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x1c]
sub esp, 0x1c
test eax, eax
mov ecx, dword [ebp - 0x20]
jne 0x403958
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
xor ecx, ecx
pop ebx
mov eax, ecx
pop esi
pop edi
pop ebp
ret
test byte [0x40d014], 2
jne 0x403983
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x403976
Function at 0x4039b0
Capabilities:
Terminate process

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, 1
sub esp, 0x2c
mov dword [ebp - 0x18], edx
mov dword [esp + 4], eax
mov dword [esp], 0x40f430
call fcn.00403040
mov dword [ebp - 0x24], eax
mov dword [esp + 4], 0x40f44c
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wfopen]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x403aae
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0x1000
mov dword [ebp - 0x20], eax
call eax
mov ebx, eax
test eax, eax
je 0x403b86
mov edi, 0x1000
lea esi, [esi]
xor esi, esi
jmp 0x403a69
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strlen]
mov dword [esp + 4], 0xa
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strchr]
test eax, eax
jne 0x403ac8
add edi, edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call dword [sym.imp.ucrtbase.dll_realloc]
mov ebx, eax
test eax, eax
je 0x403b4a
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov eax, edi
sub eax, esi
add esi, ebx
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fgets]
test eax, eax
jne 0x403a30
mov dword [esp], ebx
mov esi, dword [sym.imp.ucrtbase.dll_free]
xor ebx, ebx
call esi
mov edi, dword [ebp - 0x14]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_feof]
mov dword [esp], edi
test eax, eax
setne bl
call dword [sym.imp.ucrtbase.dll_fclose]
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call esi
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
mov byte [eax], 0
cmp byte [ebx], 0x23
je 0x403a28
mov dword [esp + 4], 0x3a
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strchr]
mov esi, eax
test eax, eax
je 0x403a28
mov dword [esp], 0x10
mov eax, dword [ebp - 0x20]
call eax
test eax, eax
je 0x403b86
mov dword [ebp - 0x1c], eax
mov eax, ebx
mov byte [esi], 0
call fcn.00403350
mov edx, dword [ebp - 0x1c]
mov dword [edx], eax
lea eax, [esi + 1]
call fcn.00403350
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov ecx, eax
movd xmm0, ecx
movd xmm1, dword [ebp - 0x18]
mov ecx, dword [esi + 4]
punpckldq xmm0, xmm1
lea eax, [edx + 8]
movq qword [edx + 4], xmm0
mov dword [edx + 0xc], ecx
mov dword [ecx], eax
mov dword [esi + 4], eax
jmp 0x403a28
test byte [0x40d014], 2
jne 0x403b60
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xrealloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x403b53
test byte [0x40d014], 2
je 0x403b53
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x403b53
Function at 0x404250
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x18]
push ebx
mov ebx, edx
sub esp, 0x30
mov esi, dword [eax]
mov dword [ebp - 0x20], eax
mov dword [edx], 0
mov dword [ebp - 0x1c], ecx
lea ecx, [ebp - 0x12]
mov eax, dword [esi]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 6
mov dword [esp + 4], ecx
mov dword [esp], esi
call dword [eax + 0xc]
sub esp, 0x10
test eax, eax
js 0x404294
cmp dword [ebp - 0x18], 6
je 0x4042d0
test byte [0x40d014], 4
jne 0x404350
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebx]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov dword [ebx], 0
mov eax, 0x80004005
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp word [ebp - 0x12], 0
jne 0x404294
cmp word [ebp - 0x10], 1
jne 0x404294
movzx eax, word [ebp - 0xe]
mov edx, dword [ebp - 0x1c]
mov dword [edx], eax
shl eax, 4
mov dword [esp], eax
mov dword [ebp - 0x24], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x24]
test eax, eax
mov ecx, eax
je 0x404384
mov dword [ebx], eax
mov eax, dword [esi]
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], esi
call dword [eax + 0xc]
sub esp, 0x10
test eax, eax
js 0x4042a1
movzx edx, word [ebp - 0xe]
shl edx, 4
cmp edx, dword [ebp - 0x18]
jne 0x4042a1
mov edi, dword [ebp - 0x1c]
mov edx, dword [edi]
test edx, edx
jne 0x4042c7
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov dword [ebx], 0
jmp 0x4042ac
mov edx, dword [ebp - 0x18]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Invalid_ico_file_format__hr0x_08lX__bytesRead_ld__n
mov dword [esp + 8], str.read_ico_direntries
mov dword [esp + 4], 0x40d014
mov dword [esp + 0x14], edx
mov dword [esp], 2
call fcn.00402c50
jmp 0x4042a1
test byte [0x40d014], 2
jne 0x40439a
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x40438d