joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46ecfb
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x464]
test eax, eax
je 0x46ed13
cmp eax, 0x10000
jne 0x46ed37
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x45c]
push eax
push 0x10000
push 1
push ecx
call fcn.004519e8
add esp, 0x10
mov dword [esi + 0x464], 0
mov ecx, dword [esi + 0x464]
mov edx, dword [esi + 0x45c]
mov al, byte [ecx + edx]
inc ecx
mov dword [esi + 0x464], ecx
pop esi
pop ebp
ret 4

Function at 0x46ed88
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov dl, byte [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x460]
mov eax, dword [esi + 0x458]
mov byte [eax + ecx], dl
inc dword [esi + 0x460]
cmp dword [esi + 0x460], 0x10000
jne 0x46edd7
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x458]
push eax
push 0x10000
push 1
push ecx
call fcn.00450f9a
add esp, 0x10
mov dword [esi + 0x460], 0
pop esi
pop ebp
ret 8

Function at 0x46ef65
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [0x4a7540], eax
mov edx, 1
mov eax, 0x4a7540
push edi
mov ecx, dword [eax]
mov edi, ecx
shr edi, 0x1e
xor edi, ecx
imul edi, edi, 0x6c078965
add edi, edx
mov dword [eax + 4], edi
add eax, 4
inc edx
cmp eax, 0x4a7efc
jl 0x46ef7b
mov dword [0x49205c], 1
mov dword [0x4a7f10], 1
pop edi
pop ebp
ret

Function at 0x47f0be
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x34]
push edi
push 0x488154
push eax
mov dword [ebp - 4], fcn.00414a46
call fcn.004516a6
mov edi, eax
add esp, 8
mov dword [ebp - 8], edi
test edi, edi
jne 0x47f112
push eax
push 0xdeadbeef
push 0x1f
push esi
call fcn.0047efaf
mov bl, al
lea eax, [ebp - 8]
push eax
call fcn.0046e52c
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [ebp + 8], 1
jmp fcn.0047f11e

Function at 0x47f135
Capabilities:
Write file on windows

Disassembly:
daa
dec eax
add byte [ebp - 0x74ab8b40], al
inc ebp
or byte [ebp + 0x572174c0], al
Function at 0x40143f
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
push esp
pop ebp
sub esp, 0x828
push ebx
push esi
push edi
sub eax, eax
mov word [ebp - reloc.kernel32.dll_QueueUserAPC], ax
push 0x400
xor edi, edi
lea eax, [ebp - 0x828]
push eax
push edi
pop ebx
push edi
pop esi
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x828]
push edi
push 0x8000000
push 3
push edi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
pop edi
cmp edi, 0xffffffff
je 0x4014e0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
pop ebx
mov ecx, ebx
mov dword [ebp - 0x14], eax
jmp loc.004834e4
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push ecx
mov ecx, esi
call fcn.00401271
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00401213
mov edi, dword [ebp - 0xc]
push reloc.kernel32.dll_SetEvent
mov eax, dword [edi + 0x3c]
add eax, edi
mov dword [ebp - 0x18], eax
mov eax, dword [eax + 0x50]
mov dword [ebp - 0x1c], eax
add eax, 0x18
push 0x3000
add eax, ebx
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push eax
pop ebx
mov dword [ebp - 8], ebx
or ebx, ebx
je 0x401650
push reloc.kernel32.dll_SetEvent
push edi
pop edx
push ebx
pop ecx
call fcn.00401730
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebx + 0x3c]
movzx eax, word [esi + 0x14]
add ecx, ebx
push eax
mov edx, esi
mov dword [ebp - 4], ecx
call fcn.00401730
movzx ecx, word [esi + 0x14]
mov edx, dword [ebp - 4]
movzx edi, word [esi + 6]
lea eax, [esi + 0x18]
add ecx, eax
movzx eax, word [edx + 0x14]
lea esi, [edx + 0x18]
add esi, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], edi
test edi, edi
je 0x4015b9
push ecx
pop ebx
sub ebx, esi
push 0x28
lea edx, [ebx + esi]
mov ecx, esi
jmp loc.0048329a
mov eax, dword [ebp - 4]
add eax, 0x18
push eax
mov edx, ebx
mov ecx, ebx
call fcn.0040167e
add ebx, dword [ebp - 0x1c]
push 0x40203c
push ebx
pop edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402048
push eax
mov dword [edi], eax
call esi
mov dword [edi + 0xc], eax
push 0x402058
push dword [edi]
call esi
mov dword [edi + 8], eax
push 0x402068
push dword [edi]
call esi
mov esi, dword [ebp - 0x10]
mov dword [edi + 4], eax
lea eax, [ebx + 0x18]
sub eax, edi
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x14]
push eax
mov edx, esi
lea ecx, [ebx + 0x18]
mov dword [edi + 0x14], eax
call fcn.00401730
mov ecx, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, dword [ecx + 0x78]
push edi
mov ecx, dword [eax + edi + 0x10]
mov eax, dword [eax + edi + 0x1c]
shl ecx, 2
sub eax, ecx
mov eax, dword [eax + edi + 4]
add eax, edi
call eax
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edi, dword [ebp - 0xc]
push edi
pop ecx
call fcn.00401790
mov ecx, esi
call fcn.00401790
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret
Function at 0x4022ec
Capabilities:
Read .ini file

Disassembly:
sub esp, 8
mov dword [esp + 4], ecx
push ebx
test byte [0x43203c], 1
push esi
push edi
push ebp
jne 0x402320
push 0xa
mov ecx, 0x432010
or byte [0x43203c], 1
call fcn.00419562
push 0x4023cf
call fcn.0040ee11
add esp, 4
mov ecx, 0x432010
mov esi, 0x64
mov edi, 1
call fcn.004195d5
mov ebp, dword [esp + 0x1c]
push esi
call fcn.0040ed53
add esp, 4
mov ebx, eax
mov eax, dword [esp + 0x14]
push dword [eax + 0x84]
push esi
push ebx
push section..data
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [esp + 0x10], eax
cmp esi, 0xbb8
jg 0x402386
lea eax, [esi - 1]
cmp eax, dword [esp + 0x10]
jle 0x402376
xor edi, edi
jmp 0x40237f
push ebx
call fcn.0040ec5b
add esp, 4
add esi, 0x64
test edi, edi
jne 0x402338
mov edi, ebx
cmp byte [ebx], 0
je 0x4023b7
mov eax, edi
sub eax, ebx
cmp eax, dword [esp + 0x10]
jge 0x4023b7
push 0
push edi
call fcn.0040ed64
add esp, 8
lea esi, [eax + 1]
mov ecx, 0x432010
push edi
mov edi, esi
call fcn.004196d1
cmp byte [esi], 0
jne 0x40238d
push ebx
call fcn.0040ec5b
add esp, 4
mov eax, 0x432010
pop ebp
pop edi
pop esi
pop ebx
add esp, 8
ret 4
Function at 0x40db90
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
xor ecx, ecx
xor edx, edx
push ebx
mov dword [esp + 8], 0x18
push esi
push edi
push ebp
xor edi, edi
xor esi, esi
mov dword [esp + 0x10], 7
mov ebx, 0x432650
mov ebp, dword [ebx]
mov eax, edi
xor eax, ecx
add ebx, 4
and eax, dword [esp + 0x24]
add ebx, 4
xor ebp, eax
add ebx, 4
xor ebp, ecx
shl ebp, 2
mov dword [esp + 0x18], ebp
mov ebp, dword [ebx - 8]
xor ebp, eax
xor eax, eax
xor ebp, edi
shl ebp, 2
mov dword [esp + 0x1c], ebp
mov ebp, dword [ebx - 4]
mov al, byte [esp + 0x18]
xor esi, dword [eax + 0x4326e0]
xor edx, dword [eax + 0x4327e0]
xor eax, eax
mov al, byte [esp + 0x19]
xor esi, dword [eax + 0x4328e0]
xor edx, dword [eax + 0x4329e0]
xor eax, eax
mov al, byte [esp + 0x1a]
xor esi, dword [eax + 0x432ae0]
xor edx, dword [eax + 0x432be0]
xor eax, eax
mov al, byte [esp + 0x1b]
xor esi, dword [eax + 0x432ce0]
xor edx, dword [eax + 0x432de0]
xor eax, eax
mov al, byte [esp + 0x1c]
xor esi, dword [eax + 0x432ee0]
xor edx, dword [eax + 0x432fe0]
xor eax, eax
mov al, byte [esp + 0x1d]
xor esi, dword [eax + 0x4330e0]
xor edx, dword [eax + 0x4331e0]
xor eax, eax
mov al, byte [esp + 0x1e]
xor esi, dword [eax + 0x4332e0]
xor edx, dword [eax + 0x4333e0]
xor eax, eax
mov al, byte [esp + 0x1f]
xor esi, dword [eax + 0x4334e0]
xor edx, dword [eax + 0x4335e0]
mov eax, edx
xor eax, esi
and eax, dword [esp + 0x24]
xor ebp, eax
xor ebp, edx
shl ebp, 2
mov dword [esp + 0x18], ebp
mov ebp, dword [ebx]
xor ebp, eax
xor ebp, esi
shl ebp, 2
mov dword [esp + 0x1c], ebp
add ebx, 4
xor eax, eax
mov al, byte [esp + 0x18]
xor edi, dword [eax + 0x4326e0]
xor ecx, dword [eax + 0x4327e0]
xor eax, eax
mov al, byte [esp + 0x19]
xor edi, dword [eax + 0x4328e0]
xor ecx, dword [eax + 0x4329e0]
xor eax, eax
mov al, byte [esp + 0x1a]
xor edi, dword [eax + 0x432ae0]
xor ecx, dword [eax + 0x432be0]
xor eax, eax
mov al, byte [esp + 0x1b]
xor edi, dword [eax + 0x432ce0]
xor ecx, dword [eax + 0x432de0]
xor eax, eax
mov al, byte [esp + 0x1c]
xor edi, dword [eax + 0x432ee0]
xor ecx, dword [eax + 0x432fe0]
xor eax, eax
mov al, byte [esp + 0x1d]
xor edi, dword [eax + 0x4330e0]
xor ecx, dword [eax + 0x4331e0]
xor eax, eax
mov al, byte [esp + 0x1e]
xor edi, dword [eax + 0x4332e0]
xor ecx, dword [eax + 0x4333e0]
xor eax, eax
mov al, byte [esp + 0x1f]
xor edi, dword [eax + 0x4334e0]
xor ecx, dword [eax + 0x4335e0]
mov eax, dword [esp + 0x10]
dec dword [esp + 0x10]
test eax, eax
jne 0x40dbb4
xor edx, ecx
xor esi, edi
xor ecx, edx
xor edi, esi
xor edx, ecx
xor esi, edi
mov eax, dword [esp + 0x14]
dec dword [esp + 0x14]
test eax, eax
jne 0x40dba7
pop ebp
mov dword [0x432640], edx
mov dword [0x432644], esi
mov dword [0x432648], ecx
mov dword [0x43264c], edi
pop edi
pop esi
pop ebx
add esp, 0x10
ret
Function at 0x40ee59
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x40eebe
lea eax, [ebp - 0x10c]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40eebe
mov byte [ebp - 4], 0x3d
movzx eax, byte [ebp - 0x10c]
push eax
call fcn.004133a0
add esp, 4
lea ecx, [ebp - 4]
mov byte [ebp - 2], 0x3a
mov byte [ebp - 1], 0
mov byte [ebp - 3], al
lea eax, [ebp - 0x10c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
mov eax, 0
jne 0x40eed2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041237a
add esp, 4
mov eax, 0xffffffff
mov esp, ebp
pop ebp
ret

Function at 0x40eed6
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
lea eax, [ebp - 0x104]
xor esi, esi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40ef14
cmp byte [ebp - 0x103], 0x3a
jne 0x40ef14
movzx eax, byte [ebp - 0x104]
push eax
call fcn.0040ef9e
add esp, 4
lea esi, [eax - 0x40]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40ef1b
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
mov ebx, dword [ebp + 8]
cmp ebx, 1
jl 0x40ef7e
cmp ebx, 0x1f
jg 0x40ef7e
push 0xc
add bl, 0x40
call fcn.0041320f
add esp, 4
mov byte [ebp - 4], bl
mov byte [ebp - 3], 0x3a
mov byte [ebp - 2], 0
lea ebx, [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x40ef63
push 0xc
call fcn.00413277
add esp, 4
xor eax, eax
jmp 0x40ef99
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041237a
add esp, 4
push 0xc
call fcn.00413277
add esp, 4
jmp 0x40ef94
call fcn.004123ed
mov dword [eax], 0xd
call fcn.004123f6
mov dword [eax], 0xf
mov eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40fc66
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x40fccf
push ebx
call fcn.0040fd5d
add esp, 4
test eax, eax
jne 0x40fca1
call fcn.004123f6
mov dword [eax], 0xf
call fcn.004123ed
mov dword [eax], 0xd
jmp 0x40fd54
add bl, 0x40
lea eax, [ebp - 8]
push eax
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x10c]
lea ebx, [ebp - 4]
mov byte [ebp - 3], 0x3a
mov byte [ebp - 2], 0x2e
mov byte [ebp - 1], 0
push ecx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x40fce1
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40fd54
inc eax
cmp eax, 0x104
ja 0x40fd54
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x40fd19
mov ecx, dword [ebp + 0x10]
cmp eax, ecx
jg 0x40fcfd
mov eax, ecx
push eax
call fcn.00411ced
add esp, 4
mov edx, eax
test edx, edx
jne 0x40fd2b
call fcn.004123ed
mov dword [eax], 0xc
jmp 0x40fd54
cmp eax, dword [ebp + 0x10]
jle 0x40fd2b
call fcn.004123ed
mov dword [eax], 0x22
jmp 0x40fd54
lea edi, [ebp - 0x10c]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, edx
jmp 0x40fd56
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40fd6f
Capabilities:
Create directory

Disassembly:
push 0
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
mov eax, 0
jne 0x40fd8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40fd9e
push eax
call fcn.0041237a
add esp, 4
mov eax, 0xffffffff
jmp 0x40fda0
xor eax, eax
ret

Function at 0x40fda1
Capabilities:
Delete directory

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
mov eax, 0
jne 0x40fdba
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40fdce
push eax
call fcn.0041237a
add esp, 4
mov eax, 0xffffffff
jmp 0x40fdd0
xor eax, eax
ret
Function at 0x4113c6
Capabilities:
Accept command line arguments
Query environment variable
Terminate process

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43c890
push 0x416950
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x441634], eax
mov al, ah
and eax, 0xff
mov dword [0x441640], eax
mov eax, dword [0x441634]
shr dword [0x441634], 0x10
and eax, 0xff
mov dword [0x44163c], eax
shl eax, 8
add eax, dword [0x441640]
mov dword [0x441638], eax
call fcn.004163b6
call fcn.0041312a
test eax, eax
jne 0x41143f
push 0x10
call fcn.0041153f
add esp, 4
mov dword [ebp - 4], 0
call fcn.00415e37
call fcn.00412350
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x435c4c], eax
call fcn.004166e5
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov dword [0x440b74], eax
call fcn.0041661a
call fcn.0041328d
mov esi, dword [0x435c4c]
mov al, byte [esi]
cmp al, 0x22
je 0x41148d
cmp al, 0x20
jbe 0x4114b9
inc esi
cmp byte [esi], 0x20
ja 0x411485
jmp 0x4114b9
inc esi
cmp byte [esi], 0x22
je 0x4114b8
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x4114b3
movzx eax, bl
push eax
call fcn.004165d7
add esp, 4
test eax, eax
je 0x4114ad
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x411496
cmp byte [esi], 0x22
jne 0x4114b9
inc esi
cmp byte [esi], 0
je 0x4114c9
cmp byte [esi], 0x20
ja 0x4114c9
inc esi
cmp byte [esi], 0
jne 0x4114be
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x4114e9
movzx eax, word [ebp - 0x40]
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.004132bd
jmp 0x411525
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
push esi
call fcn.004131ee
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x441124], eax
cmp eax, 0xffffffff
je 0x413187
push 0x70
push 1
call fcn.00412752
add esp, 8
mov esi, eax
test esi, esi
je 0x413187
push esi
mov eax, dword [0x441124]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x413187
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov eax, 1
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], 0x442300
mov dword [esi + 0x14], 1
jmp 0x413189
xor eax, eax
pop esi
ret
Function at 0x41318b
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
mov eax, dword [0x441124]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4131ea
push 0x70
push 1
call fcn.00412752
add esp, 8
mov esi, eax
test esi, esi
je 0x4131e0
push esi
mov eax, dword [0x441124]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4131e0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x14], 1
mov dword [esi + 0x50], 0x442300
jmp 0x4131ea
push 0x10
call fcn.0041153f
add esp, 4
mov eax, esi
pop esi
ret

Function at 0x4132df
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
call fcn.0041336a
mov dword [0x44166c], 1
cmp dword [esp + 0x10], 0
mov ebx, dword [esp + 0x14]
mov byte [0x441668], bl
jne 0x413340
cmp dword [0x435c48], 0
je 0x41332e
mov esi, dword [0x435c40]
sub esi, 4
cmp esi, dword [0x435c48]
jb 0x41332e
mov eax, dword [esi]
test eax, eax
je 0x413323
call eax
sub esi, 4
cmp esi, dword [0x435c48]
jae 0x41331b
push 0x44288c
push 0x442884
call fcn.00413380
add esp, 8
push 0x442894
push 0x442890
call fcn.00413380
add esp, 8
test ebx, ebx
je 0x41335d
call fcn.00413375
jmp 0x413367
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebx
ret
Function at 0x4159e4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 8], esi
cmp dword [ebp + 0x10], esi
jne 0x415a01
xor eax, eax
jmp 0x415b51
mov eax, dword [ebp + 8]
test byte [eax + 0x441778], 0x20
je 0x415a1a
push 2
push 0
push eax
call fcn.00415de5
add esp, 0xc
mov eax, dword [ebp + 8]
test byte [eax + 0x441778], 0x80
je 0x415aa4
mov dword [ebp - 0xc], 0
mov edi, dword [ebp + 0xc]
mov eax, edi
sub eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x415adc
lea ebx, [ebp - 0x410]
mov eax, edi
sub eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x415a6e
mov al, byte [edi]
inc edi
cmp al, 0xa
jne 0x415a5a
inc esi
mov byte [ebx], 0xd
inc ebx
lea ecx, [ebp - 0x410]
mov byte [ebx], al
inc ebx
mov eax, ebx
sub eax, ecx
cmp eax, 0x400
jl 0x415a44
lea eax, [ebp - 0x410]
push 0
sub ebx, eax
lea ecx, [ebp - 0x410]
lea eax, [ebp - 4]
push eax
push ebx
push ecx
mov eax, dword [ebp + 8]
push dword [eax*4 + 0x441878]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415ad3
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
cmp eax, ebx
jge 0x415a30
jmp 0x415adc
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax*4 + 0x441878]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415ad3
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
jmp 0x415adc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], 0
jne 0x415b4c
cmp dword [ebp - 0xc], 0
je 0x415b17
cmp dword [ebp - 0xc], 5
jne 0x415b05
call fcn.004123ed
mov dword [eax], 9
call fcn.004123f6
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
jmp 0x415b10
push dword [ebp - 0xc]
call fcn.0041237a
add esp, 4
mov eax, 0xffffffff
jmp 0x415b51
mov eax, dword [ebp + 8]
test byte [eax + 0x441778], 0x40
je 0x415b2f
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x415b2f
xor eax, eax
jmp 0x415b51
call fcn.004123ed
mov dword [eax], 0x1c
call fcn.004123f6
mov dword [eax], 0
mov eax, 0xffffffff
jmp 0x415b51
mov eax, dword [ebp - 8]
sub eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x416a19
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 4
xor ecx, ecx
mov eax, 0x442578
push edi
cmp dword [eax], edx
je 0x416a37
add eax, 8
inc ecx
cmp eax, 0x4425f0
jb 0x416a28
cmp dword [ecx*8 + 0x442578], edx
lea eax, [ecx*8]
jne 0x416a70
mov edx, dword [eax + 0x44257c]
push 0
lea eax, [esp + 8]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, dword [0x441880]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
add esp, 4
ret

Function at 0x418365
Capabilities:
Clear file content

Disassembly:
push ebp
mov eax, 0x100c
mov ebp, esp
call fcn.0041103c
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 0
push 1
push 0
push esi
call fcn.00415de5
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x418482
push 2
push 0
push esi
call fcn.00415de5
add esp, 0xc
cmp eax, 0xffffffff
je 0x418482
mov ecx, dword [ebp + 0xc]
mov ebx, ecx
sub ebx, eax
test ebx, ebx
jle 0x41842a
lea edi, [ebp - 0x100c]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.00417b4c
add esp, 8
mov dword [ebp - 0xc], eax
mov eax, 0x1000
cmp ebx, eax
jge 0x4183e4
mov eax, ebx
push eax
lea ecx, [ebp - 0x100c]
push ecx
push esi
call fcn.004159e4
add esp, 0xc
mov edi, eax
cmp edi, 0xffffffff
je 0x418404
sub ebx, edi
test ebx, ebx
jg 0x4183d9
jmp 0x41841c
call fcn.004123f6
cmp dword [eax], 5
jne 0x418419
call fcn.004123ed
mov dword [eax], 0xd
mov dword [ebp - 4], edi
push dword [ebp - 0xc]
push esi
call fcn.00417b4c
add esp, 8
jmp 0x41846f
jge 0x41846f
push 0
push ecx
push esi
call fcn.00415de5
add esp, 0xc
push esi
call fcn.00417d02
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ecx, ecx
mov dword [ebp - 4], ecx
cmp ecx, 0xffffffff
jne 0x41846f
call fcn.004123ed
mov dword [eax], 0xd
call fcn.004123f6
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push esi
call fcn.00415de5
add esp, 0xc
mov eax, dword [ebp - 4]
jmp 0x418487
mov eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret