joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000e542
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
mov eax, dword [0x1004c810]
xor eax, esp
mov dword [esp + 0x218], eax
mov eax, dword [ebp + 8]
mov edx, 0x104
push ebx
push esi
push edi
push ecx
push ecx
xor edi, edi
mov dword [esp + 0x1c], eax
push ecx
lea ecx, [esp + 0x24]
mov dword [eax], edi
mov dword [eax + 4], edi
call fcn.1000d1bc
push 0x10007bdc
lea ecx, [esp + 0x1c]
call fcn.1000d12e
lea eax, [esp + 0x18]
push eax
push edi
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov esi, eax
test esi, esi
jne 0x1000e5c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1000e5fc
mov ecx, dword [ebp + 4]
mov edx, 0xc9
push 0x10007b6c
call fcn.1000e2a4
mov edi, eax
jmp 0x1000e5fc
lea edx, [esp + 0x10]
mov dword [esp + 0x10], edi
mov ecx, esi
call fcn.1000e422
mov ebx, eax
test ebx, ebx
jns 0x1000e5ee
push ebx
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0xcf
call fcn.1000e280
mov edi, ebx
jmp 0x1000e5fc
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
cdq
mov dword [ecx], eax
mov dword [ecx + 4], edx
test esi, esi
je 0x1000e606
push esi
call fcn.1000e314
mov ecx, dword [esp + 0x224]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1002f2fa
mov esp, ebp
pop ebp
ret 8

Function at 0x1001129a
Capabilities:
Initialize winsock library

Disassembly:
push 0x19c
mov eax, 0x1004322a
call fcn.100426a1
mov edi, ecx
mov dword [ebp - 0x1a4], edi
xor ebx, ebx
mov dword [ebp - 0x1a8], edi
mov dword [edi], ebx
mov dword [edi + 4], ebx
mov dword [ebp - 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
lea ecx, [edi + 0x10]
mov byte [ebp - 4], 1
call fcn.1001731d
push ecx
lea ecx, [edi + 0x14]
mov byte [ebp - 4], 2
xor edx, edx
call fcn.100173e5
lea esi, [edi + 0x18]
mov byte [ebp - 4], 3
push ebx
push ebx
mov dword [ebp - 0x1a4], esi
mov dword [esi], ebx
mov dword [esi + 4], ebx
call fcn.1001149d
mov dword [esi], eax
lea eax, [ebp - 0x1a0]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov eax, edi
call fcn.1004263c
ret
Function at 0x1001e4f1
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x1004c760]
sub esp, 0x54
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ecx, dword [0x1004c774]
mov ebx, eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ecx
push ebx
call ebp
push 0x7530
call eax
mov ecx, dword [0x1004c768]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x1004c768]
mov esi, eax
push ecx
push esi
call fcn.1001e4b1
mov ecx, dword [0x1004c764]
add esp, 8
push ecx
push ebx
call ebp
mov ecx, dword [0x1004c76c]
push 0x104
push esi
push ecx
call eax
mov edi, dword [0x1004c778]
xor eax, eax
cmp word [esi], ax
je 0x1001e579
nop word [eax + eax]
inc eax
cmp word [esi + eax*2], 0
jne 0x1001e571
cmp word [esi + eax*2 - 2], 0x5c
lea ecx, [esi + eax*2]
je 0x1001e595
dec eax
xor edx, edx
mov word [ecx], dx
cmp word [esi + eax*2 - 2], 0x5c
lea ecx, [esi + eax*2]
jne 0x1001e584
xor ecx, ecx
cmp word [edi], cx
je 0x1001e5b4
movzx edx, word [edi]
lea eax, [esi + eax*2]
mov word [eax], dx
lea ecx, [ecx + 1]
movzx edx, word [edi + ecx*2]
lea eax, [eax + 2]
test dx, dx
jne 0x1001e5a2
lea eax, [esp + 0x20]
push 0x44
push eax
call fcn.1001e4b1
lea eax, [esp + 0x18]
push 0x10
push eax
call fcn.1001e4b1
mov eax, dword [0x1004c77c]
add esp, 0x10
push eax
push ebx
call ebp
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call eax
push 0xffffffffffffffff
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x10020867
Capabilities:
Get inbound credentials handle via credssp

Disassembly:
push 0x14
mov eax, 0x1004519d
call fcn.10042668
mov edi, ecx
cmp byte [edi + 0xc], 0
mov ecx, dword [ebp + 4]
sete al
test al, al
je 0x10020897
push 0x801c0003
push 0x10008e38
mov edx, 0x90
call fcn.100118ba
cmp byte [edi + 0x44], 0
jne 0x100208ab
mov ecx, edi
call fcn.10022ca1
mov ecx, edi
call fcn.10021880
lea ecx, [edi + 0x78]
cmp dword [ecx + 0x14], 8
jb 0x100208b6
mov ecx, dword [ecx]
lea eax, [ebp - 0x20]
xor ebx, ebx
push eax
lea eax, [edi + 0x70]
push eax
push ebx
push ebx
push ebx
push ebx
push 1
push ecx
push ebx
call dword [sym.imp.SspiCli.dll_AcquireCredentialsHandleW]
mov ecx, dword [ebp + 4]
test eax, eax
setne al
test al, al
je 0x100208eb
push 0x801c0003
push 0x10008e38
mov edx, 0xa5
jmp 0x10020892
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x14]
push dword [ebp + 0xc]
mov byte [edi + 0x92], 1
push eax
mov ecx, dword [esi]
call fcn.10025cf9
push dword [ebp + 0xc]
lea eax, [ebp - 0x18]
mov dword [ebp - 4], ebx
mov ecx, dword [esi]
push eax
call fcn.10025cf9
push eax
lea ecx, [edi + 0x60]
call fcn.1001c848
lea ecx, [ebp - 0x18]
call fcn.100100f8
lea eax, [ebp - 0x14]
mov ecx, edi
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.100216d8
mov byte [ebp - 4], 1
lea eax, [ebp - 0x10]
cmp byte [edi + 0x90], 0
mov ecx, edi
push eax
je 0x1002094e
call fcn.10021091
jmp 0x10020953
call fcn.1002101b
lea ecx, [ebp - 0x10]
call fcn.100100f8
lea ecx, [ebp - 0x14]
call fcn.100100f8
call fcn.10042622
ret 8
Function at 0x10020eee
Capabilities:
Get outbound credentials handle via credssp

Disassembly:
push 0x24
mov eax, 0x1004526f
call fcn.100426a1
mov ebx, ecx
mov edi, dword [ebx + 4]
lea ecx, [ebp - 0x18]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x1004e274]
mov ecx, edi
call esi
xor esi, esi
lea eax, [ebp - 0x14]
mov dword [ebp - 4], esi
mov ecx, dword [ebp - 0x18]
push 1
push eax
mov byte [ebp - 0x14], 0x1e
call fcn.10025da2
lea ecx, [ebx + 0x78]
cmp dword [ecx + 0x14], 8
jb 0x10020f36
mov ecx, dword [ecx]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebx + 0x70]
push eax
push esi
push esi
push esi
push esi
push 2
push ecx
push esi
call dword [sym.imp.SspiCli.dll_AcquireCredentialsHandleW]
mov ecx, dword [ebp + 4]
test eax, eax
setne al
test al, al
je 0x10020f6c
push 0x801c0003
push 0x10008e38
mov edx, 0x19e
call fcn.100118ba
mov byte [ebx + 0x92], 1
mov dword [ebp - 0x28], esi
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x20]
mov ecx, ebx
push eax
call fcn.10021404
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x20]
push esi
call fcn.10025bb6
mov ecx, dword [ebp + 4]
neg eax
sbb al, al
add al, 1
je 0x10020fb2
push 0x801c0003
push 0x10008e38
mov edx, 0x1a4
jmp 0x10020f67
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x20]
push eax
call fcn.10025f07
lea eax, [ebp - 0x24]
mov ecx, ebx
push eax
call fcn.10023051
mov byte [ebp - 4], 3
push dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
call fcn.10025ed6
mov edi, dword [ebx + 4]
lea ecx, [ebp - 0x18]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x1004e274]
mov ecx, edi
call esi
lea ecx, [ebp - 0x24]
call fcn.100100f8
lea ecx, [ebp - 0x20]
call fcn.100100f8
lea ecx, [ebp - 0x28]
call fcn.100100f8
lea ecx, [ebp - 0x18]
call fcn.100100f8
call fcn.1004263c
ret

Function at 0x10024f90
Capabilities:
Encode data using xor
Encrypt or decrypt data via bcrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push ebx
push ebx
mov ecx, dword [esi + 0x18]
call fcn.10025b7a
mov ecx, eax
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 0x10]
xor edx, edx
div dword [esi + 0x10]
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10025022
push edi
mov edi, dword [ebp + 0xc]
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [esi + 0x10]
push edi
push ebx
push ebx
push ebx
push dword [esi + 0x10]
push ecx
push dword [esi + 0xc]
call dword [sym.imp.bcrypt.dll_BCryptEncrypt]
mov ecx, dword [ebp + 4]
test eax, eax
js 0x1002502a
cmp dword [esi + 0x10], 0
jbe 0x10024ffc
mov edx, dword [ebp + 8]
mov ecx, edi
sub edx, edi
mov al, byte [edx + ecx]
xor byte [ecx], al
inc ebx
inc ecx
cmp ebx, dword [esi + 0x10]
jb 0x10024ff0
mov eax, dword [esi + 0x10]
add dword [ebp + 8], eax
add edi, eax
mov ecx, dword [ebp - 8]
dec eax
add byte [eax + ecx], 1
jne 0x10025012
test eax, eax
jne 0x10025007
mov ebx, dword [ebp - 4]
inc ebx
cmp ebx, dword [ebp - 0xc]
push 0
mov dword [ebp - 4], ebx
pop ebx
jb 0x10024fc3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push eax
push 0x10009dd4
mov edx, 0xe1
call fcn.100118ba
int3
Function at 0x10025700
Capabilities:
Generate random numbers via winapi

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 2
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
jne 0x1002571d
pop ebp
ret 8
mov ecx, dword [ebp + 4]
push 0x801c0002
push 0x10009ea0
push 0x25
pop edx
call fcn.100118ba
int3

Function at 0x1002906a
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
cmp dword [edx + 0x14], 0x10
mov ebx, ecx
mov edi, dword [edx + 0x10]
jb 0x10029082
mov edx, dword [edx]
xor ecx, ecx
mov esi, 0x811c9dc5
test edi, edi
je 0x1002909e
movzx eax, byte [edx + ecx]
xor eax, esi
imul esi, eax, 0x1000193
inc ecx
cmp ecx, edi
jb 0x1002908d
mov eax, dword [ebx + 0x18]
pop edi
and eax, esi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x1002af74
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], edi
mov ebx, dword [edi + 0x24]
mov dword [ebp - 0x10], ebx
mov esi, dword [edi + 0x34]
mov ecx, dword [edi + 0x64]
sub esi, ecx
mov eax, dword [edi + 0x6c]
sub esi, eax
jne 0x1002afa8
test ecx, ecx
jne 0x1002afb2
test eax, eax
jne 0x1002afb2
mov esi, ebx
jmp 0x1002b02f
cmp esi, 0xffffffff
jne 0x1002afb2
push 0xfffffffffffffffe
pop esi
jmp 0x1002b02f
mov eax, dword [edi + 0x24]
add eax, 0xfffffefa
add eax, ebx
cmp ecx, eax
jb 0x1002b02f
mov ecx, dword [edi + 0x30]
push ebx
lea eax, [ecx + ebx]
push eax
push ecx
call fcn.1003f970
mov ecx, dword [edi + 0x44]
add esp, 0xc
mov eax, dword [edi + 0x3c]
sub dword [edi + 0x68], ebx
sub dword [edi + 0x64], ebx
sub dword [edi + 0x54], ebx
mov edi, ecx
mov dword [ebp - 8], ecx
lea edx, [eax + ecx*2]
lea edx, [edx - 2]
movzx eax, word [edx]
mov ecx, eax
sub ecx, ebx
cmp eax, ebx
sbb eax, eax
not eax
and eax, ecx
mov word [edx], ax
sub edi, 1
jne 0x1002afe8
mov edi, dword [ebp - 4]
mov dword [ebp - 8], ebx
mov eax, dword [edi + 0x38]
mov edi, ebx
lea edx, [eax + ebx*2]
lea edx, [edx - 2]
movzx eax, word [edx]
mov ecx, eax
sub ecx, ebx
cmp eax, ebx
sbb eax, eax
not eax
and eax, ecx
mov word [edx], ax
sub edi, 1
jne 0x1002b010
mov edi, dword [ebp - 4]
add esi, ebx
mov ebx, dword [edi]
cmp dword [ebx + 4], 0
je 0x1002b0c9
mov eax, dword [edi + 0x6c]
add eax, dword [edi + 0x64]
add eax, dword [edi + 0x30]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0xc], eax
mov eax, ecx
mov dword [ebp - 8], eax
cmp eax, esi
ja 0x1002b055
mov esi, ecx
test esi, esi
je 0x1002b088
mov eax, dword [ebx + 0x1c]
sub ecx, esi
mov dword [ebx + 4], ecx
cmp dword [eax + 0x18], 0
jne 0x1002b075
push esi
push dword [ebx]
push dword [ebx + 0x30]
call fcn.1002c3d0
mov dword [ebx + 0x30], eax
push esi
push dword [ebx]
push dword [ebp - 0xc]
call fcn.1003f970
add dword [ebx], esi
add esp, 0xc
add dword [ebx + 8], esi
add dword [edi + 0x6c], esi
mov ebx, dword [edi + 0x6c]
cmp ebx, 3
jb 0x1002b0b2
mov edx, dword [edi + 0x64]
mov eax, dword [edi + 0x30]
mov ecx, dword [edi + 0x50]
movzx esi, byte [edx + eax]
mov dword [edi + 0x40], esi
movzx eax, byte [edx + eax + 1]
shl esi, cl
xor esi, eax
and esi, dword [edi + 0x4c]
mov dword [edi + 0x40], esi
cmp ebx, 0x106
jae 0x1002b0c9
mov eax, dword [edi]
mov ebx, dword [ebp - 0x10]
cmp dword [eax + 4], 0
jne 0x1002af8a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x1002f465
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
lea edx, [ecx + 0x18]
add edx, eax
movzx eax, word [ecx + 6]
imul esi, eax, 0x28
add esi, edx
cmp edx, esi
je 0x1002f4a2
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [edx + 0xc]
jb 0x1002f49b
mov eax, dword [edx + 8]
add eax, dword [edx + 0xc]
cmp ecx, eax
jb 0x1002f4a7
add edx, 0x28
cmp edx, esi
jne 0x1002f48c
xor eax, eax
pop esi
pop ebp
ret
mov eax, edx
jmp 0x1002f4a4
Function at 0x10042760
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x1004279e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x10042796
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x100427a0
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x10042786
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x10042880
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x10042896
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
jne 0x100428b1
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
Function at 0x401230
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov ecx, dword [ebp + 8]
call fcn.00407e70
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x40125f
mov eax, dword [ebp - 4]
and eax, 0x10
jne 0x40125f
mov dword [ebp - 8], 1
jmp 0x401266
mov dword [ebp - 8], 0
movzx eax, byte [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x4014a0
Capabilities:
Get memory capacity
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x439040]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x48], ecx
cmp dword [ebp - 0x48], 2
jae 0x4014ca
xor eax, eax
jmp 0x40151d
mov dword [ebp - 0x44], 0x40
lea edx, [ebp - 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
push 0
push 0x400
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.0040d830
push 0
push 0x400
push edx
push eax
call fcn.0040d830
push 0
push 0x400
push edx
push eax
call fcn.0040d830
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 2
jae 0x401518
xor eax, eax
jmp 0x40151d
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d818
mov esp, ebp
pop ebp
ret

Function at 0x40bdd1
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x40bdf2
jl 0x40bde9
test edi, edi
jne 0x40bdf2
xor eax, eax
xor edx, edx
jmp 0x40beb3
cmp dword [ebx + 0x38], 0
je 0x40be07
push eax
push edi
push dword [ebp + 8]
call fcn.0040beb9
jmp 0x40beb3
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40be4e
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x40be4e
cmp eax, edi
jb 0x40be28
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.0040e7b0
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x40be54
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x40bea8
mov ecx, ebx
call fcn.0040b620
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x40be93
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.00415ec2
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x40bea8
jmp 0x40be66
test edx, edx
je 0x40bea8
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.00415ec2
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc
Function at 0x40e647
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.0040e760
mov eax, dword [0x439040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0041dce9
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x420bad
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x420d24
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0042b730
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1014], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x43ac20]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00421d8a
mov ecx, dword [esi*4 + 0x43ac20]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x1020], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x420d1d
cmp eax, dword [edi + ecx + 0x24]
jne 0x420d1d
xor esi, esi
lea eax, [ebp - 0x101c]
push esi
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x420d1d
push dword [ebp - 0x100c]
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00421d8a
add esp, 0x14
cmp edx, esi
jl 0x420d1d
jg 0x420c78
cmp eax, esi
jb 0x420d1d
mov ebx, dword [ebp - 0x1014]
mov eax, dword [ebp - 0x101c]
cmp ebx, esi
jg 0x420d1d
jl 0x420c9a
cmp dword [ebp - 0x1008], eax
ja 0x420d1d
lea edi, [ebp - 0x1004]
xorps xmm0, xmm0
add edi, eax
movlpd qword [ebp - 0x1018], xmm0
lea ecx, [ebp - 0x1004]
cmp dword [ebp - 0x1008], esi
jne 0x420cbf
cmp ebx, esi
je 0x420d04
mov edx, dword [ebp - 0x1014]
mov esi, dword [ebp - 0x1018]
cmp ecx, edi
jae 0x420d04
mov al, byte [ecx]
cmp al, 0xd
jne 0x420ce5
lea eax, [edi - 1]
cmp ecx, eax
jae 0x420cf1
cmp byte [ecx + 1], 0xa
jne 0x420cf1
inc ecx
jmp 0x420cf1
movzx eax, al
movsx eax, byte [eax + 0x439308]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x420ccb
cmp edx, ebx
jne 0x420ccb
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x1020]
jmp 0x420d22
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040d818
leave
ret
Function at 0x421171
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
mov eax, dword [eax + 0xc]
nop
shr eax, 3
test al, 1
je 0x42118b
mov al, 1
leave
ret
mov eax, dword [ebp + 8]
push ebx
push esi
mov eax, dword [eax + 0xc]
nop
test al, 0xc0
mov eax, dword [ebp + 8]
je 0x4211a2
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x4211fa
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.00423d96
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x4211fa
xor ebx, ebx
lea eax, [ebp - 0x10]
inc ebx
xorps xmm0, xmm0
push ebx
push eax
movlpd qword [ebp - 8], xmm0
push dword [ebp - 4]
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x4211fa
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4211fa
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x4211f4
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x4211f6
xor bl, bl
mov al, bl
jmp 0x4211fc
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x421216
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, edx
sar ecx, 6
and eax, 0x3f
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x43ac20]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x421258
cmp byte [ebx], 0xa
jne 0x421258
or byte [edi + eax + 0x28], 4
jmp 0x42125d
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x421360
mov cl, byte [eax]
cmp cl, 0x1a
je 0x42133b
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x42128c
mov eax, dword [ebp - 8]
jmp 0x4212ac
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x4212c8
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x4212a6
add eax, 2
mov cl, 0xa
jmp 0x4212a9
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov byte [esi], cl
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
add esi, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jb 0x42126e
jmp 0x421360
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 0x421336
cmp dword [ebp - 0x10], 0
je 0x421336
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x43ac20]
test byte [eax + edi + 0x28], 0x48
je 0x421315
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x421305
mov byte [esi], 0xa
jmp 0x42135f
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x43ac20]
mov byte [eax + edi + 0x2a], cl
jmp 0x42135f
cmp byte [ebp - 1], 0xa
jne 0x42131f
cmp esi, ebx
je 0x421300
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00421da8
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x421360
mov byte [esi], 0xd
jmp 0x42135f
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x43ac20]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x42135d
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x421360
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret