joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1b00a769
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x1b00e190
cmp edx, dword [eax]
je 0x1b00a78b
add eax, 8
inc ecx
cmp eax, 0x1b00e220
jl 0x1b00a77c
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x1b00e190]
jne 0x1b00a8b9
mov eax, dword [0x1b00ebb0]
cmp eax, 1
je 0x1b00a893
test eax, eax
jne 0x1b00a7bc
cmp dword [0x1b00e0e4], 1
je 0x1b00a893
cmp edx, 0xfc
je 0x1b00a8b9
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1b00a7f3
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.1b00b670
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.1b00b490
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x1b00a836
lea eax, [ebp - 0x1a4]
push eax
call fcn.1b00b490
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x1b00d45c
push edi
call fcn.1b00bf00
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.1b00b670
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.1b00b680
lea eax, [ebp - 0xa0]
push 0x1b00d43c
push eax
call fcn.1b00b680
push dword [esi + 0x1b00e194]
lea eax, [ebp - 0xa0]
push eax
call fcn.1b00b680
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.1b00be75
add esp, 0x2c
pop edi
jmp 0x1b00a8b9
lea eax, [ebp + 8]
lea esi, [esi + 0x1b00e194]
push 0
push eax
push dword [esi]
call fcn.1b00b490
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 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408ecc
nop
mov ecx, 0xe152b44
test eax, eax
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x430024
nop
nop
mov eax, section..data
nop
mov ebx, 0x42e1d0
nop
nop
mov ecx, 0x3a110b1
test eax, eax
nop
nop
nop
nop
je 0x430084
nop
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x50c050
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xb5000]
push edi
jmp 0x50c06a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x50c071
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x50c060
mov eax, 1
add ebx, ebx
jne 0x50c083
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x50c094
jne 0x50c0b3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x50c0b3
dec eax
add ebx, ebx
jne 0x50c0a0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x50c078
add ebx, ebx
jne 0x50c0af
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x50c105
xor ecx, ecx
sub eax, 3
jb 0x50c0cb
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x50c13a
sar eax, 1
mov ebp, eax
jmp 0x50c0d6
add ebx, ebx
jne 0x50c0d6
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x50c0a4
inc ecx
add ebx, ebx
jne 0x50c0e4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x50c0a4
add ebx, ebx
jne 0x50c0f1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x50c0e6
jne 0x50c102
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x50c0e6
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x50c124
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x50c116
jmp 0x50c066
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x50c124
add edi, ecx
jmp 0x50c066
pop esi
mov edi, esi
mov ecx, 0x3ea9
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x50c142
cmp byte [edi], 0x11
jne 0x50c142
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x50c147
lea edi, [esi + 0x105000]
mov eax, dword [edi]
or eax, eax
je 0x50c1bf
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x13ef5c]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x13f0d8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x50c174
mov ecx, edi
jns 0x50c1a3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x13f0dc]
or eax, eax
je 0x50c1b9
mov dword [ebx], eax
add ebx, 4
jmp 0x50c191
call dword [esi + 0x13f0ec]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x50c1f0
cmp al, 0xef
ja 0x50c1e3
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x50c1c5
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x50c1d2
mov ebp, dword [esi + 0x13f0e0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x22f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x50c224
sub esp, 0xffffff80
jmp 0x42800a
Function at 0x40b5e7
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41e090]
jne 0x40b5f1
repz ret
jmp fcn.0040ca36

Function at 0x41224c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41e090]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00410a29
and dword [ebp - 0x14], 0
cmp dword [0x683af0], 0
mov dword [ebp - 0x18], eax
jne 0x4122ff
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x4123a7
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x4123a7
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x683af0], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x683af4], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x683af8], eax
call edi
push eax
call esi
mov dword [0x683b00], eax
test eax, eax
je 0x4122ff
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x683afc], eax
mov eax, dword [0x683afc]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x412358
cmp dword [0x683b00], ecx
je 0x412358
push eax
call esi
push dword [0x683b00]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x412358
test ebx, ebx
je 0x412358
call edi
test eax, eax
je 0x41234f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x41234f
test byte [ebp - 8], 1
jne 0x412358
or dword [ebp + 0x10], 0x200000
jmp 0x41238b
mov eax, dword [0x683af4]
cmp eax, dword [ebp - 0x18]
je 0x41238b
push eax
call esi
test eax, eax
je 0x41238b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41238b
mov eax, dword [0x683af8]
cmp eax, dword [ebp - 0x18]
je 0x41238b
push eax
call esi
test eax, eax
je 0x41238b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x683af0]
call esi
test eax, eax
je 0x4123a7
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x4123a9
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b5e7
leave
ret
Function at 0x499c30
Capabilities:
Compare security identifiers

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffff0
mov eax, dword [0x564a04]
cmp dword [eax], 2
je 0x499c49
mov byte [esp], 1
jmp 0x499d1e
mov byte [esp], 0
lea eax, [esp + 4]
push eax
push 0xffffffffffffffff
push 8
call sub.kernel32.dll_GetCurrentThread
push eax
call sub.advapi32.dll_OpenThreadToken
mov ebx, eax
test ebx, ebx
jne 0x499c87
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x3f0
jne 0x499c87
lea eax, [esp + 4]
push eax
push 8
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
mov ebx, eax
test ebx, ebx
je 0x499d1e
mov eax, 0x400
call fcn.00402ecc
mov esi, eax
lea eax, [esp + 8]
push eax
push 0x400
push esi
push 2
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_GetTokenInformation
mov ebx, eax
mov eax, dword [esp + 4]
push eax
call sub.kernel32.dll_CloseHandle_1
test ebx, ebx
je 0x499d17
lea eax, [esp + 0xc]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
push 0x55e3e8
call sub.advapi32.dll_AllocateAndInitializeSid
mov ebx, dword [esi]
dec ebx
test ebx, ebx
jl 0x499d0d
inc ebx
xor edi, edi
mov eax, dword [esi + edi*8 + 4]
push eax
mov eax, dword [esp + 0x10]
push eax
call sub.advapi32.dll_EqualSid
test eax, eax
je 0x499d09
mov byte [esp], 1
jmp 0x499d0d
inc edi
dec ebx
jne 0x499cf0
mov eax, dword [esp + 0xc]
push eax
call sub.advapi32.dll_FreeSid
mov eax, esi
call fcn.00402efc
mov al, byte [esp]
add esp, 0x10
pop edi
pop esi
pop ebx
ret

Function at 0x49a2e8
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffcf0
mov ebx, eax
mov eax, ebx
call fcn.004059bc
mov eax, dword [0x5641d8]
cmp byte [eax], 0
je 0x49a32d
push 0x104
lea eax, [esp + 0x10a]
push eax
call sub.kernel32.dll_GetWindowsDirectoryW
test eax, eax
jbe 0x49a34e
mov eax, ebx
lea edx, [esp + 0x106]
mov ecx, 0x105
call fcn.00405b78
jmp 0x49a34e
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
test eax, eax
jbe 0x49a34e
mov eax, ebx
mov edx, esp
mov ecx, 0x105
call fcn.00405b60
add esp, 0x310
pop ebx
ret

Function at 0x49a358
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffcf0
mov ebx, eax
mov eax, ebx
call fcn.004059bc
mov eax, dword [0x5641d8]
cmp byte [eax], 0
je 0x49a39d
push 0x104
lea eax, [esp + 0x10a]
push eax
call sub.kernel32.dll_GetSystemDirectoryW
test eax, eax
jbe 0x49a3be
mov eax, ebx
lea edx, [esp + 0x106]
mov ecx, 0x105
call fcn.00405b78
jmp 0x49a3be
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
test eax, eax
jbe 0x49a3be
mov eax, ebx
mov edx, esp
mov ecx, 0x105
call fcn.00405b60
add esp, 0x310
pop ebx
ret
Function at 0x508afc
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
call fcn.00508ac8
cmp dword [0x58b2b0], 0
jne 0x508b18
cmp dword [0x58b2ac], 0
je 0x508b28
fld qword [ebp + 8]
fcomp dword [0x508bc8]
fnstsw ax
sahf
jbe 0x508b52
call sub.kernel32.dll_GetTickCount_1
mov ebx, eax
jmp 0x508b36
call fcn.00508ac8
call sub.kernel32.dll_GetTickCount_1
sub eax, ebx
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x24], eax
fild qword [ebp - 0x28]
fcomp qword [ebp + 8]
fnstsw ax
sahf
jb 0x508b31
jmp 0x508bbe
fld qword [ebp + 8]
fcomp dword [0x508bcc]
fnstsw ax
sahf
jbe 0x508bbe
fld qword [ebp + 8]
fdiv dword [0x508bd0]
fstp qword [ebp + 8]
wait
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_QueryPerformanceCounter_1
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov word [ebp - 8], ax
jmp 0x508bb3
call fcn.00508ac8
lea eax, [ebp - 0x20]
push eax
call sub.kernel32.dll_QueryPerformanceCounter_1
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
fild qword [ebp - 0x28]
fild qword [0x58b2ac]
fdivp st(1)
fstp xword [ebp - 0x10]
wait
fld xword [ebp - 0x10]
fcomp qword [ebp + 8]
fnstsw ax
sahf
jb 0x508b84
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x508ce8
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
push esi
mov ebx, 0x562d90
mov esi, eax
cmp ecx, 1
jb 0x508df1
test edx, edx
jne 0x508d05
xor esi, esi
jmp 0x508df1
xor eax, 0xffffffff
cmp ecx, 8
jb 0x508dcd
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
sub ecx, 8
cmp ecx, 8
jae 0x508d11
test ecx, ecx
je 0x508dec
movzx esi, byte [edx]
xor esi, eax
and esi, 0xff
mov esi, dword [ebx + esi*4]
shr eax, 8
xor esi, eax
mov eax, esi
inc edx
dec ecx
test ecx, ecx
jne 0x508dd1
mov esi, eax
xor esi, 0xffffffff
mov eax, esi
pop esi
pop ebx
ret
Function at 0x50ce60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffe4
mov ebx, eax
mov eax, dword [ebx + 0x60]
mov esi, eax
lea edi, [esp + 4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edx, dword [esp + 0x14]
test edx, edx
jns 0x50ce87
call fcn.00404334
xor ecx, ecx
mov eax, dword [ebx + 0x78]
mov esi, dword [eax]
call dword [esi + 0x14]
mov eax, dword [ebx + 0x30]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x50ced0
mov eax, dword [ebx + 0x30]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x50cec8
inc esi
xor edi, edi
mov edx, edi
mov eax, dword [ebx + 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov edx, dword [0x50c4a4]
call fcn.00406548
inc edi
dec esi
jne 0x50ceaf
mov eax, dword [ebx + 0x30]
mov edx, dword [eax]
call dword [edx + 0x44]
movzx esi, word [esp + 0xc]
test esi, esi
jle 0x50cf4d
mov edx, dword [0x50c4a4]
mov eax, 0x3c
call fcn.00406534
mov dword [esp], eax
mov edx, dword [esp]
mov ecx, 0x2e
mov eax, dword [ebx + 0x78]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [esp]
movzx ecx, word [eax + 0x1c]
mov eax, dword [esp]
lea edx, [eax + 0x30]
mov eax, dword [ebx + 0x78]
call fcn.00508a00
mov eax, dword [esp]
movzx edx, word [eax + 0x1e]
mov cx, 1
mov eax, dword [ebx + 0x78]
mov edi, dword [eax]
call dword [edi + 0x14]
mov eax, dword [esp]
movzx ecx, word [eax + 0x20]
mov eax, dword [esp]
lea edx, [eax + 0x34]
mov eax, dword [ebx + 0x78]
call fcn.00508a00
mov eax, dword [esp]
mov edx, dword [eax + 0x30]
mov ecx, dword [esp]
mov eax, dword [ebx + 0x30]
mov edi, dword [eax]
call dword [edi + 0x3c]
dec esi
jne 0x50ced9
mov eax, dword [ebx + 0x30]
mov edx, dword [eax]
call dword [edx + 0x14]
movzx edx, word [esp + 0xc]
cmp eax, edx
sete al
add esp, 0x1c
pop edi
pop esi
pop ebx
ret
Function at 0x51ac94
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 8], ebx
mov esi, ecx
mov ebx, edx
xor eax, eax
push ebp
push 0x51ad1f
push dword fs:[eax]
mov dword fs:[eax], esp
push 2
push 0
push 0xffffffffffffff80
push ebx
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
je 0x51ad01
push 0
lea eax, [ebp - 4]
push eax
push 0x80
push esi
push ebx
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x51ad01
cmp dword [ebp - 4], 0x80
jne 0x51ad01
lea eax, [ebp - 8]
mov edx, esi
mov ecx, 3
call fcn.00405354
mov eax, dword [ebp - 8]
mov edx, 0x51ad38
call fcn.00405680
je 0x51ad05
xor eax, eax
jmp 0x51ad07
mov al, 1
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51ad26
lea eax, [ebp - 8]
call fcn.00405264
ret

Function at 0x51b858
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 8], ebx
mov ebx, ecx
mov esi, edx
xor eax, eax
push ebp
push 0x51b90e
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
lea eax, [ebp - 4]
push eax
push 0xa
push ebx
push esi
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x51b8f0
cmp dword [ebp - 4], 0xa
jne 0x51b8f0
lea eax, [ebp - 8]
mov edx, ebx
mov ecx, 3
call fcn.00405354
mov eax, dword [ebp - 8]
mov edx, 0x51b928
call fcn.00405680
jne 0x51b8f0
cmp byte [ebx + 4], 0xff
jae 0x51b8f0
cmp byte [ebx + 3], 2
jne 0x51b8c0
test byte [ebx + 5], 0x3f
je 0x51b8d8
cmp byte [ebx + 3], 3
jne 0x51b8cc
test byte [ebx + 5], 0x1f
je 0x51b8d8
cmp byte [ebx + 3], 4
jne 0x51b8f0
test byte [ebx + 5], 0xf
jne 0x51b8f0
test byte [ebx + 6], 0x80
jne 0x51b8f0
test byte [ebx + 7], 0x80
jne 0x51b8f0
test byte [ebx + 8], 0x80
jne 0x51b8f0
test byte [ebx + 9], 0x80
je 0x51b8f4
xor eax, eax
jmp 0x51b8f6
mov al, 1
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51b915
lea eax, [ebp - 8]
call fcn.00405264
ret
Function at 0x51c1a0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51c36f
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
push 0
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
setne byte [ebp - 5]
cmp byte [ebp - 5], 0
je 0x51c354
mov eax, dword [ebp - 4]
call fcn.0051bfbc
mov edi, eax
add edi, dword [ebp - 0xc]
sub edi, 0xa
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_GetFileSize_1
cmp eax, edi
setae byte [ebp - 5]
cmp byte [ebp - 5], 0
je 0x51c354
xor eax, eax
push ebp
push 0x51c34d
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [ebp - 0xc]
push 0
lea eax, [ebp - 0x10]
push eax
push 6
lea eax, [ebp - 0x16]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x51c253
cmp dword [ebp - 0x10], 6
jne 0x51c253
mov al, byte [ebp - 0x16]
add al, 0xbf
sub al, 0x1a
jb 0x51c257
xor eax, eax
jmp 0x51c259
mov al, 1
mov byte [ebp - 5], al
add ebx, dword [ebp - 0x10]
cmp edi, ebx
seta al
and al, byte [ebp - 5]
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x51c325
movzx esi, byte [ebp - 0x13]
shl esi, 0x10
xor eax, eax
mov al, byte [ebp - 0x12]
shl eax, 8
add esi, eax
xor eax, eax
mov al, byte [ebp - 0x11]
add esi, eax
test esi, esi
jbe 0x51c31d
lea edx, [esi + 1]
lea eax, [ebp - 0x1c]
call fcn.004058c0
mov eax, dword [ebp - 0x1c]
call fcn.00405534
push eax
lea eax, [ebp - 0x1c]
call fcn.0040578c
xor ecx, ecx
pop edx
call fcn.00403a38
push 0
lea eax, [ebp - 0x10]
push eax
push esi
lea eax, [ebp - 0x1c]
call fcn.0040578c
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x51c2dd
cmp esi, dword [ebp - 0x10]
je 0x51c2e1
xor eax, eax
jmp 0x51c2e3
mov al, 1
mov byte [ebp - 5], al
add ebx, dword [ebp - 0x10]
cmp edi, ebx
setae al
and al, byte [ebp - 5]
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x51c325
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x20]
lea edx, [ebp - 0x16]
mov ecx, 3
call fcn.00405354
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x1c]
call fcn.0051bff4
pop ecx
cmp edi, ebx
ja 0x51c228
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c354
cmp byte [ebp - 5], 0
jne 0x51c34c
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_SetFilePointer_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c376
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00405288
ret
Function at 0x51c380
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51c559
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
push 0
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
setne byte [ebp - 5]
cmp byte [ebp - 5], 0
je 0x51c53e
mov eax, dword [ebp - 4]
call fcn.0051bfbc
mov edi, eax
add edi, dword [ebp - 0xc]
sub edi, 0xa
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_GetFileSize_1
cmp eax, edi
setae byte [ebp - 5]
cmp byte [ebp - 5], 0
je 0x51c53e
xor eax, eax
push ebp
push 0x51c537
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [ebp - 0xc]
push 0
lea eax, [ebp - 0x10]
push eax
push 0xa
lea eax, [ebp - 0x1a]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x51c433
cmp dword [ebp - 0x10], 0xa
jne 0x51c433
mov al, byte [ebp - 0x1a]
add al, 0xbf
sub al, 0x1a
jb 0x51c437
xor eax, eax
jmp 0x51c439
mov al, 1
mov byte [ebp - 5], al
add ebx, dword [ebp - 0x10]
cmp edi, ebx
seta al
and al, byte [ebp - 5]
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x51c50f
movzx esi, byte [ebp - 0x16]
shl esi, 0x18
xor eax, eax
mov al, byte [ebp - 0x15]
shl eax, 0x10
add esi, eax
xor eax, eax
mov al, byte [ebp - 0x14]
shl eax, 8
add esi, eax
xor eax, eax
mov al, byte [ebp - 0x13]
add esi, eax
test esi, esi
jbe 0x51c507
lea edx, [esi + 2]
lea eax, [ebp - 0x20]
call fcn.004058c0
mov eax, dword [ebp - 0x20]
call fcn.00405534
push eax
lea eax, [ebp - 0x20]
call fcn.0040578c
xor ecx, ecx
pop edx
call fcn.00403a38
push 0
lea eax, [ebp - 0x10]
push eax
push esi
lea eax, [ebp - 0x20]
call fcn.0040578c
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x51c4c7
cmp esi, dword [ebp - 0x10]
je 0x51c4cb
xor eax, eax
jmp 0x51c4cd
mov al, 1
mov byte [ebp - 5], al
add ebx, dword [ebp - 0x10]
cmp edi, ebx
setae al
and al, byte [ebp - 5]
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x51c50f
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x24]
lea edx, [ebp - 0x1a]
mov ecx, 4
call fcn.00405354
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
call fcn.0051bff4
pop ecx
cmp edi, ebx
ja 0x51c408
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c53e
cmp byte [ebp - 5], 0
jne 0x51c536
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push eax
call sub.kernel32.dll_SetFilePointer_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c560
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00405288
ret