joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d57a0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x20
mov eax, dword [0x547008]
xor eax, ebp
mov dword [esp + 0x18], eax
mov edi, dword [ecx + 0x38]
test edi, edi
jne 0x4d585a
mov esi, ecx
xor eax, eax
dec eax
lea edi, [esp + 0xc]
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], 0x9ffffff
cmp edi, str.discarded
ja 0x4d57ee
lea eax, [esp + 0x15]
cmp eax, str.discarded
ja 0x4d5871
mov dword [esp + 0x10], 0x65647261
mov dword [esp + 0xc], 0x63736964
mov word [esp + 0x14], 0x64
mov eax, esp
mov ecx, esi
push edi
push eax
call fcn.004d5710
push 0x40
call fcn.004e82a5
add esp, 4
mov ebx, eax
mov ecx, eax
mov eax, esp
push eax
push dword [esi + 0x28]
push edi
call fcn.004d59b0
mov edi, dword [esi + 0x38]
mov dword [esi + 0x38], ebx
test edi, edi
je 0x4d5844
mov ecx, edi
call fcn.004d5a80
push edi
call fcn.004e82d5
add esp, 4
cmp byte [esp + 0x17], 0
jns 0x4d5857
push dword [esp + 0xc]
call fcn.004e82d5
add esp, 4
mov edi, dword [esi + 0x38]
mov ecx, dword [esp + 0x18]
xor ecx, ebp
call fcn.004e8be6
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 4
push str.char_traits::copy_overlapped_range
push str.__s2_____s1____s2_____s1____n
push 0xf3
push str....._third_partylibc_srcinclude__stringchar_traits.h
push str._s:_d:_assertion__s_failed:__s_n
call fcn.00457520
int3
Function at 0x4db080
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov ebx, edx
mov edi, ecx
mov eax, dword [0x547008]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea esi, [ebp - 0x1c]
push edx
push ecx
push esi
call fcn.004e3760
add esp, 0xc
cmp byte [esi + 0xb], 0
jns 0x4db0ae
mov esi, dword [ebp - 0x1c]
xor eax, eax
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
cmp byte [ebp - 0x11], 0
jns 0x4db0cc
push dword [ebp - 0x1c]
call fcn.004e82d5
add esp, 4
cmp dword [ebp + 8], 0
je 0x4db16f
test esi, esi
je 0x4db16f
lea eax, [esi + esi]
xor ecx, ecx
dec ecx
test esi, esi
cmovns ecx, eax
push ecx
call fcn.004e8303
add esp, 4
mov ecx, edi
mov edi, eax
mov eax, ebx
lea ebx, [ebp - 0x1c]
push eax
push ecx
push ebx
call fcn.004e3760
add esp, 0xc
cmp byte [ebx + 0xb], 0
jns 0x4db10f
mov ebx, dword [ebp - 0x1c]
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp byte [ebp - 0x11], 0
jns 0x4db129
push dword [ebp - 0x1c]
call fcn.004e82d5
add esp, 4
test edi, edi
mov ebx, dword [ebp + 8]
je 0x4db188
push edi
call fcn.005043ab
add esp, 4
lea ecx, [ebp - 0x1c]
push eax
push edi
push ecx
call fcn.004e3de0
add esp, 0xc
cmp byte [ebx + 0xb], 0
jns 0x4db157
push dword [ebx]
call fcn.004e82d5
add esp, 4
mov eax, dword [ebp - 0x14]
mov dword [ebx + 8], eax
movsd xmm0, qword [ebp - 0x1c]
movsd qword [ebx], xmm0
push edi
call fcn.004e830c
add esp, 4
test esi, esi
setne bl
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e8be6
mov eax, ebx
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
push str.null_pointer_passed_to_non_null_argument_of_char_traits_..._::length
push str.__s___nullptr
push 0x109
push str....._third_partylibc_srcinclude_string_view
push str._s:_d:_assertion__s_failed:__s_n
call fcn.00457520
int3
Function at 0x4db3f0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x547008]
xor ecx, ebp
mov dword [ebp - 0x10], ecx
cmp eax, 3
jne 0x4db439
lea eax, [ebp - 0x14]
mov dword [eax], 0x4db520
push 0
push eax
push 0x4db3d0
push 0x55c02c
call dword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x4db51b
cmp dword [0x55c030], 0
je 0x4db44d
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e8be6
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
push dword [0x55c034]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4db439
mov esi, eax
mov eax, 0x55c038
push eax
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov edi, dword [0x55c03c]
mov ebx, dword [0x55c040]
mov eax, dword [0x55c044]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x55c048]
mov dword [ebp - 0x20], eax
mov eax, dword [0x55c04c]
mov dword [ebp - 0x24], eax
mov eax, 0x55c038
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test edi, edi
je 0x4db4b4
mov eax, dword [esi]
mov dword [ebp - 0x18], eax
mov ecx, edi
call dword [section..00cfg]
push dword [ebp - 0x18]
call edi
add esp, 4
test ebx, ebx
je 0x4db4c9
mov edi, dword [esi + 4]
mov ecx, ebx
call dword [section..00cfg]
push edi
call ebx
add esp, 4
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x4db4df
mov edi, dword [esi + 8]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
mov ecx, dword [ebp - 0x20]
test ecx, ecx
mov ebx, dword [ebp - 0x24]
je 0x4db4f8
mov edi, dword [esi + 0xc]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
test ebx, ebx
je 0x4db50d
mov edi, dword [esi + 0x10]
mov ecx, ebx
call dword [section..00cfg]
push edi
call ebx
add esp, 4
push esi
call fcn.004e1280
add esp, 4
jmp 0x4db439
call fcn.004fd2fe
push ebp
mov ebp, esp
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x55c034], eax
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
mov dword [0x55c030], ecx
pop ebp
ret
Function at 0x4db540
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov eax, dword [0x547008]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
mov dword [eax], 0x4db520
push 0
push eax
push 0x4db3d0
push 0x55c02c
call dword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x4db624
mov esi, dword [ebp + 0xc]
cmp dword [0x55c030], 0
jne 0x4db611
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [0x55c034]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
jne 0x4db5cb
push 0x14
push 1
call fcn.004e1320
add esp, 8
test eax, eax
je 0x4db611
mov edi, eax
push eax
push dword [0x55c034]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4db608
mov ebx, dword [ebp + 8]
mov esi, 0x55c038
push esi
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov eax, dword [ebp + 0x10]
mov dword [ebx*4 + 0x55c03c], eax
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, dword [ebp + 0xc]
mov dword [edi + ebx*4], eax
xor esi, esi
inc esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e8be6
mov eax, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
push edi
call fcn.004e1280
add esp, 4
mov ecx, dword [ebp + 0x10]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
xor esi, esi
jmp 0x4db5f4
call fcn.004fd2fe
int3

Function at 0x4db660
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push 0x4db630
push 0x55c050
call fcn.004e8180
add esp, 8
mov ecx, dword [0x55c054]
test ecx, ecx
je 0x4db699
call dword [section..00cfg]
push edi
push esi
call ecx
test eax, eax
je 0x4db6a8
pop esi
pop edi
pop ebp
ret
test edi, edi
je 0x4db695
push edi
push esi
call sub.ADVAPI32.dll_SystemFunction036
test al, al
jne 0x4db695
call fcn.004fd2fe
int3
Function at 0x4e15e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
movdqu xmm4, xmmword [ecx]
movdqu xmm3, xmmword [ecx + 0x10]
movdqu xmm2, xmmword [ecx + 0x20]
movdqu xmm1, xmmword [ecx + 0x30]
movd xmm0, dword [ebp + 0x10]
pxor xmm0, xmm4
add eax, 0xffffffc0
add ecx, 0x40
cmp eax, 0x40
jb 0x4e16ae
movdqa xmm4, xmmword [0x52e650]
movdqa xmm5, xmmword [0x52e660]
nop word cs:[eax + eax]
movdqa xmm6, xmm0
pclmulqdq xmm6, xmm4, 0
pclmulqdq xmm0, xmm5, 0x11
pxor xmm0, xmm6
movdqa xmm6, xmm3
pclmulqdq xmm6, xmm4, 0
pclmulqdq xmm3, xmm5, 0x11
pxor xmm3, xmm6
movdqa xmm6, xmm2
pclmulqdq xmm6, xmm4, 0
pclmulqdq xmm2, xmm5, 0x11
pxor xmm2, xmm6
movdqa xmm6, xmm1
pclmulqdq xmm6, xmm4, 0
pclmulqdq xmm1, xmm5, 0x11
pxor xmm1, xmm6
movdqu xmm6, xmmword [ecx]
pxor xmm0, xmm6
movdqu xmm6, xmmword [ecx + 0x10]
pxor xmm3, xmm6
movdqu xmm6, xmmword [ecx + 0x20]
pxor xmm2, xmm6
movdqu xmm6, xmmword [ecx + 0x30]
pxor xmm1, xmm6
add eax, 0xffffffc0
add ecx, 0x40
cmp eax, 0x3f
ja 0x4e1630
movdqa xmm4, xmmword [0x52e670]
movdqa xmm5, xmm0
pclmulqdq xmm5, xmm4, 0
pxor xmm5, xmm3
movdqa xmm3, xmmword [0x52e680]
pclmulqdq xmm0, xmm3, 0x11
pxor xmm0, xmm5
movdqa xmm5, xmm0
pclmulqdq xmm5, xmm4, 0
pxor xmm5, xmm2
pclmulqdq xmm0, xmm3, 0x11
pxor xmm0, xmm5
movdqa xmm2, xmm0
pclmulqdq xmm2, xmm4, 0
pxor xmm2, xmm1
pclmulqdq xmm0, xmm3, 0x11
pxor xmm0, xmm2
cmp eax, 0x10
jb 0x4e1732
movdqu xmm1, xmmword [ecx]
movdqa xmm2, xmm0
pclmulqdq xmm2, xmm4, 0
pxor xmm2, xmm1
pclmulqdq xmm0, xmm3, 0x11
pxor xmm0, xmm2
add ecx, 0x10
add eax, 0xfffffff0
cmp eax, 0xf
ja 0x4e170b
movdqa xmm1, xmmword [0x52e680]
pclmulqdq xmm1, xmm0, 1
psrldq xmm0, 8
pxor xmm0, xmm1
pxor xmm2, xmm2
pxor xmm1, xmm1
pblendw xmm1, xmm0, 3
psrldq xmm0, 4
pclmulqdq xmm1, xmmword [0x52e690], 0
pxor xmm1, xmm0
pxor xmm0, xmm0
pblendw xmm0, xmm1, 3
pclmulqdq xmm0, xmmword [0x52e6a0], 0x10
pblendw xmm0, xmm2, 0xfc
pclmulqdq xmm0, xmmword [0x52e6b0], 0
pxor xmm0, xmm1
pextrd eax, xmm0, 1
pop ebp
ret
Function at 0x4e1db0
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x124
mov eax, dword [0x547008]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [0x55ac3c]
mov ecx, dword [0x54bb78]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4e1e01
mov eax, dword [0x55ac38]
mov esi, dword [eax]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e8be6
mov eax, esi
add esp, 0x124
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x55ac3c
call fcn.004e8347
add esp, 4
cmp dword [0x55ac3c], 0xffffffff
jne 0x4e1de3
lea edi, [ebp - 0x128]
xor esi, esi
push 0x118
push esi
push edi
call fcn.004ec220
add esp, 0xc
mov dword [edi - 4], 0x11c
lea edi, [ebp - 0x12c]
push edi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea ebx, [ebp - 0x130]
mov dword [ebx], esi
push ebx
push esi
push esi
push dword [edi + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetProductInfo]
push 0x54
call fcn.004e82a5
add esp, 4
mov esi, eax
mov ebx, dword [ebx]
mov eax, dword [0x55ac6c]
mov ecx, dword [0x54bb78]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4e1eaa
mov ecx, esi
push ebx
push 0x55ac48
push edi
call fcn.00483e80
mov dword [0x55ac38], esi
push 0x55ac3c
call fcn.004e83bd
add esp, 4
jmp 0x4e1de3
push 0x55ac6c
call fcn.004e8347
add esp, 4
cmp dword [0x55ac6c], 0xffffffff
jne 0x4e1e84
xorps xmm0, xmm0
movups xmmword [0x55ac58], xmm0
movups xmmword [0x55ac48], xmm0
mov dword [0x55ac68], 0
push 0x55ac48
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
push 0x55ac6c
call fcn.004e83bd
add esp, 4
jmp 0x4e1e84
Function at 0x4e2690
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x2010
call fcn.004e9760
mov eax, dword [0x547008]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [0x54b5ec]
cmp eax, 0xffffffff
je 0x4e2813
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test bl, 3
je 0x4e2813
and ebx, 0xfffffffc
lea eax, [ebp - 0x810]
push 0x800
push ebx
push eax
call fcn.004ebca0
add esp, 0xc
mov ecx, dword [0x54b5ec]
lea eax, [ebp - 0x80f]
push eax
mov dword [ebp - 0x2018], ecx
push ecx
call fcn.004be260
add esp, 8
test ebx, ebx
je 0x4e270b
push ebx
call fcn.004e830c
add esp, 4
mov edi, 0x101
lea esi, [ebp - 0x2010]
mov eax, dword [0x55bd18]
mov ecx, dword [0x54bb78]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4e2880
mov ebx, dword [0x55bd14]
push ebx
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x4e28da
push 0x1000
push 0x55ad10
lea eax, [ebp - 0x1810]
push eax
call fcn.004ebca0
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
push 0x800
push 0xff
push esi
call fcn.004ec220
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x1804]
nop word [eax + eax]
mov edx, dword [ecx]
mov dword [ebp + eax*8 - 0x2010], edx
mov word [ebp + eax*8 - 0x200c], ax
inc eax
add ecx, 0x10
cmp eax, 0x100
jne 0x4e2790
mov ecx, esi
lea edx, [ebp - 0x1810]
push 1
push 0x10
call fcn.0048f010
add esp, 8
mov ebx, 4
xor eax, eax
nop word [eax + eax]
movzx edx, word [ebp + ebx - 0x2010]
mov esi, dword [ebp + edx*8 - 0x810]
test esi, esi
jne 0x4e2828
add ebx, 8
cmp ebx, 0x804
jne 0x4e27d0
dec edi
je 0x4e28d0
test al, 1
lea esi, [ebp - 0x2010]
jne 0x4e2716
push 2
push dword [ebp - 0x2018]
call fcn.004be260
add esp, 8
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e8be6
add esp, 0x2010
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x2014], eax
mov ecx, edx
shl ecx, 4
cmp dword [ebp + ecx - 0x1810], 0
je 0x4e28c5
mov eax, dword [ebp + edx*8 - 0x80c]
cmp eax, dword [ebp + ecx - 0x1808]
jne 0x4e28c5
mov ecx, dword [ebp + ecx - 0x180c]
test ecx, ecx
mov eax, dword [ebp - 0x2014]
je 0x4e27e3
mov dword [ebp + edx*8 - 0x810], 0
call dword [section..00cfg]
push esi
call ecx
add esp, 4
mov al, 1
jmp 0x4e27e3
push 0x55bd18
call fcn.004e8347
add esp, 4
cmp dword [0x55bd18], 0xffffffff
jne 0x4e2737
push 4
call fcn.004e82a5
add esp, 4
mov ebx, eax
mov ecx, eax
call fcn.00485710
mov dword [0x55bd14], ebx
push 0x55bd18
call fcn.004e83bd
add esp, 4
jmp 0x4e2737
mov eax, dword [ebp - 0x2014]
jmp 0x4e27e3
call fcn.005183b0
jmp 0x4e2803
mov ecx, ebx
call fcn.00485720
jmp 0x4e274c
Function at 0x4e5dd0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 0
je 0x4e5ddf
pop ebp
jmp fcn.004e58e0
cmp dword [ebp + 0x10], 0
jne 0x4e5dea
call fcn.004d32f0
xor eax, eax
pop ebp
ret
Function at 0x4e81c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov eax, dword [0x547008]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 0x4db520
lea eax, [ebp - 0x14]
push 0
push eax
push 0x4db3d0
push 0x55c02c
call dword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x4e823a
xor esi, esi
cmp dword [0x55c030], 0
jne 0x4e8226
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [0x55c034]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
je 0x4e8226
mov eax, dword [ebp + 8]
mov esi, dword [edi + eax*4]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e8be6
mov eax, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.004fd2fe
int3

Function at 0x4e8a17
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4e8a56
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4e8a56
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4e8a56
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4e8a56
cmp dword [ecx + 0x74], 0xe
jbe 0x4e8a56
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4f8410
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.004f85a7
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4f857f
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4f857f
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4f8534
jg 0x4f846c
test eax, eax
je 0x4f852a
push 1
push 0x1000
call fcn.004e1380
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4f848f
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4f8521
push 0x8000
push ebx
call fcn.004fd3c1
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4f84b8
jg 0x4f84b3
cmp ecx, 0x1000
jb 0x4f84b8
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004ffb4d
add esp, 0x10
cmp eax, 0xffffffff
je 0x4f84fd
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x4f84b3
jl 0x4f84e4
test ecx, ecx
jne 0x4f84a5
push dword [ebp - 0xc]
push ebx
call fcn.004fd3c1
push esi
call fcn.004e1280
add esp, 0xc
xor ebx, ebx
jmp 0x4f858d
cmp byte [edi + 0x24], 0
je 0x4f8514
cmp dword [edi + 0x20], 5
jne 0x4f8514
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4f851f
mov ebx, dword [edi + 0x18]
jmp 0x4f8521
xor ebx, ebx
push esi
call fcn.004e1280
pop ecx
jmp 0x4f858d
test ecx, ecx
jg 0x4f84f6
jl 0x4f8534
test eax, eax
jae 0x4f84f6
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004fc472
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4f8554
cmp byte [edi + 0x1c], 0
je 0x4f84f6
jmp 0x4f8585
push ebx
call fcn.004fb1da
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4f84f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4f858d
cmp byte [edi + 0x1c], 0
je 0x4f858a
mov ebx, dword [edi + 0x18]
jmp 0x4f858d
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004fc472
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4fceb1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x54c688]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4fcef1
cmp byte [ebx], 0xa
jne 0x4fcef1
or byte [edi + eax + 0x28], 4
jmp 0x4fcef6
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x4fcff5
mov dl, byte [eax]
cmp dl, 0x1a
je 0x4fcfd8
inc eax
cmp dl, 0xd
je 0x4fcf22
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4fcf48
cmp eax, ecx
jae 0x4fcf56
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x4fcf0a
jmp 0x4fcff5
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4fcfd3
cmp dword [ebp - 0x10], 0
je 0x4fcfd3
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x54c688]
test byte [eax + edi + 0x28], 0x48
je 0x4fcfad
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4fcf98
mov byte [esi], dl
jmp 0x4fcfa9
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x54c688]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4fcff5
cmp byte [ebp - 1], 0xa
jne 0x4fcfbc
cmp esi, ebx
jne 0x4fcfbc
mov byte [esi], 0xa
jmp 0x4fcff4
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004fc472
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4fcff5
mov byte [esi], 0xd
jmp 0x4fcff4
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x54c688]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4fcff2
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4fcff5
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4fcffe
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x54c688]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4fd044
cmp word [ebx], dx
jne 0x4fd044
or byte [eax + edi + 0x28], 4
jmp 0x4fd049
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x4fd1ac
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x4fd18c
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4fd08a
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4fd0c0
cmp eax, edx
jae 0x4fd0ce
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4fd065
jmp 0x4fd1ac
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4fd187
cmp dword [ebp - 0x18], 0
je 0x4fd187
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x54c688]
test byte [eax + edi + 0x28], 0x48
je 0x4fd15d
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x4fd121
mov word [esi], cx
jmp 0x4fd158
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x54c688]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x54c688]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x54c688]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4fd1ac
pop eax
cmp word [ebp - 4], ax
jne 0x4fd16d
cmp esi, ebx
jne 0x4fd16d
mov word [esi], ax
jmp 0x4fd1a9
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004fc472
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4fd1ac
push 0xd
pop eax
jmp 0x4fd168
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x54c688]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4fd1a6
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4fd1ac
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret