joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401898
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
xor eax, eax
sub esp, 0x2c
cmp dword [0x40acd8], eax
jne 0x4018ec
push eax
push 0x2c
lea ecx, [ebp - 0x2c]
push ecx
push eax
call dword [0x40d914]
test eax, eax
jl 0x4018ec
xor edx, edx
mov eax, 0x40acd8
div dword [ebp - 0x14]
imul eax, dword [ebp - 0x14]
jmp 0x4018e0
cmp word [eax], 0x5a4d
jne 0x4018dd
mov ecx, dword [eax + 0x3c]
cmp dword [eax + ecx], 0x4550
je 0x4018e7
sub eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
ja 0x4018ca
jmp 0x4018ec
mov dword [0x40acd8], eax
mov eax, dword [0x40acd8]
leave
ret

Function at 0x40435b
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
mov edx, dword fs:[0x30]
mov edx, dword [edx + 0xc]
mov edx, dword [edx + 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
test eax, eax
jne 0x404398
xor eax, eax
leave
ret
add eax, 0x2c
push 1
push eax
call fcn.00405c48
cmp dword [ebp + 8], eax
mov eax, dword [ebp - 4]
pop ecx
pop ecx
je 0x4043a0
mov eax, dword [eax]
mov dword [ebp - 4], eax
cmp dword [eax + 0x18], 0
jne 0x40437e
jmp 0x40437a
mov eax, dword [eax + 0x18]
leave
ret

Function at 0x4043a5
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x34
test ecx, ecx
push ebx
push esi
push edi
je 0x404468
cmp word [ecx], 0x5a4d
jne 0x404468
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x404468
mov esi, dword [eax + 0x78]
test esi, esi
je 0x404468
mov eax, dword [eax + 0x7c]
and dword [ebp - 4], 0
add esi, ecx
mov edi, dword [esi + 0x20]
mov ebx, dword [esi + 0x1c]
add eax, esi
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x24]
add eax, ecx
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x18]
add edi, ecx
add ebx, ecx
test eax, eax
mov dword [ebp - 0x10], eax
jbe 0x404468
mov eax, dword [edi]
add eax, ecx
mov edx, dword [eax]
cmp edx, dword [ebp + 0xc]
jne 0x40445a
push 0
push 0
push eax
call fcn.0040608e
add esp, 0xc
cmp eax, dword [ebp + 0x10]
jne 0x404457
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
movzx eax, word [eax + ecx*2]
mov eax, dword [ebx + eax*4]
add eax, dword [ebp + 8]
cmp eax, esi
mov dword [ebp - 0x14], eax
jb 0x40446a
cmp eax, dword [ebp - 0xc]
ja 0x40446a
push 0x2e
push 0x1c
push eax
call fcn.00405c7e
add esp, 0xc
test eax, eax
mov dword [ebp - 4], eax
ja 0x40446f
mov ecx, dword [ebp + 8]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 4
cmp eax, dword [ebp - 0x10]
jb 0x40440a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 0x14]
inc esi
push esi
lea eax, [ebp - 0x34]
push edi
push eax
call fcn.00405698
push 4
lea eax, [ebp + esi - 0x34]
push 0x4093f4
push eax
call fcn.00405698
add esi, edi
xor edi, edi
push edi
push edi
push esi
call fcn.0040608e
add esp, 0x24
push eax
push dword [esi]
lea eax, [ebp - 0x34]
push 1
push edi
push eax
call fcn.0040608e
push eax
call fcn.0040435b
add esp, 0x10
push eax
call fcn.004043a5
add esp, 0xc
jmp 0x40446a
Function at 0x405400
Capabilities:
Inspect section memory permissions

Disassembly:
mov ecx, dword [esp + 4]
xor eax, eax
test ecx, 0x4000000
je 0x405413
mov eax, 0x200
push esi
mov esi, ecx
and esi, 0x20000000
push edi
mov edx, 0x40000000
mov edi, 0x80000000
je 0x405431
test edx, ecx
je 0x405431
test edi, ecx
jne 0x40545f
test esi, esi
je 0x40543e
test edx, ecx
je 0x40543e
or eax, 0x20
jmp 0x405462
mov esi, ecx
and esi, edx
je 0x40544d
test edi, ecx
je 0x405456
or eax, 4
jmp 0x405462
test edi, ecx
je 0x405456
or eax, 8
jmp 0x405462
test esi, esi
je 0x40545f
or eax, 2
jmp 0x405462
or eax, 0x40
pop edi
pop esi
ret
Function at 0x431006
Capabilities:
Encode data using xor

