joyce8/EMBER2024-capa huggingface dataset:
Function at 0x432ae4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax - 4]
mov ebx, dword [eax + 0x118]
mov eax, dword [ebp - 4]
cmp dword [eax], 0
je 0x432c6a
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x150]
mov eax, dword [ebx + 0x10]
call fcn.004123a4
cmp byte [ebp + 8], 0
je 0x432b3d
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 0xc]
mov eax, dword [ebx + 0x10]
call fcn.00412274
jmp 0x432b4b
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [ebx + 0x10]
call fcn.00412274
mov eax, dword [ebx + 0x10]
call fcn.0041239c
dec eax
jle 0x432b91
xor eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x10]
call fcn.0041226c
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
push 0
push 0
lea eax, [ebp - 0x24]
push eax
mov edi, dword [ebx + 0x10]
mov eax, edi
call fcn.0041239c
push eax
push 0x12200
call sub.gdi32.dll_ExtCreatePen
mov edx, eax
mov eax, edi
call fcn.00412334
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
mov edi, dword [eax - 8]
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x28]
call dword [ebx + 0x24]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 0x14]
mov edx, dword [edx + esi*4]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
shr ecx, 1
add edx, ecx
add eax, edx
mov dword [ebp - 0xc], eax
mov eax, esi
xor eax, 1
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 0x14]
mov edx, dword [edx + eax*4]
mov dword [ebp - 0x14], edx
add eax, 2
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 0x14]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x18], eax
lea eax, [esi + 2]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 0x14]
mov eax, dword [edx + eax*4]
mov edx, dword [ebp - 4]
add eax, dword [edx]
mov dword [ebp - 0x10], eax
xor ebx, ebx
lea eax, [esi + ebx]
mov edx, dword [ebp - 0xc]
mov dword [edi + eax*4], edx
mov eax, esi
xor eax, 1
mov edx, eax
add edx, ebx
mov ecx, dword [ebp - 0x14]
mov dword [edi + edx*4], ecx
add ebx, 2
lea edx, [esi + ebx]
mov ecx, dword [ebp - 0xc]
mov dword [edi + edx*4], ecx
add eax, ebx
mov edx, dword [ebp - 0x18]
mov dword [edi + eax*4], edx
add ebx, 2
inc dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ecx + 0x28]
call dword [ecx + 0x24]
mov edx, dword [ebp - 4]
add eax, dword [edx]
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
jle 0x432bf3
shr ebx, 2
push ebx
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax - 0xc]
push eax
push edi
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x118]
call fcn.00412ab4
push eax
call sub.gdi32.dll_PolyPolyline
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x10005b60
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x14
mov dword [ebp - 0x14], edx
mov esi, dword [sym.imp.user32.dll_GetDlgItem]
mov dword [esp + 4], 0x1fb
mov dword [esp], eax
call esi
sub esp, 8
mov edi, eax
mov dword [esp], ebx
mov dword [esp + 4], 0x1fa
call esi
sub esp, 8
mov dword [ebp - 0x10], eax
mov dword [esp], ebx
mov dword [esp + 4], 0x1fc
call esi
mov edx, dword [ebp - 0x14]
sub esp, 8
mov esi, eax
and dword [edx + 4], 0xfffffff7
mov dword [esp], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1fa
call dword [sym.imp.user32.dll_CheckDlgButton]
mov eax, dword [ebp - 0x10]
mov ebx, dword [sym.imp.user32.dll_EnableWindow]
sub esp, 0xc
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
mov edx, dword [sym.imp.user32.dll_ShowWindow]
sub esp, 8
mov dword [ebp - 0x10], edx
mov dword [esp], edi
mov dword [esp + 4], 0
call edx
sub esp, 8
mov dword [esp], edi
mov dword [esp + 4], 0
call ebx
mov edx, dword [ebp - 0x10]
sub esp, 8
mov dword [esp], esi
mov dword [esp + 4], 0
call edx
sub esp, 8
mov dword [esp], esi
mov dword [esp + 4], 0
call ebx
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402970
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402995
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x4029a0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402995
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test esi, esi
je 0x4029e8
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x4029de
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4029ea
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x4029d0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x401f90
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
lea eax, [esp]
mov dword [esp], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x401fb6
xor eax, eax
add esp, 0x94
ret
mov eax, dword [esp + 0x10]
dec eax
je 0x401fc9
dec eax
je 0x401fad
xor eax, eax
add esp, 0x94
ret
mov ecx, dword [esp + 8]
xor eax, eax
cmp ecx, 0xa
sete al
add esp, 0x94
ret

Function at 0x40765a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x415c70
cmp edx, dword [eax]
je 0x40767c
add eax, 8
inc ecx
cmp eax, 0x415d00
jl 0x40766d
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x415c70]
jne 0x4077aa
mov eax, dword [0x419278]
cmp eax, 1
je 0x407784
test eax, eax
jne 0x4076ad
cmp dword [0x413754], 1
je 0x407784
cmp edx, 0xfc
je 0x4077aa
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4076e4
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004080d0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00405170
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x407727
lea eax, [ebp - 0x1a4]
push eax
call fcn.00405170
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x410420
push edi
call fcn.00408a70
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004080d0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004080e0
lea eax, [ebp - 0xa0]
push 0x410400
push eax
call fcn.004080e0
push dword [esi + 0x415c74]
lea eax, [ebp - 0xa0]
push eax
call fcn.004080e0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00408ea2
add esp, 0x2c
pop edi
jmp 0x4077aa
lea eax, [ebp + 8]
lea esi, [esi + 0x415c74]
push 0
push eax
push dword [esi]
call fcn.00405170
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x402960
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c490
push 0x403b98
push dword fs:[0]
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x2000000
call fcn.00407730
pop ecx
mov dword [0xbb08cc], eax
call fcn.00403db0
test al, al
je 0x402a5c
mov dword [ebp - 4], 0
call fcn.00403fd0
call fcn.00404140
call fcn.00404230
call fcn.00404560
call fcn.00404600
mov esi, 0x40dd70
jmp 0x4029cf
call dword [esi]
add esi, 4
cmp esi, 0x40dd70
jb 0x4029ca
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
call fcn.004046c0
movzx edx, word [ebp - 0x34]
mov ecx, 0xa
test dword [ebp - 0x38], 1
cmovne ecx, edx
push ecx
push eax
push 0
push esi
call fcn.00401fe0
mov esi, eax
mov edi, 0x40dd70
jmp 0x402a22
call dword [edi]
add edi, 4
cmp edi, 0x40dd70
jb 0x402a1d
push esi
call fcn.00402710
or dword [ebp - 4], 0xffffffff
jmp 0x402a64
push 0xfffffffffffffffe
call fcn.00404770
pop ecx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
lea esp, [ebp - 0x70]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404560
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
cmp byte [esi], 0
jne 0x404593
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea esi, [ebp - 0x10c]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push 0
push 0
push esi
call fcn.004043c0
add esp, 0x14
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 8]
lea eax, [eax + edi*4]
push eax
call fcn.004053f0
pop ecx
mov ebx, eax
test ebx, ebx
je 0x4045e5
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebx + edi*4]
push eax
push ebx
push esi
call fcn.004043c0
add esp, 0x14
mov eax, dword [ebp - 4]
dec eax
mov dword [0xbb0b0c], eax
mov dword [0xbb0b10], ebx
jmp 0x4045ed
push 0xfffffffffffffffc
call fcn.00404770
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404600
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
test eax, eax
cmove eax, dword [0x40edfc]
mov dword [ebp - 4], eax
mov esi, eax
xor eax, eax
cmp byte [esi], 0
je 0x40463f
or edx, 0xffffffff
inc edx
cmp byte [esi + edx], 0
jne 0x404627
lea edi, [edx + 1]
cmp byte [esi], 0x3d
je 0x404638
add eax, edi
add esi, edi
cmp byte [esi], 0
jne 0x404624
inc eax
push eax
call fcn.004053f0
pop ecx
mov edx, eax
mov dword [0xbb0b14], edx
cmp dword [0xbb0b14], 0
je 0x4046a3
mov eax, dword [ebp - 4]
mov esi, eax
cmp byte [esi], 0
je 0x40468a
or eax, 0xffffffff
inc eax
cmp byte [esi + eax], 0
jne 0x404665
lea edi, [eax + 1]
cmp byte [esi], 0x3d
je 0x404683
xor ecx, ecx
mov al, byte [esi + ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x404676
add edx, edi
add esi, edi
cmp byte [esi], 0
jne 0x404662
mov byte [edx], 0
mov eax, dword [ebp - 4]
cmp eax, dword [0x40edfc]
je 0x4046ab
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x4046ab
push 0xfffffffffffffffc
call fcn.00404770
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404870
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
push ebx
push esi
push edi
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
lea esi, [edx + eax]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0x10]
mov edi, eax
cmp edi, esi
jae 0x404941
lea eax, [ebp - 0x810]
cmp byte [edi], 0xa
jne 0x4048b9
inc dword [ebp - 0xc]
mov byte [eax], 0xd
inc eax
inc eax
inc edi
mov dl, byte [edi - 1]
mov byte [eax - 1], dl
lea edx, [ebp - 0x11]
cmp eax, edx
jae 0x4048cc
cmp edi, esi
jb 0x4048ad
lea edx, [ebp - 0x810]
mov ebx, eax
sub ebx, edx
push dword [ebp + 0xc]
call fcn.00405670
pop ecx
test eax, eax
je 0x404900
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push ebx
lea edx, [ebp - 0x810]
push edx
push dword [0xbb0bd0]
push eax
call fcn.00407eb0
add esp, 0x10
push dword [ebp + 0xc]
call fcn.00405610
pop ecx
push 0
lea edx, [ebp - 4]
push edx
push ebx
lea edx, [ebp - 0x810]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404938
mov eax, dword [ebp - 4]
add dword [ebp - 0x10], eax
cmp dword [ebp - 4], ebx
jb 0x404941
inc edi
cmp edi, esi
jb 0x4048a7
jmp 0x404941
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
mov dword [eax], ecx
mov dword [eax + 4], ebx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 8]
mov dword [eax + 8], edx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404970
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x814
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
add edx, eax
mov dword [ebp - 0x814], edx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0x10]
mov esi, eax
cmp esi, dword [ebp - 0x814]
jae 0x404a74
lea eax, [ebp - 0x810]
cmp word [esi], 0xa
jne 0x4049cb
add dword [ebp - 0xc], 2
mov word [eax], 0xd
add eax, 2
add eax, 2
add esi, 2
mov dx, word [esi - 2]
mov word [eax - 2], dx
lea edx, [ebp - 0x12]
cmp eax, edx
jae 0x4049e8
cmp esi, dword [ebp - 0x814]
jb 0x4049b9
lea edx, [ebp - 0x810]
mov edi, eax
sub edi, edx
push ebx
call fcn.00405670
pop ecx
test eax, eax
je 0x404a40
push ebx
call fcn.00405610
pop ecx
push 0
lea edx, [ebp - 4]
push edx
mov edx, edi
shr edx, 1
push edx
lea edx, [ebp - 0x810]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x404a6b
shl dword [ebp - 4], 1
mov eax, dword [ebp - 4]
add dword [ebp - 0x10], eax
cmp dword [ebp - 4], edi
jb 0x404a74
add esi, 2
cmp esi, dword [ebp - 0x814]
jb 0x4049b3
jmp 0x404a74
push ebx
call fcn.00405610
pop ecx
push 0
lea edx, [ebp - 4]
push edx
push edi
lea edx, [ebp - 0x810]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404a24
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x404a74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
mov dword [eax], ecx
mov dword [eax + 4], ebx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 8]
mov dword [eax + 8], edx
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404aa0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc10
push ebx
push esi
push edi
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
add edx, eax
mov dword [ebp - 0xc0c], edx
mov eax, dword [ebp + 0x10]
mov ebx, eax
mov dword [ebp - 0xc08], 0
cmp ebx, dword [ebp - 0xc0c]
jae 0x404b52
lea eax, [ebp - 0x404]
cmp word [ebx], 0xa
jne 0x404ae9
mov word [eax], 0xd
add eax, 2
add eax, 2
add ebx, 2
mov dx, word [ebx - 2]
mov word [eax - 2], dx
lea edx, [ebp - 6]
cmp eax, edx
jae 0x404b06
cmp ebx, dword [ebp - 0xc0c]
jb 0x404adb
push 0
push 0
push 0x800
lea edx, [ebp - 0xc04]
push edx
lea edx, [ebp - 0x404]
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x404]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x404b5e
lea esi, [ebp + eax - 0xc04]
lea eax, [ebp - 0xc04]
cmp esi, eax
jbe 0x404bb7
lea edi, [ebp - 0xc04]
jmp 0x404b90
mov dword [ebp - 0xc10], 0
jmp 0x404b6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc10], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xc08]
mov dword [eax], edx
mov eax, dword [ebp + 8]
mov dword [eax + 4], 0
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xc10]
mov dword [eax + 8], edx
mov eax, dword [ebp + 8]
jmp 0x404bfa
push dword [ebp + 0xc]
call fcn.00405610
pop ecx
push 0
lea edx, [ebp - 4]
push edx
mov edx, esi
sub edx, edi
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404bd6
add edi, dword [ebp - 4]
cmp edi, esi
jb 0x404b90
mov eax, ebx
sub eax, dword [ebp + 0x10]
mov dword [ebp - 0xc08], eax
add ebx, 2
cmp ebx, dword [ebp - 0xc0c]
jb 0x404ad5
jmp 0x404b52
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0xc08]
mov dword [edx], ecx
mov edx, dword [ebp + 8]
mov dword [edx + 4], 0
mov edx, dword [ebp + 8]
mov dword [edx + 8], eax
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a760
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
add edx, eax
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 0xc]
mov edi, eax
mov ebx, edi
cmp ebx, dword [ebp - 0xc]
jae 0x40a88e
cmp byte [ebx], 0x1a
je 0x40a843
cmp byte [ebx], 0xd
jne 0x40a7af
lea eax, [ebx + 1]
cmp eax, dword [ebp - 0xc]
jae 0x40a7bc
cmp byte [ebx + 1], 0xa
jne 0x40a7af
mov byte [edi], 0xa
inc edi
add ebx, 2
jmp 0x40a885
inc edi
inc ebx
mov al, byte [ebx - 1]
mov byte [edi - 1], al
jmp 0x40a885
inc ebx
push esi
call fcn.00405610
pop ecx
push 0
lea edx, [ebp - 8]
push edx
push 1
lea edx, [ebp - 1]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a8aa
cmp dword [ebp - 8], 0
je 0x40a8aa
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
test byte [eax + edx], 0x48
je 0x40a833
cmp byte [ebp - 1], 0xa
je 0x40a83e
mov byte [edi], 0xd
inc edi
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
mov cl, byte [ebp - 1]
mov byte [eax + edx + 2], cl
jmp 0x40a885
inc edi
jmp 0x40a885
cmp byte [ebp - 1], 0xa
jne 0x40a895
cmp edi, dword [ebp + 0xc]
jne 0x40a895
mov byte [edi], 0xa
jmp 0x40a830
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
test byte [eax + edx], 0x40
jne 0x40a87d
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
or byte [eax + edx], 2
jmp 0x40a88e
inc edi
mov al, byte [ebx]
mov byte [edi - 1], al
jmp 0x40a88e
cmp ebx, dword [ebp - 0xc]
jb 0x40a787
mov eax, edi
sub eax, dword [ebp + 0xc]
jmp 0x40a8af
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
call fcn.00407f50
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40a885
mov byte [edi], 0xd
jmp 0x40a830
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a8c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
add edx, eax
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 0xc]
mov edi, eax
mov ebx, edi
cmp ebx, dword [ebp - 0xc]
jae 0x40aa2e
cmp word [ebx], 0x1a
je 0x40a9df
cmp word [ebx], 0xd
jne 0x40a916
lea eax, [ebx + 2]
cmp eax, dword [ebp - 0xc]
jae 0x40a929
cmp word [ebx + 2], 0xa
jne 0x40a916
mov word [edi], 0xa
add edi, 2
add ebx, 4
jmp 0x40aa25
add edi, 2
add ebx, 2
mov ax, word [ebx - 2]
mov word [edi - 2], ax
jmp 0x40aa25
add ebx, 2
push esi
call fcn.00405610
pop ecx
push 0
lea edx, [ebp - 8]
push edx
push 2
lea edx, [ebp - 2]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40aa4e
cmp dword [ebp - 8], 0
je 0x40aa4e
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
test byte [eax + edx], 0x48
je 0x40a9cc
cmp word [ebp - 2], 0xa
je 0x40a9d8
mov word [edi], 0xd
add edi, 2
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
movzx ecx, word [ebp - 2]
mov byte [eax + edx + 2], cl
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
movzx ecx, word [ebp - 2]
sar ecx, 8
mov byte [eax + edx + 3], cl
jmp 0x40aa25
add edi, 2
jmp 0x40aa25
cmp word [ebp - 2], 0xa
jne 0x40aa35
cmp edi, dword [ebp + 0xc]
jne 0x40aa35
mov word [edi], 0xa
jmp 0x40a9c7
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
test byte [eax + edx], 0x40
jne 0x40aa19
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
or byte [eax + edx], 2
jmp 0x40aa2e
add edi, 2
mov ax, word [ebx]
mov word [edi - 2], ax
jmp 0x40aa2e
cmp ebx, dword [ebp - 0xc]
jb 0x40a8e7
mov eax, edi
sub eax, dword [ebp + 0xc]
jmp 0x40aa58
push 1
push 0xffffffffffffffff
push 0xfffffffe
push esi
call fcn.00407f50
add esp, 0x10
cmp word [ebp - 2], 0xa
je 0x40aa25
mov word [edi], 0xd
jmp 0x40a9c7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ac60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov eax, esi
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, esi
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
test byte [eax + edx], 0x48
je 0x40acaf
push ebx
push edi
push esi
call fcn.0040aae0
add esp, 0xc
mov dword [ebp - 0xc], eax
add edi, eax
sub ebx, eax
push esi
call fcn.00405610
pop ecx
push 0
lea edx, [ebp - 4]
push edx
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40acd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x40acda
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b170
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
cmp eax, dword [0xbb0908]
jae 0x40b267
mov eax, dword [ebp + 8]
shr eax, 6
mov eax, dword [eax*4 + 0xbb090c]
mov edx, dword [ebp + 8]
and edx, 0x3f
lea edx, [edx + edx*2]
shl edx, 2
test byte [eax + edx], 1
je 0x40b267
push 1
push 0
push 0
push dword [ebp + 8]
call fcn.00407f50
add esp, 0x10
mov esi, eax
mov edi, edx
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
cmp edx, 0xffffffff
jne 0x40b1d4
cmp eax, 0xffffffff
je 0x40b279
push 2
push 0
push 0
push dword [ebp + 8]
call fcn.00407f50
add esp, 0x10
cmp edx, 0xffffffff
jne 0x40b1f3
cmp eax, 0xffffffff
je 0x40b279
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
sub esi, eax
sbb edi, edx
test edi, edi
jg 0x40b281
jl 0x40b20b
test esi, esi
ja 0x40b281
test edi, edi
jg 0x40b313
jl 0x40b21d
test esi, esi
jae 0x40b313
push 0
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
push edx
push eax
push dword [ebp + 8]
call fcn.00407f50
add esp, 0x10
cmp edx, 0xffffffff
jne 0x40b240
cmp eax, 0xffffffff
je 0x40b30e
push dword [ebp + 8]
call fcn.00405610
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x40b313
mov dword [0xbb0900], 0xd
jmp 0x40b30e
mov dword [0xbb0900], 9
or eax, 0xffffffff
jmp 0x40b32c
or eax, 0xffffffff
jmp 0x40b32c
push 0x1000
push 1
call fcn.00409310
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x40b30e
push 0x8000
push dword [ebp + 8]
call fcn.0040b3f0
add esp, 8
mov dword [ebp - 0xc], eax
test edi, edi
jl 0x40b2c0
jg 0x40b2b7
cmp esi, 0x1000
jb 0x40b2c0
mov eax, 0x1000
xor edx, edx
jmp 0x40b2c4
mov eax, esi
mov edx, edi
push eax
push ebx
push dword [ebp + 8]
call fcn.00404c70
add esp, 0xc
cmp eax, 0xffffffff
je 0x40b2f4
cdq
neg eax
adc edx, 0
neg edx
add eax, esi
adc edx, edi
mov esi, eax
mov edi, edx
test edx, edx
jg 0x40b2a9
jl 0x40b2f0
test eax, eax
ja 0x40b2a9
xor esi, esi
jmp 0x40b2f7
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0040b3f0
add esp, 8
push ebx
call fcn.00402e80
pop ecx
jmp 0x40b315
or esi, 0xffffffff
jmp 0x40b315
xor esi, esi
push 0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
push edx
push eax
push dword [ebp + 8]
call fcn.00407f50
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret