joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4891f0
Capabilities:
Get disk size

Disassembly:
sub esp, 0x114
push ebx
push ebp
mov ebp, dword [esp + 0x128]
push esi
push ebp
call fcn.00488650
add esp, 4
test eax, eax
je 0x489219
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret
mov eax, dword [0x84a7c8]
push 0x401be
push 0x60
call dword [eax + 0x108]
mov esi, eax
add esp, 8
test esi, esi
je 0x489354
push edi
mov edi, dword [esp + 0x128]
mov dword [esi + 0x14], 0x488c70
mov dword [esi + 0x18], 0x489360
mov dword [esi + 0x28], 0x488c90
mov dword [esi + 0x2c], 0x488de0
mov dword [esi + 0x30], 0x488e00
mov dword [esi + 0x34], 0x488f80
mov dword [esi + 0x38], 0x4890b0
mov dword [esi + 0x3c], fcn.004890f0
mov dword [esi + 0x40], 0x4891e0
mov dword [esi + 0x44], 0x4895b0
mov dword [esi + 0x48], 0x489380
mov dword [esi + 0x4c], 0x4893a0
mov ecx, dword [0x84a7c8]
push 0x401be
push 0x60
push edi
call dword [ecx + 0x114]
add esp, 0xc
mov dword [esi + 0x5c], eax
test edi, edi
jle 0x4892bf
add eax, 0x38
mov ecx, edi
mov dword [eax], esi
add eax, 0x60
dec ecx
jne 0x4892b7
mov ebx, dword [esp + 0x12c]
push ebx
push ebp
push edi
push esi
call fcn.00489400
add esp, 0x10
cmp eax, 1
mov eax, dword [0x84a7c8]
pop edi
je 0x489303
mov edx, dword [esi + 0x5c]
push edx
call dword [eax + 0x10c]
mov ecx, dword [0x84a7c8]
push esi
call dword [ecx + 0x10c]
add esp, 8
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
lea edx, [esp + 0x1c]
push ebx
push edx
call dword [eax + 0xcc]
mov edx, dword [0x84a7c8]
lea ecx, [esp + 0x24]
push 0x80d938
push ecx
call dword [edx + 0xd4]
add esp, 0x10
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
lea edx, [esp + 0xc]
push eax
push ecx
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.kernel32.dll_GetDiskFreeSpaceA]
mov ecx, dword [esp + 0xc]
neg eax
sbb eax, eax
and eax, ecx
mov dword [esi + 0x58], eax
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
Function at 0x498e30
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x498e3b
xor eax, eax
ret
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x498f3e
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0x53bb48]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x53bb48]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x53bb48]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x53bb48]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x53bb48]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x53bb48]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x53bb48]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x53bb48]
xor eax, edx
inc ecx
dec edi
jne 0x498e56
pop edi
test esi, esi
je 0x498f60
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x53bb48]
xor eax, edx
inc ecx
dec esi
jne 0x498f42
pop esi
pop ebx
not eax
ret
Function at 0x4c2de7
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 0x542174
push 0x80000002
call dword [sym.imp.advapi32.dll_RegOpenKeyA]
test eax, eax
jne 0x4c2e3e
push esi
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.advapi32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x4c2e3e
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 8]
jne 0x4c2e3e
xor eax, eax
inc eax
jmp 0x4c2e40
xor eax, eax
leave
ret 0x10

Function at 0x4c3012
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x98
push ebx
push esi
xor esi, esi
cmp dword [ebp + 0x78], esi
push edi
mov edi, ecx
jne 0x4c3033
mov eax, 0x8876086c
jmp 0x4c3126
cmp dword [ebp + 0x7c], esi
je 0x4c30b5
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], 0x94
call dword [sym.imp.kernel32.dll_GetVersionExA]
cmp dword [ebp - 0x18], 2
je 0x4c3095
mov ebx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push dword [ebp + 0x78]
push esi
push 0xfde9
call ebx
mov dword [ebp + 0x6c], eax
add eax, 3
and eax, 0xfffffffc
call fcn.00517850
mov dword [ebp + 0x7c], esp
push esi
push esi
push dword [ebp + 0x6c]
push dword [ebp + 0x7c]
push 0xffffffffffffffff
push dword [ebp + 0x78]
push esi
push 0xfde9
call ebx
mov eax, dword [ebp + 0x7c]
mov dword [ebp + 0x78], eax
mov dword [ebp + 0x7c], esi
cmp dword [ebp + 0x7c], esi
je 0x4c30b5
push esi
push 0x10000000
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 0x78]
call dword [sym.imp.kernel32.dll_CreateFileW]
jmp 0x4c30ce
push esi
push 0x10000000
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 0x78]
call dword [sym.imp.kernel32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [edi], eax
je 0x4c3114
push esi
push esi
push esi
push 2
push esi
push eax
call dword [sym.imp.kernel32.dll_CreateFileMappingA]
cmp eax, 0xffffffff
mov dword [edi + 4], eax
je 0x4c3114
push esi
push dword [edi]
call dword [sym.imp.kernel32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [edi + 0xc], eax
je 0x4c3114
cmp eax, esi
je 0x4c3121
push esi
push esi
push esi
push 4
push dword [edi + 4]
call dword [sym.imp.kernel32.dll_MapViewOfFile]
cmp eax, esi
mov dword [edi + 8], eax
jne 0x4c3124
call dword [sym.imp.kernel32.dll_GetLastError]
mov eax, 0x88760b59
jmp 0x4c3126
mov dword [edi + 8], esi
xor eax, eax
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret 8
Function at 0x517605
Capabilities:
Terminate process

Disassembly:
push 8
push 0x547850
call fcn.0051b988
push 8
call fcn.0051c558
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x84e420], esi
jne 0x517639
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.kernel32.dll_TerminateProcess]
mov dword [0x84e41c], esi
mov al, byte [ebp + 0x10]
mov byte [0x84e418], al
cmp dword [ebp + 0xc], edi
jne 0x517683
cmp dword [0x851530], edi
je 0x517673
mov eax, dword [0x85152c]
sub eax, 4
mov dword [0x85152c], eax
cmp eax, dword [0x851530]
jb 0x517673
mov eax, dword [eax]
cmp eax, edi
je 0x517654
call eax
jmp 0x517654
push 0x555348
mov eax, 0x555340
call fcn.00517583
pop ecx
push 0x555354
mov eax, 0x55534c
call fcn.00517583
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x5176b4
cmp dword [ebp + 0x10], edi
jne 0x5176c2
mov dword [0x84e420], esi
push dword [ebp + 8]
call fcn.00517541
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x5176c1
push 8
call fcn.0051c4a3
pop ecx
ret
call fcn.0051b9c3
ret
Function at 0x51880a
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x547910
call fcn.0051b988
mov edi, 0x94
mov eax, edi
call fcn.00517850
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.kernel32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x84e3e0], ecx
mov eax, dword [esi + 4]
mov dword [0x84e3ec], eax
mov edx, dword [esi + 8]
mov dword [0x84e3f0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x84e3e4], esi
cmp ecx, 2
je 0x51886a
or esi, 0x8000
mov dword [0x84e3e4], esi
shl eax, 8
add eax, edx
mov dword [0x84e3e8], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.kernel32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x5188a5
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x5188a5
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x5188bd
cmp eax, 0x20b
je 0x5188aa
mov dword [ebp - 0x1c], esi
jmp 0x5188d1
cmp dword [ecx + 0x84], 0xe
jbe 0x5188a5
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x5188cb
cmp dword [ecx + 0x74], 0xe
jbe 0x5188a5
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0051c3b4
pop ecx
test eax, eax
jne 0x5188e5
push 0x1c
call fcn.005187e6
pop ecx
call fcn.0051adfe
test eax, eax
jne 0x5188f6
push 0x10
call fcn.005187e6
pop ecx
call fcn.0051d720
mov dword [ebp - 4], esi
call fcn.0051e5b3
test eax, eax
jge 0x51890f
push 0x1b
call fcn.005187c1
pop ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x851524], eax
call fcn.005207ae
mov dword [0x84e428], eax
call fcn.0052070c
test eax, eax
jge 0x518935
push 8
call fcn.005187c1
pop ecx
call fcn.005204d9
test eax, eax
jge 0x518946
push 9
call fcn.005187c1
pop ecx
push 1
call fcn.0051759b
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x51895c
push eax
call fcn.005187c1
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
call fcn.0052047c
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x51897d
movzx eax, word [ebp - 0x40]
jmp 0x518980
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040e580
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x51899e
push edi
call fcn.005176c8
call fcn.005176ea
jmp 0x5189d0
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0051b9c3
ret
Function at 0x51d7a8
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x51d7d6
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x51d7dd
cmp ebx, dword [eax + 4]
jae 0x51d7dd
xor eax, eax
jmp 0x51d9cd
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x51d7ee
xor eax, eax
inc eax
jmp 0x51d9cc
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x51d804
cmp ecx, edx
jae 0x51d949
cmp dword [eax + 4], 0
je 0x51d80d
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x51d7f5
cmp dword [ebp + 8], 0
je 0x51d82f
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x51d949
cmp eax, esi
jae 0x51d949
mov eax, dword [0x84e5c0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x51d854
cmp dword [esi*4 + 0x84e5c8], edi
je 0x51d94d
inc esi
cmp esi, eax
jl 0x51d842
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.kernel32.dll_VirtualQuery]
test eax, eax
je 0x51d9c9
cmp dword [ebp - 8], 0x1000000
jne 0x51d9c9
test byte [ebp - 0xc], 0xcc
je 0x51d8d2
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x51d9c9
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x51d9c9
cmp word [eax + 0x18], 0x10b
jne 0x51d9c9
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x51d9c9
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x51d8d2
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x51d8d2
test byte [ecx + 0x27], 0x80
jne 0x51d949
push 1
push 0x84e608
call dword [sym.imp.kernel32.dll_InterlockedExchange]
test eax, eax
jne 0x51d7e6
mov ecx, dword [0x84e5c0]
test ecx, ecx
mov edx, ecx
jle 0x51d906
lea eax, [ecx*4 + 0x84e5c4]
cmp dword [eax], edi
je 0x51d906
dec edx
sub eax, 4
test edx, edx
jg 0x51d8fa
test edx, edx
jne 0x51d937
push 0xf
pop ebx
cmp ecx, ebx
jg 0x51d913
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x51d92b
lea eax, [edx*4 + 0x84e5c8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x51d919
cmp ecx, 0x10
jge 0x51d937
inc ecx
mov dword [0x84e5c0], ecx
push 0
push 0x84e608
call dword [sym.imp.kernel32.dll_InterlockedExchange]
jmp 0x51d7e6
xor eax, eax
jmp 0x51d9cc
test esi, esi
jle 0x51d7e6
mov ebx, dword [sym.imp.kernel32.dll_InterlockedExchange]
push 1
push 0x84e608
call ebx
test eax, eax
jne 0x51d7e6
cmp dword [esi*4 + 0x84e5c8], edi
je 0x51d9a3
mov eax, dword [0x84e5c0]
lea esi, [eax - 1]
test esi, esi
jl 0x51d991
cmp dword [esi*4 + 0x84e5c8], edi
je 0x51d98d
dec esi
jns 0x51d981
test esi, esi
jge 0x51d9a1
cmp eax, 0x10
jge 0x51d99c
inc eax
mov dword [0x84e5c0], eax
lea esi, [eax - 1]
jmp 0x51d9a3
je 0x51d9bb
xor ecx, ecx
test esi, esi
jl 0x51d9bb
lea eax, [ecx*4 + 0x84e5c8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x51d9a9
push 0
push 0x84e608
call ebx
jmp 0x51d7e6
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x51e2a8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x51e47c
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x8503e0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x51e47c
test cl, 0x48
je 0x51e313
cmp byte [eax + 5], 0xa
je 0x51e313
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x51e365
call dword [sym.imp.kernel32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x51e34d
call fcn.0051e52e
mov dword [eax], 9
call fcn.0051e537
mov dword [eax], esi
jmp 0x51e35d
cmp eax, 0x6d
je 0x51e47c
push eax
call fcn.0051e540
pop ecx
or eax, 0xffffffff
jmp 0x51e47e
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x51e477
test eax, eax
je 0x51e38c
cmp byte [ebx], 0xa
jne 0x51e38c
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x51e395
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x51e471
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x51e461
cmp al, 0xd
je 0x51e3c7
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x51e453
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x51e3e1
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x51e3dc
add dword [ebp + 0x10], 2
jmp 0x51e435
mov dword [ebp + 0x10], eax
jmp 0x51e44f
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x51e409
call dword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x51e44f
cmp dword [ebp - 0xc], 0
je 0x51e44f
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x51e42a
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x51e435
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x51e452
cmp ebx, dword [ebp + 0xc]
jne 0x51e43a
cmp byte [ebp - 1], 0xa
jne 0x51e43a
mov byte [ebx], 0xa
jmp 0x51e452
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0051e7b1
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x51e453
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x51e3ab
jmp 0x51e471
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x51e471
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x51e47e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x51e5b3
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x48
push ebx
mov ebx, 0x480
push ebx
call fcn.00516d2a
test eax, eax
pop ecx
jne 0x51e5cf
or eax, 0xffffffff
jmp 0x51e7ac
mov dword [0x8503e0], eax
mov dword [0x8503dc], 0x20
lea ecx, [eax + 0x480]
jmp 0x51e604
or dword [eax], 0xffffffff
and dword [eax + 8], 0
mov byte [eax + 4], 0
mov byte [eax + 5], 0xa
mov ecx, dword [0x8503e0]
add eax, 0x24
add ecx, 0x480
cmp eax, ecx
jb 0x51e5e6
push ebp
push esi
push edi
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
cmp word [esp + 0x46], 0
je 0x51e70b
mov eax, dword [esp + 0x48]
test eax, eax
je 0x51e70b
mov edi, dword [eax]
lea ebp, [eax + 4]
lea eax, [edi + ebp]
mov dword [esp + 0x10], eax
mov eax, 0x800
cmp edi, eax
jl 0x51e645
mov edi, eax
cmp dword [0x8503dc], edi
jge 0x51e69b
mov esi, 0x8503e4
push ebx
call fcn.00516d2a
test eax, eax
pop ecx
je 0x51e695
add dword [0x8503dc], 0x20
mov dword [esi], eax
lea ecx, [eax + 0x480]
jmp 0x51e684
or dword [eax], 0xffffffff
and dword [eax + 8], 0
mov byte [eax + 4], 0
mov byte [eax + 5], 0xa
mov ecx, dword [esi]
add eax, 0x24
add ecx, ebx
cmp eax, ecx
jb 0x51e66e
add esi, 4
cmp dword [0x8503dc], edi
jl 0x51e652
jmp 0x51e69b
mov edi, dword [0x8503dc]
xor ebx, ebx
test edi, edi
jle 0x51e70b
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x51e700
mov cl, byte [ebp]
test cl, 1
je 0x51e700
test cl, 8
jne 0x51e6c4
push eax
call dword [sym.imp.kernel32.dll_GetFileType]
test eax, eax
je 0x51e700
mov ecx, ebx
mov eax, ebx
and eax, 0x1f
lea eax, [eax + eax*8]
sar ecx, 5
mov ecx, dword [ecx*4 + 0x8503e0]
lea esi, [ecx + eax*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [esi], eax
mov al, byte [ebp]
mov byte [esi + 4], al
lea eax, [esi + 0xc]
push 0xfa0
push eax
call fcn.0052594d
test eax, eax
pop ecx
pop ecx
je 0x51e72b
inc dword [esi + 8]
add dword [esp + 0x10], 4
inc ebx
inc ebp
cmp ebx, edi
jl 0x51e6a1
xor ebx, ebx
mov ecx, dword [0x8503e0]
lea eax, [ebx + ebx*8]
lea esi, [ecx + eax*4]
cmp dword [esi], 0xffffffff
jne 0x51e78d
test ebx, ebx
mov byte [esi + 4], 0x81
jne 0x51e730
push 0xfffffffffffffff6
pop eax
jmp 0x51e73a
or eax, 0xffffffff
jmp 0x51e7a9
mov eax, ebx
dec eax
neg eax
sbb eax, eax
add eax, 0xfffffff5
push eax
call dword [sym.imp.kernel32.dll_GetStdHandle]
mov edi, eax
cmp edi, 0xffffffff
je 0x51e787
push edi
call dword [sym.imp.kernel32.dll_GetFileType]
test eax, eax
je 0x51e787
and eax, 0xff
cmp eax, 2
mov dword [esi], edi
jne 0x51e765
or byte [esi + 4], 0x40
jmp 0x51e76e
cmp eax, 3
jne 0x51e76e
or byte [esi + 4], 8
lea eax, [esi + 0xc]
push 0xfa0
push eax
call fcn.0052594d
test eax, eax
pop ecx
pop ecx
je 0x51e72b
inc dword [esi + 8]
jmp 0x51e791
or byte [esi + 4], 0x40
jmp 0x51e791
or byte [esi + 4], 0x80
inc ebx
cmp ebx, 3
jl 0x51e70d
push dword [0x8503dc]
call dword [sym.imp.kernel32.dll_LockResource_1]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
Function at 0x51eb5a
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x819d74]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x51eb8b
xor eax, eax
jmp 0x51ed14
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x8503e0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x51ebc7
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00526e23
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x51eca2
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x51ece0
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x51ec2b
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x51ec1c
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x51ebfc
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x51ec6b
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x51ec74
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x51ebed
jmp 0x51ec76
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x51ed0f
cmp dword [ebp - 0x6c], edi
je 0x51ece0
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x51ecd5
call fcn.0051e52e
mov dword [eax], 9
call fcn.0051e537
mov dword [eax], esi
jmp 0x51ed0a
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x51ecca
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x51ec76
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x51ec76
push dword [ebp - 0x6c]
call fcn.0051e540
pop ecx
jmp 0x51ed0a
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x51ecf8
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x51ecf8
xor eax, eax
jmp 0x51ed12
call fcn.0051e52e
mov dword [eax], 0x1c
call fcn.0051e537
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x51ed12
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0052294b
add ebp, 0x3a0
leave
ret
Function at 0x520168
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x819d74]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x81a0f8]
je 0x52019d
inc eax
cmp eax, 0x13
jb 0x52018e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x81a0f8]
jne 0x5202c3
mov eax, dword [0x84e430]
cmp eax, 1
je 0x52029b
cmp eax, edx
jne 0x5201cd
cmp dword [0x819894], 1
je 0x52029b
cmp ecx, 0xfc
je 0x5202c3
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
test eax, eax
jne 0x520203
lea eax, [ebp - 0x80]
push 0x54c09c
push eax
call fcn.0051a340
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0051a0e0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x520237
mov eax, edi
push eax
call fcn.0051a0e0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x54c098
push edi
call fcn.00517030
add esp, 0x10
push edi
call fcn.0051a0e0
push dword [esi + 0x81a0fc]
mov ebx, eax
call fcn.0051a0e0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00517850
mov ebx, esp
push 0x54c07c
push ebx
call fcn.0051a340
push edi
push ebx
call fcn.0051a350
push 0x54c078
push ebx
call fcn.0051a350
push dword [esi + 0x81a0fc]
push ebx
call fcn.0051a350
push 0x12010
push 0x54c050
push ebx
call fcn.00526eba
add esp, 0x2c
jmp 0x5202c3
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x81a0fc]
push dword [esi]
call fcn.0051a0e0
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]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0052294b
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret