joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41a2d0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x424b10]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x41a2ef
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x424b0c], 1
mov byte [0x424b08], bl
jne 0x41a349
mov ecx, dword [0x425988]
test ecx, ecx
je 0x41a337
mov esi, dword [0x425984]
sub esi, 4
cmp esi, ecx
jb 0x41a337
mov eax, dword [esi]
test eax, eax
je 0x41a330
call eax
mov ecx, dword [0x425988]
sub esi, 4
cmp esi, ecx
jae 0x41a322
push 0x421014
push 0x421010
call fcn.0041a380
add esp, 8
push 0x42101c
push 0x421018
call fcn.0041a380
add esp, 8
test ebx, ebx
jne 0x41a370
push ebp
mov dword [0x424b10], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x41a930
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x424c20]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x41a972
call edi
mov esi, eax
test esi, esi
je 0x41a95c
mov eax, 1
jmp 0x41a96d
call ebp
mov ebx, eax
test ebx, ebx
je 0x41aa7f
mov eax, 2
mov dword [0x424c20], eax
cmp eax, 1
jne 0x41aa12
test esi, esi
jne 0x41a98b
call edi
mov esi, eax
test esi, esi
je 0x41aa7f
cmp word [esi], 0
mov eax, esi
je 0x41a9a5
add eax, 2
cmp word [eax], 0
jne 0x41a993
add eax, 2
cmp word [eax], 0
jne 0x41a993
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x41aa04
push edi
call fcn.0041a180
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41aa04
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x41a9f6
push ebx
call fcn.0041a100
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x41aa7f
test ebx, ebx
jne 0x41aa23
call ebp
mov ebx, eax
test ebx, ebx
je 0x41aa7f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x41aa3b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41aa2b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41aa2b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.0041a180
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x41aa5d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x41b3b0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x422240
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x41b3d4
add eax, 8
inc ebp
cmp eax, 0x4222d0
jb 0x41b3c5
cmp ecx, dword [ebp*8 + 0x422240]
jne 0x41b57b
mov eax, dword [0x424aac]
cmp eax, 1
je 0x41b53d
test eax, eax
jne 0x41b400
cmp dword [0x422090], 1
je 0x41b53d
cmp ecx, 0xfc
je 0x41b57b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41b43b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x41b484
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x4202e0
add ebx, ecx
push ebx
call fcn.0041c3c0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4202c0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x422244]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0041c330
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x425880]
test eax, eax
je 0x41b54e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x41b558
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x422244]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x41d5d0
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x41d78e
push 0x3d
push edi
call fcn.0041da70
mov esi, eax
add esp, 8
test esi, esi
je 0x41d78e
cmp edi, esi
je 0x41d78e
mov dl, byte [esi + 1]
mov ecx, dword [0x424af4]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x424af0]
cmp eax, ecx
jne 0x41d627
push eax
call fcn.0041d860
add esp, 4
mov dword [0x424af0], eax
test eax, eax
jne 0x41d6a2
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41d64e
mov eax, dword [0x424af8]
test eax, eax
je 0x41d64e
call fcn.0041d280
test eax, eax
je 0x41d69d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x41d65a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.0041a180
add esp, 4
mov dword [0x424af0], eax
test eax, eax
je 0x41d78e
mov dword [eax], 0
mov eax, dword [0x424af8]
test eax, eax
jne 0x41d69d
push 4
call fcn.0041a180
add esp, 4
mov dword [0x424af8], eax
test eax, eax
je 0x41d78e
mov dword [eax], 0
mov eax, dword [0x424af0]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.0041d7e0
mov esi, eax
add esp, 8
test esi, esi
jl 0x41d79f
cmp dword [ebx], 0
je 0x41d79f
test ebp, ebp
je 0x41d797
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.0041a100
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x41d6f9
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x41d6e8
lea eax, [esi*4]
push eax
push ebx
call fcn.0041d8d0
add esp, 8
test eax, eax
je 0x41d713
mov dword [0x424af0], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41d786
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.0041a180
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41d786
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.0041a100
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x41d717
test ebp, ebp
jne 0x41d786
test esi, esi
jge 0x41d7a9
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.0041d8d0
add esp, 8
test eax, eax
je 0x41d78e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x424af0], eax
jmp 0x41d717
Function at 0x41e590
Capabilities:
Get file size

Disassembly:
sub esp, 0x8c
push ebx
push ebp
mov ebp, dword [esp + 0x98]
push esi
test ebp, ebp
push edi
jne 0x41e5b4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 8
mov eax, dword [ebp + 4]
test eax, eax
je 0x41e5ca
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 8
mov eax, dword [0x424650]
push 0x2000
push eax
call fcn.00403130
mov edi, eax
test edi, edi
jne 0x41e5ed
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 8
mov edx, dword [esp + 0xa4]
lea ecx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41e618
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll__lread]
push 0x2000
push edi
push esi
mov dword [esp + 0x1c], eax
call ebx
mov edx, dword [esp + 0x10]
sub edx, eax
test eax, eax
mov dword [esp + 0x10], edx
je 0x41e66e
lea ecx, [esp + 0x10]
push ecx
push eax
push edi
push esi
push ebp
call fcn.0041e930
add esp, 0x14
test eax, eax
je 0x41e693
push 0x2000
push edi
push esi
call ebx
mov edx, dword [esp + 0x10]
sub edx, eax
test eax, eax
mov dword [esp + 0x10], edx
jne 0x41e642
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, dword [0x424650]
push edi
push eax
call fcn.00402d50
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret 8
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
mov edx, dword [0x424650]
push edi
push edx
call fcn.00402d50
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8c
ret 8

Function at 0x41ee80
Capabilities:
Get common file path

Disassembly:
sub esp, 0x108
lea eax, [esp]
push ebx
push esi
mov esi, dword [esp + 0x114]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push eax
call edi
lea ecx, [esp + 0xc]
mov edx, dword [esp + 0x11c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ebx, eax
lea eax, [esp + 0xc]
push eax
push esi
call edi
xor eax, eax
pop edi
test ebx, ebx
pop esi
pop ebx
setne al
add esp, 0x108
ret 8
Function at 0x404b24
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x404b2d
mov eax, dword [ebp - 4]
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov edi, dword [ebp + 8]
cmp byte [ebx + 0x18], 0
jne 0x404bab
mov word [ebp - 0x2004], 0
mov eax, dword [ebx + 0x19]
call fcn.0040376c
push eax
push 0x1000
lea eax, [ebp - 0x2004]
push eax
mov eax, esi
call fcn.0040376c
push eax
mov eax, dword [ebp - 4]
call fcn.0040376c
push eax
mov eax, dword [ebx + 0x1d]
call fcn.0040376c
push eax
call sub.kernel32.dll_GetPrivateProfileStringW
test eax, eax
je 0x404ba2
mov eax, edi
lea edx, [ebp - 0x2004]
mov ecx, 0x1000
call fcn.00403740
jmp 0x404bdc
mov eax, edi
call fcn.004035ec
jmp 0x404bdc
mov eax, edi
mov edx, esi
call fcn.00403628
mov eax, dword [ebx + 0x19]
call fcn.0040376c
push eax
mov eax, esi
call fcn.0040376c
push eax
mov eax, dword [ebp - 4]
call fcn.0040376c
push eax
mov eax, dword [ebx + 0x1d]
call fcn.0040376c
push eax
call sub.kernel32.dll_WritePrivateProfileStringW
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x407134
Capabilities:
Hide graphical window

Disassembly:
and byte [eax + 0x37], 0xef
test dl, dl
je 0x407140
or byte [eax + 0x37], 0x10
mov byte [eax + 0x52], dl
mov ecx, dword [eax + 0x28]
jecxz 0x40715c
push eax
je 0x40715d
call dword [0x40f120]
pop eax
push 5
push dword [eax + 0x28]
call sub.user32.dll_ShowWindow
ret
mov byte [eax + 0x174], dl
push 0
push ecx
call sub.user32.dll_ShowWindow
pop eax
call dword [0x40f120]
ret

Function at 0x401000
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push ecx
push edx
push esi
enter 0x84, 0
sub ebp, 0x82
mov dword [ebp - 2], 0
call fcn.00401533
mov ebx, eax
xor eax, eax
mov dword [ebp + 0x7e], eax
lea eax, [ebp + 0x7e]
push eax
mov eax, ebx
or al, 0x40
push eax
mov eax, 0x401dc7
sub eax, fcn.00401592
push eax
push fcn.00401592
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
cmp dword [ebp + 0x7e], 0
je 0x40107a
mov eax, ebx
lea edx, [ebp - 2]
call fcn.00401461
mov eax, ebx
lea ecx, [ebx + 0x1b600]
call fcn.004014b3
mov esi, ecx
mov eax, ebx
or si, 1
cdq
idiv esi
lea edx, [eax + ecx]
mov eax, ebx
lea ebx, [ebp - 2]
or eax, 0x402054
call fcn.00401592
xor eax, eax
lea esp, [ebp + 0x82]
pop ebp
pop esi
pop edx
pop ecx
pop ebx
ret

Function at 0x401533
Capabilities:
Encode data using base64 via winapi

Disassembly:
push ecx
push edx
enter 0x11c, 0
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USER32.DLL_GetCursorPos]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
push 1
push 1
lea eax, [ebp - 0x11c]
push eax
mov dword [ebp - 4], 0xa
mov byte [ebp - 0x11c], 0
call dword [sym.imp.CRYPT32.DLL_CryptBinaryToStringA]
movzx eax, byte [ebp - 0x18]
sub eax, 0x41
leave
pop edx
pop ecx
ret
Function at 0x4069c5
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x4069e9
xor eax, eax
test eax, eax
je 0x4069fc
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x4069fc
xor ecx, ecx
jmp 0x4069ff
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x406b22
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x427dec], 0
push esi
jne 0x406b59
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406b33
mov dword [ecx*4 + 0x427de8], eax
inc ecx
cmp ecx, 0x100
jl 0x406b2e
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406b8a
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x427de8]
xor eax, esi
inc ecx
dec edx
jne 0x406b6c
pop edi
not eax
pop esi
ret 0xc

Function at 0x5d8aa9
Capabilities:
Encode data using xor

Disassembly:
mov ecx, 0x5d87dc
inc edx
inc edx
or esi, esi
call fcn.005d8adb
mov esi, 0xcf385eb1
xor dword [eax], ecx
and esi, edx
add eax, 2
mov edx, edx
and esi, esi
dec esi
cmp eax, ebx
jl fcn.005d8aa9
add esi, edx
mov esi, 0x7b17e71b
add edx, edx
ret
Function at 0x401318
Capabilities:
Execute command

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push edi
push esi
push ebx
sub esp, 0xb4
mov dword [esp + 0x54], sym.___gxx_personality_sj0
mov dword [esp + 0x58], 0x40b8a0
lea eax, [esp + 0x5c]
mov dword [eax], ebp
mov edx, 0x40158f
mov dword [eax + 4], edx
mov dword [eax + 8], esp
lea eax, [esp + 0x3c]
mov dword [esp], eax
call dbg._Unwind_SjLj_Register
call sym.___main
mov dword [esp], 0x40d024
call sym._printf
lea eax, [esp + 0x94]
mov dword [esp + 4], eax
mov dword [esp], 0x40d037
call sym._scanf
mov eax, dword [esp + 0x94]
shl eax, 3
mov dword [esp], eax
mov dword [esp + 0x40], 0xffffffff
call sym.operator_new___unsigned_int_
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], 0
jmp 0x401402
mov eax, dword [esp + 0xac]
inc eax
mov dword [esp + 4], eax
mov dword [esp], 0x40d03c
call sym._printf
mov eax, dword [esp + 0xac]
shl eax, 3
add eax, dword [esp + 0xa8]
lea edx, [eax + 4]
mov eax, dword [esp + 0xac]
shl eax, 3
add eax, dword [esp + 0xa8]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._d_d
call sym._scanf
inc dword [esp + 0xac]
mov eax, dword [esp + 0x94]
cmp dword [esp + 0xac], eax
setl al
test al, al
jne 0x4013aa
lea eax, [esp + 0x98]
mov dword [esp], eax
mov dword [esp + 0x40], 0xffffffff
call fcn.0040ac98
mov eax, dword [esp + 0x94]
shl eax, 3
add eax, dword [esp + 0xa8]
lea edx, [esp + 0x98]
mov dword [esp + 0x10], edx
lea edx, [esp + 0xa7]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 4], eax
lea eax, [esp + 0x84]
mov dword [esp], eax
mov dword [esp + 0x40], 2
call method.std::priority_queue_Node__std::vector_Node__std::allocator_Node_____cmp_.priority_queue_Node__Node__Node__cmp_const__std::vector_Node__std::allocator_Node____const_
lea eax, [esp + 0x98]
mov dword [esp], eax
mov dword [esp + 0x40], 1
call method.std::vector_Node__std::allocator_Node___.vector__
jmp 0x401523
lea eax, [esp + 0x84]
mov dword [esp], eax
mov dword [esp + 0x40], 1
call dbg.top
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], edx
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x7c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0x40d069
call sym._printf
lea eax, [esp + 0x84]
mov dword [esp], eax
call dbg.pop
lea eax, [esp + 0x84]
mov dword [esp], eax
mov dword [esp + 0x40], 1
call method.std::priority_queue_Node__std::vector_Node__std::allocator_Node_____cmp_.empty___const
xor eax, 1
test al, al
jne 0x4014ce
mov dword [esp], str.pause
call sym._system
mov dword [esp + 0x28], 0
lea eax, [esp + 0x84]
mov dword [esp], eax
mov dword [esp + 0x40], 0xffffffff
call method.std::priority_queue_Node__std::vector_Node__std::allocator_Node_____cmp_.priority_queue__
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x3c]
mov dword [esp], eax
call sym.__Unwind_SjLj_Unregister
mov eax, dword [esp + 0x24]
add esp, 0xb4
pop ebx
pop esi
pop edi
leave
ret
Function at 0x4055d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
test ecx, ecx
mov dword [ebp - 0xc], ebx
mov ebx, eax
mov dword [ebp - 8], esi
mov esi, edx
mov dword [ebp - 4], edi
mov edi, ecx
jne 0x4055f6
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x38]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x40568a
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x405645
cmp eax, 0x40
je 0x405645
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x4055e9
cmp eax, 0x40
je 0x4055e9
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
jmp 0x4055e9
mov dword [esp + 8], 0x34
mov dword [esp + 4], str..._.._runtime_pseudo_reloc.c
mov dword [esp], str.VirtualQuery__addr__b__sizeof_b__
call sym.__assert
lea esi, [esi]
lea edi, [edi]

Function at 0x405bb8
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [0x412ac0]
call sym._TlsAlloc_0
cmp eax, 0xffffffff
je 0x405bf4
mov dword [ebx + 0x24], eax
mov dword [esp + 4], 0
mov dword [esp], eax
call sym.___mingwthr_key_dtor
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x28], eax
add esp, 0x14
pop ebx
leave
ret
call sym._GetLastError_0
jmp 0x405be2
Function at 0x405d18
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, eax
mov esi, edx
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x20], eax
mov edx, dword [ebx + 0x10]
mov dword [ebp - 0x1c], edx
mov eax, dword [esi]
jmp 0x405d41
mov dword [eax + 0x20], edi
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [esi], eax
test eax, eax
je 0x405e08
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x2c], eax
xor edi, edi
mov eax, 0xa
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebx
mov edx, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov dword [esp], 1
call dword [ebp - 0x20]
test eax, eax
jne 0x405e2c
cmp edi, 5
je 0x405e31
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x405dcb
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebx
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0xa
mov dword [esp], 1
call dword [ebp - 0x2c]
mov edi, eax
cmp eax, 7
je 0x405e31
cmp eax, 8
jne 0x405e2c
mov eax, dword [esi]
mov edi, dword [eax]
mov eax, dword [0x412ac0]
mov edx, dword [eax + 0x28]
test edx, edx
js 0x405e1c
test edx, edx
je 0x405d38
mov dword [esp + 4], edi
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call sym._TlsSetValue_8
sub esp, 8
test eax, eax
jne 0x405d3b
call sym._GetLastError_0
jmp 0x405d3b
mov dword [ebp - 0x2c], 0
mov edi, 5
mov al, 0x1a
jmp 0x405d56
call dbg.fc_key_init_once
mov eax, dword [0x412ac0]
mov edx, dword [eax + 0x28]
jmp 0x405ddb
mov edi, 2
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x405ea8
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
mov eax, dword [0x412ac0]
mov edx, dword [eax + 0x28]
test edx, edx
js 0x405f18
test edx, edx
jne 0x405ef4
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x10], eax
lea esi, [ebp - 0x20]
mov edx, esi
mov eax, ebx
call dbg._Unwind_ForcedUnwind_Phase2
cmp eax, 7
je 0x405f27
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov edi, dword [eax + 0x24]
call sym._GetLastError_0
mov esi, eax
mov dword [esp], edi
call sym._TlsGetValue_4
push edi
mov dword [esp], esi
mov dword [ebp - 0x2c], eax
call sym._SetLastError_4
push ecx
mov eax, dword [ebp - 0x2c]
jmp 0x405ec7
call dbg.fc_key_init_once
mov eax, dword [0x412ac0]
mov edx, dword [eax + 0x28]
jmp 0x405ec0
lea eax, [ebp - 0x1c]
mov edx, esi
call dbg.uw_install_context
lea esi, [esi]