joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40d8f8
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, 0x1c
mov eax, dword [0x44a540]
mov edi, dword [ebp + 8]
test eax, eax
je 0x40d98c
mov esi, dword [eax + 0x2c]
test esi, esi
js 0x40d9a8
mov ebx, dword [eax + 0x2c]
test ebx, ebx
jne 0x40d9c8
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
mov ecx, dword [edi + 0xc]
mov dword [ebp - 0x14], eax
test ecx, ecx
jne 0x40d980
lea edx, [ebp - 0x14]
mov eax, edi
call sym.__Unwind_RaiseException_Phase2
cmp eax, 7
jne 0x40da47
mov eax, dword [0x44a540]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40da1e
mov edx, dword [eax + 0x2c]
test edx, edx
js 0x40da38
mov edi, dword [eax + 0x2c]
test edi, edi
jne 0x40d9f8
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
lea edx, [ebp - 0x14]
mov eax, edi
call sym.__Unwind_ForcedUnwind_Phase2
jmp 0x40d93d
call sym.___w32_sharedptr_initialize
mov eax, dword [0x44a540]
mov esi, dword [eax + 0x2c]
test esi, esi
jns 0x40d918
lea esi, [esi]
call sym._fc_key_init_once
mov eax, dword [0x44a540]
mov ebx, dword [eax + 0x2c]
test ebx, ebx
je 0x40d923
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [eax + 0x30]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x40d926
mov eax, dword [eax + 0x30]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x40d96f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40d96f
call sym.___w32_sharedptr_initialize
mov eax, dword [0x44a540]
mov edx, dword [eax + 0x2c]
test edx, edx
jns 0x40d961
nop
lea esi, [esi]
call sym._fc_key_init_once
mov eax, dword [0x44a540]
jmp 0x40d961
call sym._abort
lea esi, [esi]
lea edi, [edi]
Function at 0x40da58
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov esi, dword [edi + 0xc]
test esi, esi
je 0x40daea
mov eax, dword [0x44a540]
test eax, eax
je 0x40dade
mov ebx, dword [eax + 0x2c]
test ebx, ebx
js 0x40db59
mov ecx, dword [eax + 0x2c]
test ecx, ecx
jne 0x40daff
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov eax, edi
call sym.__Unwind_ForcedUnwind_Phase2
cmp eax, 7
jne 0x40db77
mov eax, dword [0x44a540]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40db4a
mov edx, dword [eax + 0x2c]
test edx, edx
js 0x40db68
mov edi, dword [eax + 0x2c]
test edi, edi
jne 0x40db2b
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call sym.___w32_sharedptr_initialize
mov eax, dword [0x44a540]
jmp 0x40da7a
mov dword [esp], edi
call sym.__Unwind_SjLj_RaiseException
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ebx, dword [eax + 0x30]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x40da8f
mov eax, dword [eax + 0x30]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x40dacd
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40dacd
call sym.___w32_sharedptr_initialize
mov eax, dword [0x44a540]
jmp 0x40dab8
call sym._fc_key_init_once
mov eax, dword [0x44a540]
jmp 0x40da85
call sym._fc_key_init_once
mov eax, dword [0x44a540]
jmp 0x40dac3
call sym._abort
lea esi, [esi]
lea edi, [edi]

Function at 0x40dd28
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov edx, eax
je 0x40dd58
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov eax, dword [ebp + 0xc]
mov dword [esp], edx
mov dword [esp + 4], eax
call sym.___mingwthr_key_dtor
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
leave
ret
Function at 0x415260
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp sym.___do_sjlj_init

Function at 0x415bd0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 4], esi
mov esi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sym._fread
test eax, eax
mov edx, eax
jle 0x415c20
movzx eax, byte [esi + eax - 1]
mov dword [ebx + 0x24], eax
mov ebx, dword [ebp - 8]
mov eax, edx
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x24], 0xffffffff
mov eax, edx
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x4071b4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x461124], 0
jne 0x4071ef
xor ecx, ecx
push esi
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 0x4071c8
mov dword [ecx*4 + 0x461120], eax
inc ecx
cmp ecx, 0x100
jl 0x4071c3
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x40721c
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x461120]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x4071fd
not eax
pop ebp
ret 0xc

Function at 0x430002
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
mov eax, section..text
nop
nop
nop
nop
nop
push 4
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
je 0x430072
nop
nop
mov ebx, 0x408ecc
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x3e4648da
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
nop
loop 0x430060
nop
nop
nop
nop
nop
mov eax, section..data
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x4300d2
mov ebx, 0x42e1d0
nop
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
div edi
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x511f1088
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x4300c0
nop
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x402800
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
test edi, edi
jne 0x402811
xor eax, eax
pop esi
pop ebx
pop ecx
pop ebp
ret
mov eax, dword [edi + 1]
movzx edx, byte [edi + 4]
mov esi, eax
mov ecx, eax
shl esi, 0x10
and ecx, 0xff00
or esi, ecx
mov cl, byte [edi]
shr eax, 8
and eax, 0xff00
shl esi, 8
or esi, eax
or esi, edx
lea ebx, [edi + 5]
mov eax, ebx
jle 0x402849
mov edx, esi
xor byte [eax], cl
inc eax
sub edx, 1
jne 0x402841
mov ecx, dword [ebp + 8]
push esi
push ebx
call fcn.00402c30
mov cl, byte [edi]
add esp, 8
mov eax, ebx
test esi, esi
jle 0x402868
mov edi, edi
xor byte [eax], cl
inc eax
sub esi, 1
jne 0x402860
pop esi
mov eax, 1
pop ebx
pop ecx
pop ebp
ret
Function at 0x402fb0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ebcb
mov eax, dword fs:[0]
push eax
sub esp, 0x82c
mov eax, dword [0x413090]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x830], ebx
mov dword [ebp - 0x838], eax
mov dword [ebp - 0x814], 0xf
mov dword [ebp - 0x818], ebx
mov byte [ebp - 0x828], bl
push 0x7ff
lea ecx, [ebp - 0x80f]
push ebx
mov dword [ebp - 4], ebx
push ecx
mov byte [ebp - 0x810], bl
call fcn.00407280
add esp, 0xc
lea edx, [ebp - 0x834]
push edx
push 1
push ebx
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x403067
push ebx
mov dword [esi + 0x18], 0xf
mov dword [esi + 0x14], ebx
push 0x410bfa
mov ecx, esi
mov byte [esi + 4], bl
call fcn.00402000
cmp dword [ebp - 0x814], 0x10
jb 0x4030d8
mov eax, dword [ebp - 0x828]
push eax
jmp 0x4030d0
mov eax, dword [ebp - 0x838]
lea ecx, [ebp - 0x830]
push ecx
mov ecx, dword [ebp - 0x834]
lea edx, [ebp - 0x810]
push edx
push ebx
push ebx
push eax
push ecx
mov dword [ebp - 0x830], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp - 0x834]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x82c]
mov dword [esi + 0x18], 0xf
mov dword [esi + 0x14], ebx
push eax
mov ecx, esi
mov byte [esi + 4], bl
call fcn.00401f10
cmp dword [ebp - 0x814], 0x10
jb 0x4030d8
mov ecx, dword [ebp - 0x828]
push ecx
call fcn.00404a67
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040485c
mov esp, ebp
pop ebp
ret
Function at 0x403390
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ec58
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x413090]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, ecx
push eax
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], eax
call fcn.00402fb0
add esp, 4
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4033d6
mov edi, dword [ebp - 0x18]
sub eax, edx
mov esi, eax
mov eax, edi
cmp edi, esi
jb 0x4033ec
mov eax, esi
cmp dword [ebp - 0x14], 0x10
mov edx, dword [ebp - 0x28]
jae 0x4033f8
lea edx, [ebp - 0x28]
mov ecx, ebx
call fcn.00401040
test eax, eax
jne 0x40342c
cmp edi, esi
jb 0x40342c
cmp edi, esi
setne al
test eax, eax
jne 0x40342c
cmp dword [ebp - 0x14], 0x10
jb 0x403422
mov eax, dword [ebp - 0x28]
push eax
call fcn.00404a67
add esp, 4
mov eax, 1
jmp 0x4034cc
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x30]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push eax
push 0x80000002
mov dword [ebp - 0x3c], 2
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x403467
cmp dword [ebp - 0x14], 0x10
jb 0x4034ca
mov ecx, dword [ebp - 0x28]
push ecx
jmp 0x4034c2
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403470
sub eax, edx
mov edx, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x30]
push ebx
push 1
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x30]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4034b8
cmp dword [ebp - 0x14], 0x10
jb 0x403422
mov edx, dword [ebp - 0x28]
push edx
call fcn.00404a67
add esp, 4
lea eax, [esi + 1]
jmp 0x4034cc
cmp dword [ebp - 0x14], 0x10
jb 0x4034ca
mov eax, dword [ebp - 0x28]
push eax
call fcn.00404a67
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040485c
mov esp, ebp
pop ebp
ret

Function at 0x40485c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x413090]
jne 0x404866
repz ret
jmp fcn.004062d6
Function at 0x40d6fb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004085e8
and dword [ebp - 4], 0
cmp dword [0x59d6ac], 0
mov ebx, eax
jne 0x40d7ac
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40d85d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x40d85d
push eax
call fcn.00408576
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x59d6ac], eax
call esi
push eax
call fcn.00408576
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x59d6b0], eax
call esi
push eax
call fcn.00408576
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x59d6b4], eax
call esi
push eax
call fcn.00408576
pop ecx
mov dword [0x59d6bc], eax
test eax, eax
je 0x40d7ac
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00408576
pop ecx
mov dword [0x59d6b8], eax
mov eax, dword [0x59d6b8]
cmp eax, ebx
je 0x40d804
cmp dword [0x59d6bc], ebx
je 0x40d804
push eax
call fcn.004085f1
push dword [0x59d6bc]
mov esi, eax
call fcn.004085f1
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40d804
test edi, edi
je 0x40d804
call esi
test eax, eax
je 0x40d7fb
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40d7fb
test byte [ebp - 0xc], 1
jne 0x40d804
or dword [ebp + 0x10], 0x200000
jmp 0x40d83d
mov eax, dword [0x59d6b0]
cmp eax, ebx
je 0x40d83d
push eax
call fcn.004085f1
pop ecx
test eax, eax
je 0x40d83d
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40d83d
mov eax, dword [0x59d6b4]
cmp eax, ebx
je 0x40d83d
push eax
call fcn.004085f1
pop ecx
test eax, eax
je 0x40d83d
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x59d6ac]
call fcn.004085f1
pop ecx
test eax, eax
je 0x40d85d
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40d85f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4012c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
shl ecx, 0xa
add ecx, edx
cmp byte [0x40b2c4], 0
je 0x40131a
push esi
push ecx
call fcn.00405511
add esp, 4
mov dword [ebp - 4], 2
cmp byte [0x40b2c4], 0
mov esi, eax
lea eax, [ebp - 4]
push eax
push 0x40
push 0x400
push esi
je 0x401307
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push dword [0x40b2c8]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push 0x40
push 0x1000
push ecx
push 0
push dword [0x40b2c8]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esp, ebp
pop ebp
ret
Function at 0x4015a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov edx, edi
lea ecx, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x4015b0
sub edx, ecx
xor ecx, ecx
lea ebx, [edx + 1]
mov edx, ebx
call fcn.004012c0
cmp byte [0x40b2c4], 0
mov esi, eax
je 0x4015f6
lea eax, [ebp - 4]
mov dword [ebp - 4], 2
push eax
push 0x40
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push ebx
push edi
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x401607
push 0
push ebx
push edi
push esi
push dword [0x40b2c8]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov edx, 0x1c
xor ecx, ecx
call fcn.004012c0
mov edi, eax
mov dword [0x40aad5], esi
mov edx, 0x18
mov dword [0x40aada], edi
mov ecx, 0x40aad4
call fcn.00401340
cmp byte [0x40b2c4], 0
je 0x40164d
push 0
push esi
call fcn.004054e0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x8000
push 0
push esi
push dword [0x40b2c8]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401800
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x40a008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push dword [ebp + 0xc]
mov esi, ecx
push eax
mov byte [esi], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0x67452301
mov dword [esi + 0x50], 0xefcdab89
mov dword [esi + 0x54], 0x98badcfe
mov dword [esi + 0x58], 0x10325476
call fcn.00402040
cmp byte [esi], 0
jne 0x401913
xor edx, edx
lea ecx, [esi + 0x46]
nop word [eax + eax]
movzx eax, byte [ecx - 2]
lea ecx, [ecx + 4]
mov byte [ebp + edx - 0xc], al
movzx eax, byte [ecx - 5]
mov byte [ebp + edx - 0xb], al
movzx eax, byte [ecx - 4]
mov byte [ebp + edx - 0xa], al
movzx eax, byte [ecx - 3]
mov byte [ebp + edx - 9], al
add edx, 4
cmp edx, 8
jb 0x401860
mov edx, dword [esi + 0x44]
mov ecx, 0x78
shr edx, 3
mov eax, 0x38
and edx, 0x3f
sub ecx, edx
sub eax, edx
cmp edx, 0x38
push edi
cmovae eax, ecx
mov ecx, esi
push eax
push 0x40acd0
call fcn.00402040
push 8
lea eax, [ebp - 0xc]
mov ecx, esi
push eax
call fcn.00402040
lea edx, [esi + 0x5e]
mov edi, 4
lea eax, [esi + 0x4e]
nop
movzx ecx, byte [eax - 2]
lea eax, [eax + 4]
mov byte [edx - 2], cl
lea edx, [edx + 4]
movzx ecx, byte [eax - 5]
mov byte [edx - 5], cl
movzx ecx, byte [eax - 4]
mov byte [edx - 4], cl
movzx ecx, byte [eax - 3]
mov byte [edx - 3], cl
sub edi, 1
jne 0x4018d0
pop edi
push 0x40
lea ecx, [esi + 1]
push 0
push ecx
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
add esp, 0xc
movq qword [esi + 0x44], xmm0
mov byte [esi], 1
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004054a2
mov esp, ebp
pop ebp
ret 8
Function at 0x404320
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40434c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x404374
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40437a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x4043e2
jg 0x404391
test esi, esi
je 0x4043e2
test ecx, ecx
jl 0x4043dd
jg 0x40439b
test eax, eax
je 0x4043dd
cmp edi, ecx
jg 0x4043af
jl 0x4043a5
cmp esi, eax
jae 0x4043af
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x4043e5
mov ecx, dword [ebp + 8]
jmp 0x4043ef
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x404409
jg 0x4043ef
test esi, esi
je 0x404409
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x404409
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x404420
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 8
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
jg 0x404444
jl 0x404439
test ecx, ecx
jne 0x404444
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x40445e
push eax
push ecx
push dword [ebp + 8]
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push esi
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x4044aa
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 4], edx
mov eax, dword [eax]
test eax, eax
je 0x4044b0
mov edi, dword [ebp + 8]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp + 8], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x4044b0
lea eax, [ebx + 0x2c]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
mov esi, dword [ebp + 8]
je 0x404526
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x4044dc
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x404514
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x404526
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x4044f0
test edi, edi
je 0x404526
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4048a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x40a008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x4048d0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054a2
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40490c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40490c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054a2
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x4049e3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x404934
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x404940
movsx eax, bl
jmp 0x404978
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x4049a2
sub eax, 1
je 0x4049a2
sub eax, 2
jne 0x4049e3
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054a2
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4049c0
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4049e3
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054a2
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004054a2
mov esp, ebp
pop ebp
ret 4