Disassembly:
mov eax, section..3ean
nop
nop
nop
nop
push 4
nop
pop edi
nop
nop
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
je 0x431072
nop
nop
mov ebx, 0x40915c
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0x53cf5c24
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
loop 0x431060
nop
nop
nop
mov eax, section..7LWLf
nop
nop
nop
cmp eax, 0
je 0x4310d2
nop
nop
nop
nop
mov ebx, 0x42f3f8
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
mov esi, 0x247313eb
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x4310c0
popal
nop
nop
nop
nop
nop
jmp 0x401219
Function at 0x4039ea
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
xor eax, eax
push edi
mov ecx, 0x80070057
cmp dword [ebp + 8], ebx
jne 0x403a04
mov eax, ecx
xor edx, edx
mov edi, 0x402bd0
cmp edx, edi
jne 0x403a11
mov eax, ecx
cmp eax, ebx
jl 0x403a9b
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, 2
je 0x403a7a
cmp eax, ebx
je 0x403a4c
jle 0x403a88
and eax, 0xffff
or eax, 0x80070000
jmp 0x403a88
push 4
pop esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 8]
push eax
push ebx
push edi
push dword [ebp - 4]
mov dword [ebp + 8], ebx
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
je 0x403a7a
cmp eax, ebx
jne 0x403a3e
cmp dword [ebp + 8], esi
je 0x403a7f
xor esi, esi
inc esi
jmp 0x403a8a
xor eax, eax
cmp dword [ebp - 0xc], 1
setne al
mov esi, eax
cmp dword [ebp - 4], ebx
je 0x403a98
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop edi
pop ebx
leave
ret 4

Function at 0x403fd1
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor ebx, ebx
lea esi, [ebp - 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
call fcn.00404e23
mov dword [ebp - 4], eax
test eax, eax
je 0x40404d
and dword [ebp - 4], ebx
push 0x402b88
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x404032
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404029
cmp eax, 0x7e
je 0x404029
test eax, eax
jle 0x404024
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
jmp 0x404081
mov dword [ebp - 4], 0x80040641
jmp 0x404081
push 0x402ba0
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
jne 0x40404f
mov dword [ebp - 4], 0x8000ffff
jmp 0x404081
mov esi, ebx
and dword [ebp - 0xc], 0
mov dword [edi], esi
mov esi, dword [ebp - 8]
and dword [ebp - 8], 0
mov dword [edi + 8], ebx
cmp dword [edi + 4], esi
je 0x404099
test esi, esi
je 0x40406e
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov eax, dword [edi + 4]
test eax, eax
je 0x40407b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [edi + 4], esi
mov esi, dword [ebp - 0xc]
test esi, esi
je 0x40408c
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 8]
test eax, eax
je 0x404099
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret
Function at 0x404c24
Capabilities:
Check if file exists
Identify system language via api

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x412124]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor eax, eax
push edi
mov word [ebp - 0x10], ax
mov word [ebp - 0xe], ax
mov word [ebp - 0xc], ax
mov word [ebp - 0xa], ax
mov word [ebp - 8], ax
mov edi, 0x104
push edi
lea eax, [ebp - 0x218]
xor ebx, ebx
push eax
push ebx
mov dword [0x413d6c], ebx
mov dword [ebp - 0x220], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, ebx
jne 0x404c94
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x404d99
and eax, 0xffff
or eax, 0x80070000
jmp 0x404d99
cmp eax, edi
jne 0x404ca2
mov eax, 0x8007007a
jmp 0x404d99
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.0040f97b
pop ecx
pop ecx
cmp eax, ebx
jne 0x404cc0
mov eax, 0x8000ffff
jmp 0x404d99
inc eax
push esi
inc eax
lea esi, [ebp - 0x220]
mov dword [ebp - 0x21c], eax
call fcn.00404dcc
test eax, eax
jl 0x404cf8
mov eax, dword [ebp - 0x220]
test ax, ax
je 0x404cf8
mov word [ebp - 0x10], ax
and eax, 0x3ff
or eax, 0x400
push 2
mov word [ebp - 0xe], ax
pop ebx
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov word [ebp + ebx*2 - 0x10], ax
inc ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
movzx eax, ax
mov word [ebp + ebx*2 - 0x10], ax
inc ebx
mov eax, 0x409
mov word [ebp + ebx*2 - 0x10], ax
inc ebx
cmp ebx, 5
jbe 0x404d2a
mov eax, 0x8000ffff
jmp 0x404d98
mov eax, dword [ebp - 0x21c]
lea ecx, [ebp - 0x218]
sub eax, ecx
sar eax, 1
mov esi, edi
sub esi, eax
xor edi, edi
test ebx, ebx
jle 0x404d93
movzx eax, word [ebp + edi*2 - 0x10]
push 0x40312c
push eax
push 0x403204
push esi
push esi
push dword [ebp - 0x21c]
call fcn.0040f9ac
add esp, 0x18
test eax, eax
jl 0x404da7
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x404dae
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404d8e
cmp eax, 3
je 0x404d8e
cmp eax, 0x7e
jne 0x404db7
inc edi
cmp edi, ebx
jl 0x404d44
mov eax, 0x80004005
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004052d5
leave
ret
mov eax, 0x8007007a
jmp 0x404d98
mov dword [0x413d6c], eax
xor eax, eax
jmp 0x404d98
test eax, eax
jle 0x404d98
and eax, 0xffff
or eax, 0x80070000
jmp 0x404d98
Function at 0x404e23
Capabilities:
Check if file exists
Load windows common language runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
test esi, esi
je 0x404e66
and dword [esi], 0
and dword [ebp - 4], 0
push edi
push 0x402b88
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x404e74
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404e6d
cmp eax, 0x7e
je 0x404e6d
test eax, eax
jle 0x404e62
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x404ea8
mov eax, 0x80004003
leave
ret
mov edi, 0x80040641
jmp 0x404ea8
push 0x403230
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x404e89
xor edi, edi
inc edi
jmp 0x404ea8
lea ecx, [ebp - 4]
push ecx
push 0x403258
push 0x402b78
call eax
mov edi, eax
test edi, edi
jl 0x404ea8
mov eax, dword [ebp - 4]
and dword [ebp - 4], 0
mov dword [esi], eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x404eb5
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, edi
pop edi
leave
ret

Function at 0x4052d5
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x412124]
jne 0x4052df
repz ret
jmp fcn.00406dcf

Function at 0x409b4a
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00406514
and dword [ebp - 4], 0
cmp dword [0x413a1c], 0
mov ebx, eax
jne 0x409bfb
push 0x401990
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x409cac
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x401984
push edi
call esi
test eax, eax
je 0x409cac
push eax
call fcn.0040649d
mov dword [esp], 0x401974
push edi
mov dword [0x413a1c], eax
call esi
push eax
call fcn.0040649d
mov dword [esp], 0x401960
push edi
mov dword [0x413a20], eax
call esi
push eax
call fcn.0040649d
mov dword [esp], 0x401944
push edi
mov dword [0x413a24], eax
call esi
push eax
call fcn.0040649d
pop ecx
mov dword [0x413a2c], eax
test eax, eax
je 0x409bfb
push 0x40192c
push edi
call esi
push eax
call fcn.0040649d
pop ecx
mov dword [0x413a28], eax
mov eax, dword [0x413a28]
cmp eax, ebx
je 0x409c53
cmp dword [0x413a2c], ebx
je 0x409c53
push eax
call fcn.00406522
push dword [0x413a2c]
mov esi, eax
call fcn.00406522
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x409c53
test edi, edi
je 0x409c53
call esi
test eax, eax
je 0x409c4a
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x409c4a
test byte [ebp - 0xc], 1
jne 0x409c53
or dword [ebp + 0x10], 0x200000
jmp 0x409c8c
mov eax, dword [0x413a20]
cmp eax, ebx
je 0x409c8c
push eax
call fcn.00406522
pop ecx
test eax, eax
je 0x409c8c
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x409c8c
mov eax, dword [0x413a24]
cmp eax, ebx
je 0x409c8c
push eax
call fcn.00406522
pop ecx
test eax, eax
je 0x409c8c
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x413a1c]
call fcn.00406522
pop ecx
test eax, eax
je 0x409cac
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x409cae
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401100
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
push edi
call fcn.00448048
jmp loc.005f476f

Function at 0x408dd8
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 0x408df9
jl 0x408df0
test edi, edi
jne 0x408df9
xor eax, eax
xor edx, edx
jmp 0x408eba
cmp dword [ebx + 0x38], 0
je 0x408e0e
push eax
push edi
push dword [ebp + 8]
call fcn.00408ec0
jmp 0x408eba
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x408e55
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x408e55
cmp eax, edi
jb 0x408e2f
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.0040a570
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 0x408e5b
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x408eaf
mov ecx, ebx
call fcn.00408627
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x408e9a
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.00411b57
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 0x408eaf
jmp 0x408e6d
test edx, edx
je 0x408eaf
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.00411b57
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 0x40a3ba
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.0040a520
mov eax, dword [0x432040]
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.00418607
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x41b2f5
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x41b46c
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004256c0
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 + 0x433970]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0041c2f9
mov ecx, dword [esi*4 + 0x433970]
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 0x41b465
cmp eax, dword [edi + ecx + 0x24]
jne 0x41b465
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 0x41b465
push dword [ebp - 0x100c]
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041c2f9
add esp, 0x14
cmp edx, esi
jl 0x41b465
jg 0x41b3c0
cmp eax, esi
jb 0x41b465
mov ebx, dword [ebp - 0x1014]
mov eax, dword [ebp - 0x101c]
cmp ebx, esi
jg 0x41b465
jl 0x41b3e2
cmp dword [ebp - 0x1008], eax
ja 0x41b465
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 0x41b407
cmp ebx, esi
je 0x41b44c
mov edx, dword [ebp - 0x1014]
mov esi, dword [ebp - 0x1018]
cmp ecx, edi
jae 0x41b44c
mov al, byte [ecx]
cmp al, 0xd
jne 0x41b42d
lea eax, [edi - 1]
cmp ecx, eax
jae 0x41b439
cmp byte [ecx + 1], 0xa
jne 0x41b439
inc ecx
jmp 0x41b439
movzx eax, al
movsx eax, byte [eax + 0x432308]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41b413
cmp edx, ebx
jne 0x41b413
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x1020]
jmp 0x41b46a
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004095d5
leave
ret
Function at 0x41b6eb
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 0x41b705
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 0x41b71c
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x41b774
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.0041e345
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x41b774
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 0x41b774
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x41b774
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x41b76e
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x41b770
xor bl, bl
mov al, bl
jmp 0x41b776
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x41b785
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 + 0x433970]
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 0x41b7c7
cmp byte [ebx], 0xa
jne 0x41b7c7
or byte [edi + eax + 0x28], 4
jmp 0x41b7cc
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x41b8cf
mov cl, byte [eax]
cmp cl, 0x1a
je 0x41b8aa
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x41b7fb
mov eax, dword [ebp - 8]
jmp 0x41b81b
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x41b837
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x41b815
add eax, 2
mov cl, 0xa
jmp 0x41b818
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 0x41b7dd
jmp 0x41b8cf
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 0x41b8a5
cmp dword [ebp - 0x10], 0
je 0x41b8a5
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x433970]
test byte [eax + edi + 0x28], 0x48
je 0x41b884
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x41b874
mov byte [esi], 0xa
jmp 0x41b8ce
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x433970]
mov byte [eax + edi + 0x2a], cl
jmp 0x41b8ce
cmp byte [ebp - 1], 0xa
jne 0x41b88e
cmp esi, ebx
je 0x41b86f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041c317
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41b8cf
mov byte [esi], 0xd
jmp 0x41b8ce
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x433970]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x41b8cc
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x41b8cf
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41b8d8
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
and eax, 0x3f
push ebx
mov ebx, dword [ebp + 0xc]
sar edx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [edx*4 + 0x433970]
mov dword [ebp - 8], edx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x41b91c
push 0xa
pop esi
cmp word [ebx], si
jne 0x41b91c
or byte [eax + edi + 0x28], 4
jmp 0x41b921
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + edx*2]
mov eax, ebx
mov dword [ebp - 0x10], edx
mov esi, ebx
cmp ebx, edx
jae 0x41ba8c
movzx edx, word [eax]
mov ecx, edx
mov dword [ebp - 0xc], ecx
movzx ecx, cx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
cmp edx, 0x1a
je 0x41ba64
lea ebx, [eax + 2]
mov dword [ebp - 4], ebx
push 0xd
pop ebx
cmp dx, bx
mov ebx, dword [ebp + 0xc]
je 0x41b96e
mov ebx, dword [ebp - 0x14]
mov edx, esi
mov eax, dword [ebp - 4]
movzx ebx, bx
mov dword [ebp - 4], ebx
jmp 0x41b998
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x41b9b7
push 0xa
pop ebx
cmp word [edx], bx
jne 0x41b985
push ebx
add eax, 4
pop edx
jmp 0x41b98d
mov eax, edx
mov edx, dword [ebp - 0xc]
movzx edx, dx
movzx edx, dx
mov dword [ebp - 4], edx
mov edx, esi
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], 2
mov word [esi], cx
mov esi, dword [ebp - 0xc]
add esi, edx
cmp eax, dword [ebp - 0x10]
jb 0x41b933
jmp 0x41ba8c
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41ba5f
cmp dword [ebp - 0x14], 0
je 0x41ba5f
mov eax, dword [ebp - 8]
push 0xa
mov eax, dword [eax*4 + 0x433970]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x41ba3b
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x41ba03
mov word [esi], ax
jmp 0x41ba89
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebp - 8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov eax, dword [eax*4 + 0x433970]
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x433970]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x433970]
pop ecx
mov byte [eax + edi + 0x2c], cl
jmp 0x41ba89
cmp word [ebp - 4], ax
jne 0x41ba45
cmp esi, ebx
je 0x41b9fb
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041c317
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x41ba8c
push 0xd
pop eax
jmp 0x41b9fb
mov eax, ecx
and ecx, 0x3f
sar eax, 6
imul ecx, ecx, 0x38
mov edi, dword [eax*4 + 0x433970]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x41ba86
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x41ba8c
mov word [esi], dx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret