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

Disassembly:
mov eax, dword [0x531988]
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 0x49af42
call edi
mov esi, eax
test esi, esi
je 0x49af2c
mov eax, 1
jmp 0x49af3d
call ebp
mov ebx, eax
test ebx, ebx
je 0x49b04f
mov eax, 2
mov dword [0x531988], eax
cmp eax, 1
jne 0x49afe2
test esi, esi
jne 0x49af5b
call edi
mov esi, eax
test esi, esi
je 0x49b04f
cmp word [esi], 0
mov eax, esi
je 0x49af75
add eax, 2
cmp word [eax], 0
jne 0x49af63
add eax, 2
cmp word [eax], 0
jne 0x49af63
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 0x49afd4
push edi
call fcn.00492900
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x49afd4
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 0x49afc6
push ebx
call fcn.00492890
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 0x49b04f
test ebx, ebx
jne 0x49aff3
call ebp
mov ebx, eax
test ebx, ebx
je 0x49b04f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x49b00b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x49affb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x49affb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00492900
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x49b02d
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 0x49b5b0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x4b63c0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x49b5d4
add eax, 8
inc ebp
cmp eax, 0x4b6450
jb 0x49b5c5
cmp ecx, dword [ebp*8 + 0x4b63c0]
jne 0x49b77b
mov eax, dword [0x5317d0]
cmp eax, 1
je 0x49b73d
test eax, eax
jne 0x49b600
cmp dword [0x4b3944], 1
je 0x49b73d
cmp ecx, 0xfc
je 0x49b77b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x49b63b
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 0x49b684
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 0x4a64c4
add ebx, ecx
push ebx
call fcn.00493730
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, 0x4a64a4
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 + 0x4b63c4]
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.0049f9a0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x531d60]
test eax, eax
je 0x49b74e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x49b758
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x4b63c4]
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 0x4a0540
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.004945a0
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.00498890
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x4a0680
push 2
push ebp
push ebx
call fcn.00498890
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a0680
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x4a0621
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.004a16f0
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x4a05c6
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00498ec0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a05e2
sub esi, eax
test esi, esi
jle 0x4a05fa
jmp 0x4a05b7
call fcn.00494710
cmp dword [eax], 5
jne 0x4a05f7
call fcn.00494700
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.004a16f0
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.00498890
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x4a0667
push 0
push ecx
push ebx
call fcn.00498890
add esp, 0xc
push ebx
call fcn.0049ba50
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 0x4a0667
call fcn.00494700
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00494710
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.00498890
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x4a15b0
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x531d24]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x4a15f8
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4a15dc
mov eax, 1
jmp 0x4a15f3
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x4a16d8
mov eax, 2
mov dword [0x531d24], eax
cmp eax, 2
jne 0x4a1618
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 1
jne 0x4a16ea
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x4a1633
mov ecx, dword [0x531860]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov edi, eax
test edi, edi
jne 0x4a1652
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.00492900
mov esi, eax
add esp, 4
test esi, esi
jne 0x4a1669
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4a16cf
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x4a16b0
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x220
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x4a16cf
push esi
call fcn.00492890
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push 0xffffffffffffffff
push esi
push 0x220
push edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x4a16df
push esi
call fcn.00492890
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.00492890
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4a1c40
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4a1dfe
push 0x3d
push edi
call fcn.004a1f40
mov esi, eax
add esp, 8
test esi, esi
je 0x4a1dfe
cmp edi, esi
je 0x4a1dfe
mov dl, byte [esi + 1]
mov ecx, dword [0x5317a8]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x5317a4]
cmp eax, ecx
jne 0x4a1c97
push eax
call fcn.004a1ed0
add esp, 4
mov dword [0x5317a4], eax
test eax, eax
jne 0x4a1d12
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a1cbe
mov eax, dword [0x5317ac]
test eax, eax
je 0x4a1cbe
call fcn.004a18f0
test eax, eax
je 0x4a1d0d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x4a1cca
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00492900
add esp, 4
mov dword [0x5317a4], eax
test eax, eax
je 0x4a1dfe
mov dword [eax], 0
mov eax, dword [0x5317ac]
test eax, eax
jne 0x4a1d0d
push 4
call fcn.00492900
add esp, 4
mov dword [0x5317ac], eax
test eax, eax
je 0x4a1dfe
mov dword [eax], 0
mov eax, dword [0x5317a4]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.004a1e50
mov esi, eax
add esp, 8
test esi, esi
jl 0x4a1e0f
cmp dword [ebx], 0
je 0x4a1e0f
test ebp, ebp
je 0x4a1e07
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00492890
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x4a1d69
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 0x4a1d58
lea eax, [esi*4]
push eax
push ebx
call fcn.0049a500
add esp, 8
test eax, eax
je 0x4a1d83
mov dword [0x5317a4], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a1df6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00492900
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4a1df6
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.00492890
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 0x4a1d87
test ebp, ebp
jne 0x4a1df6
test esi, esi
jge 0x4a1e19
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.0049a500
add esp, 8
test eax, eax
je 0x4a1dfe
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x5317a4], eax
jmp 0x4a1d87
Function at 0x42f830
Capabilities:
Terminate process

