joyce8/EMBER2024-capa huggingface dataset:
Function at 0x412c20
Capabilities:
Get common file path
Get file version info

Disassembly:
sub esp, 0x214
lea eax, [esp + 0xc]
push ebx
push ebp
push esi
push edi
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, 0x4220bc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x104
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
mov ebx, dword [esp + 0x22c]
and ecx, 3
lea edx, [esp + 0x20]
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x124]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x4220bc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x120]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x120]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
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
push eax
and ecx, 3
lea eax, [esp + 0x20]
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.004136c0
add esp, 8
cmp eax, 0xffffffff
je 0x412d21
lea ebx, [esp + 0x1c]
jmp 0x412d43
lea ecx, [esp + 0x120]
push 0
push ecx
call fcn.004136c0
add esp, 8
cmp eax, 0xffffffff
je 0x412dfe
lea ebx, [esp + 0x120]
mov ebp, dword [esp + 0x22c]
test ebp, ebp
jne 0x412d69
mov eax, dword [esp + 0x230]
test eax, eax
jne 0x412d69
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x214
ret
lea edx, [esp + 0x18]
push edx
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
test esi, esi
je 0x412dcf
push esi
call fcn.00413940
add esp, 4
mov edi, eax
push edi
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x412db8
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x4220bc
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x412db8
mov eax, dword [esp + 0x10]
mov esi, dword [eax + 8]
mov ebx, dword [eax + 0xc]
jmp 0x412dc0
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
test edi, edi
je 0x412dd7
push edi
call fcn.004138a0
add esp, 4
jmp 0x412dd7
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
test esi, esi
jne 0x412ddf
test ebx, ebx
je 0x412dfe
cmp esi, ebp
jb 0x412dfe
jne 0x412dee
cmp ebx, dword [esp + 0x230]
jb 0x412dfe
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x214
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x214
ret
Function at 0x412e10
Capabilities:
Read .ini file

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x114
mov edx, dword [esp + 0x120]
lea ecx, [esp + 0x10]
push ebx
push ebp
push esi
push edi
push eax
mov eax, dword [esp + 0x130]
push 0x104
push ecx
push str.Default_String
push edx
push eax
xor esi, esi
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x412f43
mov al, byte [esp + 0x20]
cmp al, 0x30
je 0x412f29
test al, al
lea ecx, [esp + 0x20]
je 0x412e71
cmp al, 0x2e
jne 0x412e69
inc esi
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x412e64
cmp esi, 3
jne 0x412f43
lea esi, [esp + 0x20]
cmp dword [0x4237c4], 1
jle 0x412e97
movsx ecx, byte [esi]
push 8
push ecx
call fcn.00415360
add esp, 8
jmp 0x412ea5
movsx edx, byte [esi]
mov eax, dword [str.________________________________H]
mov al, byte [eax + edx*2]
and eax, 8
test eax, eax
je 0x412eac
inc esi
jmp 0x412e7e
xor edi, edi
lea ebx, [esp + 0x10]
mov al, byte [esi]
mov ecx, esi
cmp al, 0x2e
je 0x412ec6
test al, al
je 0x412ec6
mov al, byte [esi + 1]
inc esi
cmp al, 0x2e
jne 0x412eba
mov byte [esi], 0
push ecx
inc esi
call fcn.00412ff0
add esp, 4
test edi, edi
je 0x412edc
cmp edi, 2
jne 0x412ee1
mov ebp, eax
shl ebp, 0x10
cmp edi, 1
je 0x412eeb
cmp edi, 3
jne 0x412eed
mov ebp, eax
mov dword [ebx], ebp
inc edi
add ebx, 4
cmp edi, 3
jbe 0x412eb2
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x134]
add ecx, edx
mov edx, dword [esp + 0x1c]
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x138]
add ecx, edx
mov dword [eax], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x138]
mov dword [ecx], 0
mov dword [edx], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret

Function at 0x4136c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4136e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00416e40
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x413708
test byte [esp + 8], 2
je 0x413708
call fcn.00416ec0
mov dword [eax], 0xd
call fcn.00416ed0
mov dword [eax], 5
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x413ce0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x413d55
push ebx
call fcn.00413e10
add esp, 4
test eax, eax
jne 0x413d23
call fcn.00416ed0
mov dword [eax], 0xf
call fcn.00416ec0
mov dword [eax], 0xd
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x413d65
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x413dff
inc eax
cmp eax, 0x104
ja 0x413dff
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x413db7
cmp eax, ecx
jg 0x413d91
mov eax, ecx
push eax
call fcn.00413940
mov edx, eax
add esp, 4
test edx, edx
jne 0x413dd2
call fcn.00416ec0
mov dword [eax], 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x413dd2
call fcn.00416ec0
mov dword [eax], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret

Function at 0x413e10
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x413e1e
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x413e4d
cmp eax, 1
je 0x413e4d
mov eax, 1
ret
xor eax, eax
ret

Function at 0x414a60
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x414a77
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x414a79
xor eax, eax
test eax, eax
je 0x414a8a
push eax
call fcn.00416e40
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x414ce0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00414da0
mov eax, dword [0x42990c]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x414d04
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x429908], 1
mov byte [0x429904], bl
jne 0x414d5e
mov ecx, dword [0x42c11c]
test ecx, ecx
je 0x414d4c
mov esi, dword [0x42c118]
sub esi, 4
cmp esi, ecx
jb 0x414d4c
mov eax, dword [esi]
test eax, eax
je 0x414d45
call eax
mov ecx, dword [0x42c11c]
sub esi, 4
cmp esi, ecx
jae 0x414d37
push 0x422038
push 0x422030
call fcn.00414dc0
add esp, 8
push 0x422044
push 0x42203c
call fcn.00414dc0
add esp, 8
test ebx, ebx
je 0x414d7d
call fcn.00414db0
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x42990c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x415150
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f398
push 0x413a18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x4298dc], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x4298d8], ecx
shl ecx, 8
add ecx, edx
mov dword [0x4298d4], ecx
shr eax, 0x10
mov dword [0x4298d0], eax
call fcn.00416fb0
test eax, eax
jne 0x4151ba
push 0x1c
call fcn.00415330
add esp, 4
call fcn.00416a70
test eax, eax
jne 0x4151cd
push 0x10
call fcn.00415330
add esp, 4
mov dword [ebp - 4], 0
call fcn.004192d0
call fcn.00417f60
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42c114], eax
call fcn.00419170
mov dword [0x429910], eax
test eax, eax
je 0x415200
mov eax, dword [0x42c114]
test eax, eax
jne 0x41520a
push 0xffffffffffffffff
call fcn.00414ca0
add esp, 4
call fcn.00418ec0
call fcn.00418dd0
call fcn.00414c70
mov esi, dword [0x42c114]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x4152e9
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x415251
test al, al
je 0x415251
and eax, 0xff
push eax
call fcn.00418d70
add esp, 4
test eax, eax
je 0x41522b
inc esi
mov dword [ebp - 0x64], esi
jmp 0x41522b
cmp byte [esi], 0x22
jne 0x41525a
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x41526a
cmp al, 0x20
ja 0x41526a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x41525a
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x41528b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x415290
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00414ca0
jmp 0x4152ce
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x41525a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4152e9
Function at 0x415330
Capabilities:
Terminate process

Disassembly:
cmp dword [0x429918], 1
jne 0x41533e
call fcn.004194e0
mov eax, dword [esp + 4]
push eax
call fcn.00419520
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x416a70
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.00416c90
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x4237e0], eax
je 0x416ac8
push 0x74
push 1
call fcn.0041a0b0
mov esi, eax
add esp, 8
test esi, esi
je 0x416ac8
mov eax, dword [0x4237e0]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x416ac8
push esi
call fcn.00416ad0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

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

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x4237e0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x416b5e
push 0x74
push 1
call fcn.0041a0b0
mov esi, eax
add esp, 8
test esi, esi
je 0x416b54
mov ecx, dword [0x4237e0]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x416b54
push esi
call fcn.00416ad0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.00415300
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x419170
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x429ce8]
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 0x4191b2
call edi
mov esi, eax
test esi, esi
je 0x41919c
mov eax, 1
jmp 0x4191ad
call ebp
mov ebx, eax
test ebx, ebx
je 0x4192bf
mov eax, 2
mov dword [0x429ce8], eax
cmp eax, 1
jne 0x419252
test esi, esi
jne 0x4191cb
call edi
mov esi, eax
test esi, esi
je 0x4192bf
cmp word [esi], 0
mov eax, esi
je 0x4191e5
add eax, 2
cmp word [eax], 0
jne 0x4191d3
add eax, 2
cmp word [eax], 0
jne 0x4191d3
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 0x419244
push edi
call fcn.00413940
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x419244
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 0x419236
push ebx
call fcn.004138a0
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 0x4192bf
test ebx, ebx
jne 0x419263
call ebp
mov ebx, eax
test ebx, ebx
je 0x4192bf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x41927b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41926b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41926b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00413940
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x41929d
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 0x419520
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x425d50
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x419544
add eax, 8
inc ebp
cmp eax, 0x425de0
jb 0x419535
cmp ecx, dword [ebp*8 + 0x425d50]
jne 0x4196eb
mov eax, dword [0x429918]
cmp eax, 1
je 0x4196ad
test eax, eax
jne 0x419570
cmp dword [0x4235b4], 1
je 0x4196ad
cmp ecx, 0xfc
je 0x4196eb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4195ab
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 0x4195f4
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 0x41f7b0
add ebx, ecx
push ebx
call fcn.004145c0
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, 0x41f790
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 + 0x425d54]
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.0041b8e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x42c000]
test eax, eax
je 0x4196be
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x4196c8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x425d54]
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 0x419b50
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x419b7c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x42c000]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x419bb7
push 2
push ebp
push ecx
call fcn.00419a50
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x419d19
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x419c61
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x419c12
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x419bff
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x419be2
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x419d0a
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x419c5d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x419bde
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x419cf9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x419cb5
cmp eax, 5
jne 0x419c9e
call fcn.00416ec0
mov dword [eax], 9
call fcn.00416ed0
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00416e40
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x419cd5
cmp byte [ebp], 0x1a
jne 0x419cd5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.00416ec0
mov dword [eax], 0x1c
call fcn.00416ed0
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x419c5d
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x419d4a
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x419c61
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x419c61
Function at 0x41be20
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.00414de0
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.00419a50
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x41bf60
push 2
push ebp
push ebx
call fcn.00419a50
add esp, 0xc
cmp eax, 0xffffffff
je 0x41bf60
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x41bf01
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.0041c1e0
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x41bea6
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00419b50
add esp, 0xc
cmp eax, 0xffffffff
je 0x41bec2
sub esi, eax
test esi, esi
jle 0x41beda
jmp 0x41be97
call fcn.00416ed0
cmp dword [eax], 5
jne 0x41bed7
call fcn.00416ec0
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.0041c1e0
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.00419a50
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x41bf47
push 0
push ecx
push ebx
call fcn.00419a50
add esp, 0xc
push ebx
call fcn.0041b3b0
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 0x41bf47
call fcn.00416ec0
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00416ed0
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.00419a50
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