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

Disassembly:
mov eax, dword [0x40f100]
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 0x4062c2
call edi
mov esi, eax
test esi, esi
je 0x4062ac
mov eax, 1
jmp 0x4062bd
call ebp
mov ebx, eax
test ebx, ebx
je 0x4063cf
mov eax, 2
mov dword [0x40f100], eax
cmp eax, 1
jne 0x406362
test esi, esi
jne 0x4062db
call edi
mov esi, eax
test esi, esi
je 0x4063cf
cmp word [esi], 0
mov eax, esi
je 0x4062f5
add eax, 2
cmp word [eax], 0
jne 0x4062e3
add eax, 2
cmp word [eax], 0
jne 0x4062e3
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 0x406354
push edi
call fcn.00401cd0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x406354
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 0x406346
push ebx
call fcn.004019f0
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 0x4063cf
test ebx, ebx
jne 0x406373
call ebp
mov ebx, eax
test ebx, ebx
je 0x4063cf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40638b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40637b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40637b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00401cd0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4063ad
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 0x406ae0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40ea98
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x406b04
add eax, 8
inc ebp
cmp eax, 0x40eb28
jb 0x406af5
cmp ecx, dword [ebp*8 + 0x40ea98]
jne 0x406cab
mov eax, dword [0x40ef08]
cmp eax, 1
je 0x406c6d
test eax, eax
jne 0x406b30
cmp dword [0x40c470], 1
je 0x406c6d
cmp ecx, 0xfc
je 0x406cab
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x406b6b
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 0x406bb4
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 0x40b4d4
add ebx, ecx
push ebx
call fcn.00408060
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, 0x40b4b4
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 + 0x40ea9c]
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.004092c0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x40f3e0]
test eax, eax
je 0x406c7e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x406c88
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40ea9c]
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 0x407560
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40771e
push 0x3d
push edi
call fcn.004094f0
mov esi, eax
add esp, 8
test esi, esi
je 0x40771e
cmp edi, esi
je 0x40771e
mov dl, byte [esi + 1]
mov ecx, dword [0x40eed4]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x40eed0]
cmp eax, ecx
jne 0x4075b7
push eax
call fcn.004077f0
add esp, 4
mov dword [0x40eed0], eax
test eax, eax
jne 0x407632
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4075de
mov eax, dword [0x40eed8]
test eax, eax
je 0x4075de
call fcn.00404340
test eax, eax
je 0x40762d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x4075ea
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00401cd0
add esp, 4
mov dword [0x40eed0], eax
test eax, eax
je 0x40771e
mov dword [eax], 0
mov eax, dword [0x40eed8]
test eax, eax
jne 0x40762d
push 4
call fcn.00401cd0
add esp, 4
mov dword [0x40eed8], eax
test eax, eax
je 0x40771e
mov dword [eax], 0
mov eax, dword [0x40eed0]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.00407770
mov esi, eax
add esp, 8
test esi, esi
jl 0x40772f
cmp dword [ebx], 0
je 0x40772f
test ebp, ebp
je 0x407727
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.004019f0
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x407689
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 0x407678
lea eax, [esi*4]
push eax
push ebx
call fcn.00409350
add esp, 8
test eax, eax
je 0x4076a3
mov dword [0x40eed0], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x407716
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00401cd0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x407716
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.004019f0
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 0x4076a7
test ebp, ebp
jne 0x407716
test esi, esi
jge 0x407739
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.00409350
add esp, 8
test eax, eax
je 0x40771e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x40eed0], eax
jmp 0x4076a7
Function at 0x4095f0
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.0040a5e0
mov eax, dword [0x40f4e0]
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
xor ebp, ebp
push esi
cmp ebx, eax
push edi
jae 0x409752
mov eax, ebx
mov ecx, ebx
sar eax, 5
and ecx, 0x1f
mov edx, dword [eax*4 + 0x40f3e0]
test byte [edx + ecx*8 + 4], 1
je 0x409752
push 1
push ebp
push ebx
call fcn.004046d0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x40975c
push 2
push ebp
push ebx
call fcn.004046d0
add esp, 0xc
cmp eax, 0xffffffff
je 0x40975c
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x4096f8
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.0040a560
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x40969f
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00403420
add esp, 0xc
cmp eax, 0xffffffff
je 0x4096bb
sub esi, eax
test esi, esi
jle 0x4096d1
jmp 0x409690
cmp dword [0x40eeac], 5
jne 0x4096ce
mov dword [0x40eea8], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.0040a560
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.004046d0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x409739
push 0
push ecx
push ebx
call fcn.004046d0
add esp, 0xc
push ebx
call fcn.004070d0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x409739
mov dword [0x40eea8], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40eeac], eax
push 0
push edi
push ebx
call fcn.004046d0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
mov dword [0x40eea8], 9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x401040
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
push edi
push 0
push 0
push 0x407024
call sub.MFC42.DLL_AfxMessageBox
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
push 2
push edi
call ebx
add esp, 0x10
cmp eax, 1
je 0x401077
pop edi
pop esi
xor eax, eax
pop ebx
ret 8
push esi
push 1
add edi, 4
push 4
push edi
call ebx
add esp, 0x10
dec eax
neg eax
sbb eax, eax
pop edi
pop esi
inc eax
pop ebx
ret 8

Function at 0x401110
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push ebx
push esi
mov esi, dword [esp + 0x14]
push edi
mov edi, ecx
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov ebx, eax
lea eax, [esp + 0xc]
mov ecx, edi
push eax
push esi
call fcn.00401040
test eax, eax
je 0x4011c2
mov ax, word [esp + 0xc]
cmp ax, 0x30
jne 0x401187
push esi
push 1
lea ecx, [esp + 0x20]
push 2
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x4011c2
movsx edx, word [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
pop edi
pop esi
pop ebx
fmul dword [0x40545c]
fstp dword [eax]
mov eax, 1
add esp, 8
ret 8
cmp ax, 0x31
jne 0x4011af
mov ecx, dword [esp + 0x1c]
push esi
push 1
push 4
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
dec eax
neg eax
sbb eax, eax
pop edi
pop esi
inc eax
pop ebx
add esp, 8
ret 8
mov edx, dword [esp + 0x10]
push 0
add edx, ebx
push edx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 8
ret 8
Function at 0x4011d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, ecx
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov ebx, eax
lea eax, [esp + 0x10]
mov ecx, edi
push eax
push esi
call fcn.00401040
test eax, eax
jne 0x401202
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x10
mov eax, dword [esp + 0x10]
and eax, 0xffff
sub eax, 0x10
je 0x4012fd
dec eax
je 0x401235
mov ecx, dword [esp + 0x14]
push 0
add ecx, ebx
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0xc
ret 0x10
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x24]
push 1
push edx
call edi
add esp, 0x10
cmp eax, 1
je 0x40125a
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret 0x10
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
and eax, 0xff
push esi
mov dword [esp + 0x10], eax
push 1
fild dword [esp + 0x14]
lea edx, [esp + 0x24]
push 1
push edx
fmul dword [0x405460]
fstp dword [ecx]
call edi
add esp, 0x10
cmp eax, 1
je 0x401296
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret 0x10
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
and eax, 0xff
push esi
mov dword [esp + 0x24], eax
push 1
fild dword [esp + 0x28]
lea edx, [esp + 0x24]
push 1
push edx
fmul dword [0x405460]
fstp dword [ecx]
call edi
add esp, 0x10
cmp eax, 1
je 0x4012d2
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret 0x10
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
and eax, 0xff
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fmul dword [0x405460]
fstp dword [ecx]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0xc
ret 0x10
mov edx, dword [esp + 0x20]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
push 4
push edx
call edi
add esp, 0x10
cmp eax, 1
je 0x401322
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret 0x10
mov eax, dword [esp + 0x24]
push esi
push 1
push 4
push eax
call edi
add esp, 0x10
cmp eax, 1
je 0x401341
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret 0x10
mov ecx, dword [esp + 0x28]
push esi
push 1
push 4
push ecx
call edi
add esp, 0x10
cmp eax, 1
je 0x4012ef
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret 0x10
Function at 0x401360
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
lea eax, [esp]
push ebx
push ebp
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push edi
mov edi, dword [esp + 0x34]
push edi
push 1
push 2
push eax
call ebx
add esp, 0x10
cmp eax, 1
jne 0x4014d3
mov ecx, dword [esp + 0x10]
and ecx, 0xffff
shl ecx, 2
push ecx
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x14]
mov esi, eax
and edx, 0xffff
mov dword [esp + 0x18], esi
shl edx, 2
push edx
call sub.MFC42.DLL_operatornew
mov ebp, eax
mov eax, dword [esp + 0x18]
and eax, 0xffff
shl eax, 2
push eax
call sub.MFC42.DLL_operatornew
add esp, 0xc
mov edx, eax
test esi, esi
mov dword [esp + 0x18], edx
je 0x4014d3
test ebp, ebp
je 0x4014d3
test edx, edx
je 0x4014d3
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], 0
test ax, ax
jbe 0x401497
mov eax, dword [esp + 0x14]
mov esi, ebp
sub eax, ebp
sub edx, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
push edi
push 1
lea ecx, [esp + 0x3c]
push 4
push ecx
call ebx
add esp, 0x10
cmp eax, 1
jne 0x4014b6
fld dword [esp + 0x34]
mov edx, dword [esp + 0x20]
push edi
push eax
lea eax, [esp + 0x3c]
fstp dword [edx + esi]
push 4
push eax
call ebx
add esp, 0x10
cmp eax, 1
jne 0x4014df
mov ecx, dword [esp + 0x34]
push edi
push eax
lea edx, [esp + 0x3c]
push 4
push edx
mov dword [esi], ecx
call ebx
add esp, 0x10
cmp eax, 1
jne 0x401508
fld dword [esp + 0x34]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
inc ecx
fstp dword [eax + esi]
mov eax, dword [esp + 0x10]
add esi, 4
mov edx, eax
mov dword [esp + 0x1c], ecx
and edx, 0xffff
cmp ecx, edx
jl 0x401411
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
pop edi
and eax, 0xffff
mov dword [ecx + 0x1c], esi
mov dword [ecx + 0x20], ebp
pop esi
pop ebp
mov dword [ecx + 0x24], edx
mov dword [ecx + 0x28], eax
pop ebx
add esp, 0x18
ret 0xc
mov eax, dword [esp + 0x14]
push eax
call sub.MFC42.DLL_operatordelete
push ebp
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x20]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret 0xc
mov edx, dword [esp + 0x14]
push edx
call sub.MFC42.DLL_operatordelete
push ebp
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x20]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
mov ecx, dword [esp + 0x14]
push ecx
call sub.MFC42.DLL_operatordelete
push ebp
call sub.MFC42.DLL_operatordelete
mov edx, dword [esp + 0x20]
push edx
call sub.MFC42.DLL_operatordelete
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
Function at 0x401540
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push edi
mov edi, dword [esp + 0x28]
push edi
push 1
lea eax, [esp + 0x1c]
xor ebp, ebp
push 2
push eax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x28], ebp
call ebx
add esp, 0x10
cmp eax, 1
je 0x40157f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x14]
and eax, 0xffff
lea ecx, [eax + eax*2]
shl ecx, 2
push ecx
call sub.MFC42.DLL_operatornew
mov edx, eax
add esp, 4
cmp edx, ebp
mov dword [esp + 0x28], edx
jne 0x4015ad
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x14]
cmp ax, bp
jbe 0x401688
lea esi, [edx + 8]
push edi
push 1
lea edx, [esp + 0x18]
push 2
push edx
call ebx
add esp, 0x10
cmp eax, 1
je 0x4015d9
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x10]
push edi
push 1
lea ecx, [esp + 0x18]
and eax, 0xffff
push 2
push ecx
mov dword [esi - 8], eax
call ebx
add esp, 0x10
cmp eax, 1
je 0x401601
mov dword [esp + 0x18], 1
mov edx, dword [esp + 0x10]
push edi
push 1
lea eax, [esp + 0x18]
and edx, 0xffff
push 2
push eax
mov dword [esi - 4], edx
call ebx
add esp, 0x10
cmp eax, 1
je 0x40162a
mov dword [esp + 0x18], 1
mov ecx, dword [esp + 0x10]
push edi
push 1
lea edx, [esp + 0x18]
and ecx, 0xffff
push 2
push edx
mov dword [esi], ecx
call ebx
add esp, 0x10
cmp eax, 1
jne 0x40166b
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40166b
mov eax, dword [esp + 0x14]
inc ebp
mov ecx, eax
add esi, 0xc
and ecx, 0xffff
cmp ebp, ecx
jge 0x401684
jmp 0x4015bd
mov edx, dword [esp + 0x28]
push edx
call sub.MFC42.DLL_operatordelete
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
and eax, 0xffff
lea ecx, [eax + eax*2]
mov eax, 0x55555556
mov dword [esi + 0x3c], edx
imul ecx
mov eax, edx
mov dword [esi + 0x40], ecx
shr eax, 0x1f
add edx, eax
shl edx, 2
push edx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esi + 0x4c], eax
mov eax, dword [esp + 0x14]
and eax, 0xffff
pop edi
pop esi
pop ebp
lea eax, [eax + eax*2]
pop ebx
add esp, 0xc
ret 0xc
Function at 0x4016d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x110
mov edx, dword [esp + 0x120]
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x20]
push 0x100
xor ebx, ebx
push eax
push edx
mov dword [esp + 0x24], ebx
call fcn.004010a0
test eax, eax
jne 0x401708
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret 0x10
mov eax, dword [esp + 0x128]
mov edi, dword [esp + 0x124]
xor ebp, ebp
mov edx, dword [eax + 0x400]
test edx, edx
jle 0x401771
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
mov esi, dword [eax]
lea eax, [esp + 0x20]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x401754
test cl, cl
je 0x401750
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x401754
add eax, 2
add esi, 2
test cl, cl
jne 0x401730
xor eax, eax
jmp 0x401759
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4017a4
mov ecx, dword [esp + 0x14]
inc ebp
add ecx, 4
cmp ebp, edx
mov dword [esp + 0x14], ecx
jl 0x401726
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x130]
mov esi, dword [sym.imp.MSVCRT.dll_fread]
mov ebp, 1
push eax
push ebp
lea ecx, [esp + 0x18]
push 2
push ecx
call esi
add esp, 0x10
cmp eax, ebp
je 0x4017cb
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret 0x10
mov edx, dword [esp + 0x128]
lea ecx, [ebp*8]
sub ecx, ebp
lea eax, [edx + ecx*8 + 0x404]
test eax, eax
je 0x40176d
push eax
mov ecx, edi
call fcn.00404540
mov ebx, eax
jmp 0x401771
mov eax, dword [esp + 0x10]
mov dx, ax
add eax, 0xffff
test dx, dx
mov dword [esp + 0x10], eax
jbe 0x40184b
mov eax, dword [esp + 0x130]
lea ecx, [esp + 0x1c]
push eax
push ebp
push 2
push ecx
call esi
add esp, 0x10
cmp eax, ebp
jne 0x401795
cmp ebx, 0xffffffff
je 0x401836
mov edx, dword [esp + 0x1c]
mov eax, dword [edi + 0x4c]
and edx, 0xffff
mov dword [eax + edx*4], ebx
mov edx, dword [edi + 0x40]
mov eax, 0x55555556
mov ecx, dword [edi + 0x50]
imul edx
mov eax, edx
inc ecx
shr eax, 0x1f
add edx, eax
mov dword [edi + 0x50], ecx
cmp ecx, edx
jge 0x401833
mov dword [edi + 8], 0
jmp 0x401836
mov dword [edi + 8], ebp
mov eax, dword [esp + 0x10]
mov cx, ax
add eax, 0xffff
test cx, cx
mov dword [esp + 0x10], eax
ja 0x4017e0
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x110
ret 0x10
Function at 0x401df0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
push edi
mov ebx, ecx
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esp + 0x30]
mov edi, eax
mov eax, dword [esp + 0x34]
add esp, 4
add eax, ecx
cmp edi, eax
mov dword [esp + 0x34], eax
jge 0x401ee4
mov ebp, dword [esp + 0x28]
lea edx, [esp + 0x18]
mov ecx, ebx
push edx
push esi
call fcn.00401040
test eax, eax
je 0x401ee4
mov eax, dword [esp + 0x18]
and eax, 0xffff
cmp eax, 0x4000
jg 0x401e98
je 0x401e7e
cmp eax, 0x100
je 0x401e64
cmp eax, 0x3d3e
jne 0x401e9f
push esi
push 1
lea eax, [esp + 0x18]
push 4
push eax
jmp 0x401e6e
push esi
push 1
lea ecx, [esp + 0x1c]
push 4
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x401ef3
jmp 0x401ecc
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push esi
push edx
push edi
push ebp
push eax
mov ecx, ebx
call fcn.004019f0
test eax, eax
je 0x401ef3
jmp 0x401ecc
cmp eax, 0xafff
je 0x401eb4
mov ecx, dword [esp + 0x1c]
push 0
add ecx, edi
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
jmp 0x401ecc
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push esi
push edx
push edi
push ebp
push eax
mov ecx, ebx
call fcn.00401ad0
test eax, eax
je 0x401ef3
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
mov edi, eax
mov eax, dword [esp + 0x38]
add esp, 4
cmp edi, eax
jl 0x401e23
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret 0x14
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 0x14