Disassembly:
push 0xc
push 0x437358
call fcn.00430078
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov edi, ebx
mov edx, 0x43cc88
mov ecx, esi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x42f658
cmp eax, esi
jne 0x42f64b
xor esi, esi
inc esi
mov edi, esi
jmp 0x42f65b
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x42f62f
xor esi, esi
inc esi
cmp dword [0x43cc8c], esi
jne 0x42f66d
push 0x1f
call fcn.005c0000
pop ecx
jmp 0x42f6a7
cmp dword [0x43cc8c], ebx
jne 0x42f6a1
mov dword [0x43cc8c], esi
push 0x401f64
push 0x401f58
call fcn.0042f78c
pop ecx
pop ecx
test eax, eax
je 0x42f6a7
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x42f77c
mov dword [0x438880], esi
cmp dword [0x43cc8c], esi
jne 0x42f6ca
push 0x401f54
push 0x401f0c
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x43cc8c], 2
test edi, edi
jne 0x42f6d7
xor eax, eax
mov ecx, 0x43cc88
xchg dword [ecx], eax
cmp dword [0x43cc98], 0
je 0x42f703
push 0x43cc98
call fcn.0042fed0
pop ecx
test eax, eax
je 0x42f703
push ebx
push 2
push ebx
mov esi, dword [0x43cc98]
mov ecx, esi
call dword [0x43d41c]
call esi
push dword [0x43888c]
push dword [0x438888]
push dword [0x438884]
call fcn.00422476
add esp, 0xc
mov dword [0x43887c], eax
cmp dword [0x438894], 0
jne 0x42f761
push eax
call dword [sym.imp.msvcrt.dll_exit]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
push ecx
push eax
call sub.msvcrt.dll__XcptFilter
pop ecx
pop ecx
ret
cmp dword [0x438880], 0
jne 0x42f775
call dword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x43887c]
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
call fcn.0042ffc5
jmp 0x42f613

Function at 0x42fdc4
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x437398
call fcn.00430078
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x42fe24
cmp eax, 0xffffffff
je 0x42fe24
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x42fe1d
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x42fe1d
cmp edx, 0x10000000
jae 0x42fe1d
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x42fe1a
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x42fe80
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x42febe
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x42feb6
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x42fec0
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x42fea6
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x401430
Capabilities:
Execute command

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4055cd
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ecx
mov edx, str.netsh_advfirewall_firewall_show_rule_name_
lea ecx, [ebp - 0x48]
call fcn.00403740
add esp, 4
mov edi, eax
mov dword [ebp - 4], 0
mov edx, dword [edi + 0x14]
mov eax, edx
mov ecx, dword [edi + 0x10]
sub eax, ecx
cmp eax, 0xb
jb 0x4014ab
lea eax, [ecx + 0xb]
mov dword [edi + 0x10], eax
mov eax, edi
cmp edx, 0xf
jbe 0x401492
mov eax, dword [edi]
push 0xb
lea esi, [eax + ecx]
push str.___nul_2_1
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 0xb], 0
jmp 0x4014c4
push 0xb
push str.___nul_2_1
mov byte [ebp - 0x30], 0
mov ecx, edi
push dword [ebp - 0x30]
push 0xb
call fcn.00403cb0
mov edi, eax
mov dword [ebp - 0x18], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 0
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x18], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
mov ecx, dword [ebp - 0x34]
cmp ecx, 0xf
jbe 0x401531
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401527
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401527
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004046ea
add esp, 8
cmp dword [ebp - 0x14], 0xf
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov ecx, dword [ebp - 0x14]
add esp, 4
test eax, eax
sete al
mov byte [ebp - 0x29], al
cmp ecx, 0xf
jbe 0x401587
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40157a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40157a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004046ea
mov al, byte [ebp - 0x29]
add esp, 8
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.004046ac
mov esp, ebp
pop ebp
ret
Function at 0x402790
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 0x4027bc
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 0x4027e4
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x4027ea
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 0x402852
jg 0x402801
test esi, esi
je 0x402852
test ecx, ecx
jl 0x40284d
jg 0x40280b
test eax, eax
je 0x40284d
cmp edi, ecx
jg 0x40281f
jl 0x402815
cmp esi, eax
jae 0x40281f
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 0x402855
mov ecx, dword [ebp + 8]
jmp 0x40285f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x402879
jg 0x40285f
test esi, esi
je 0x402879
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x402879
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 0x402890
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x4028bc
jl 0x4028b0
test ecx, ecx
jne 0x4028bc
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x4028d5
push eax
push ecx
push esi
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 esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x402923
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x402929
mov edi, dword [ebp - 4]
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 - 4], 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
mov esi, dword [ebp - 4]
jmp 0x402929
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x402996
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x402952
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 - 0xc]
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 0x402984
nop
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 0x402996
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x402960
test edi, edi
je 0x402996
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 0x402d10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x402d40
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004046ac
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x402d7c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x402d7c
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.004046ac
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x402e53
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x402da4
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 0x402db0
movsx eax, bl
jmp 0x402de8
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 0x402e12
sub eax, 1
je 0x402e12
sub eax, 2
jne 0x402e53
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
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004046ac
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x402e30
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 0x402e53
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.004046ac
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.004046ac
mov esp, ebp
pop ebp
ret 4