joyce8/EMBER2024-capa huggingface dataset:
Function at 0x101a3ef8
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x101a3f42
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x101a3ee9
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x101a3ef8
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x105a9b9b
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x101a3f49
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.1018adbf
cmp eax, dword [ebp + 0xc]
pop eax
je 0x101a3fe8
add edi, 4
add eax, 2
dec ecx
jne 0x101a3f2e
call 0x101a3f95
loope 0x101a3f8b
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x101a3fe5
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x101a3ff6
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x101a3fa9
cmp eax, ecx
ja 0x101a3fa9
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x101a4033
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x101a4029
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.1018b29e
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x402b88
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.0040404c
test esi, esi
jne 0x402bbf
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.0040413c
jmp 0x402be0
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402a24
mov dword [esp], eax
test esi, esi
je 0x402be0
cmp dword [ebx], 0
je 0x402be0
dec esi
jmp 0x402bc7
add esp, 0x10c
pop esi
pop ebx
ret

Function at 0x403154
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x420008], 0x8088405
inc edx
mov dword [ebx + 0x420008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x403e44
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x422038], 0
je 0x403ea5
cmp word [0x42220c], 0xd7b2
jne 0x403e6d
cmp dword [0x422214], 0
jbe 0x403e6d
mov eax, 0x422208
call dword [0x422224]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x420064
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403ecc
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x420024], 0
jne 0x403ec1
push 0
push 0x42005c
push 0x420064
push 0
call fcn.004010e0
pop edx
ret

Function at 0x404000
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402894
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x422039], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x403fc8
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x404e60
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x404ec6
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00404264
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.004033ac
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x404eb0
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404ecd
lea eax, [ebp - 0x10]
call fcn.0040404c
ret
Function at 0x4079bc
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push esi
push edi
mov ebx, eax
push ebp
push ecx
mov esi, dword [ebx + 0x28]
mov edi, dword [ebx + 0x38]
sub edi, dword [ebx + 0x70]
sub edi, dword [ebx + 0x68]
jmp 0x4079eb
mov eax, dword [ebx + 0x28]
sub eax, 0x106
add eax, esi
cmp eax, dword [ebx + 0x68]
ja 0x407a6a
push esi
mov eax, dword [ebx + 0x34]
mov edx, eax
mov ebp, esi
add edx, ebp
push edx
push eax
call fcn.0040662c
add esp, 0xc
sub dword [ebx + 0x6c], esi
sub dword [ebx + 0x68], esi
sub dword [ebx + 0x58], ebp
mov eax, dword [ebx + 0x48]
mov edx, eax
add edx, edx
add edx, dword [ebx + 0x40]
sub edx, 2
movzx ecx, word [edx]
mov dword [esp], ecx
cmp esi, dword [esp]
ja 0x407a38
mov cx, word [esp]
sub cx, si
jmp 0x407a3a
xor ecx, ecx
mov word [edx], cx
dec eax
jne 0x407a21
mov eax, esi
mov edx, eax
add edx, edx
add edx, dword [ebx + 0x3c]
sub edx, 2
movzx ecx, word [edx]
mov dword [esp], ecx
cmp esi, dword [esp]
ja 0x407a60
mov cx, word [esp]
sub cx, si
jmp 0x407a62
xor ecx, ecx
mov word [edx], cx
dec eax
jne 0x407a49
add edi, esi
mov ebp, dword [ebx]
cmp dword [ebp + 4], 0
je 0x407ac7
mov edx, dword [ebx + 0x34]
mov ecx, edi
add edx, dword [ebx + 0x68]
mov eax, ebp
add edx, dword [ebx + 0x70]
call fcn.004076ac
add dword [ebx + 0x70], eax
cmp dword [ebx + 0x70], 3
jb 0x407ab2
mov eax, dword [ebx + 0x34]
mov edx, dword [ebx + 0x68]
movzx eax, byte [eax + edx]
mov dword [ebx + 0x44], eax
mov ecx, dword [ebx + 0x54]
shl eax, cl
mov edx, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x68]
movzx edx, byte [edx + ecx + 1]
xor eax, edx
and eax, dword [ebx + 0x50]
mov dword [ebx + 0x44], eax
cmp dword [ebx + 0x70], 0x106
jae 0x407ac7
mov eax, dword [ebx]
cmp dword [eax + 4], 0
jne 0x4079c6
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebx
push esi
push ecx
mov dword [esp], edx
mov edx, ecx
dec edx
test edx, edx
jl 0x40c10d
inc edx
xor ecx, ecx
mov ebx, dword [esp]
movzx ebx, byte [ebx + ecx]
xor ebx, dword [eax]
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x4217cc]
mov esi, dword [eax]
shr esi, 8
and esi, 0xffffff
xor ebx, esi
mov dword [eax], ebx
inc ecx
dec edx
jne 0x40c0e4
pop edx
pop esi
pop ebx
ret

Function at 0x416fb4
Capabilities:
Hash data with md5

Disassembly:
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
xor edx, edx
mov dword [eax + 0x10], edx
xor edx, edx
mov dword [eax + 0x14], edx
add eax, 0x18
mov edx, 0x40
call fcn.00405668
ret
Function at 0x41762c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404480
xor eax, eax
push ebp
push 0x4176ad
push dword fs:[eax]
mov dword fs:[eax], esp
nop
nop
nop
nop
nop
mov eax, dword [ebp - 4]
call fcn.00404290
mov ebx, eax
test ebx, ebx
jle 0x41768d
mov edi, 1
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
mov dl, byte [edx + edi - 1]
xor dl, 0x78
call fcn.00404218
mov edx, dword [ebp - 8]
mov eax, esi
call fcn.00404298
inc edi
dec ebx
jne 0x41766d
nop
nop
nop
nop
nop
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4176b4
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404070
ret

Function at 0x418880
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffebc
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404480
xor eax, eax
push ebp
push 0x4189f5
push dword fs:[eax]
mov dword fs:[eax], esp
nop
nop
nop
nop
nop
mov eax, dword [ebp - 4]
call fcn.00416208
test al, al
jne 0x4188bf
mov byte [ebp - 5], 0
jmp 0x4189df
xor eax, eax
push ebp
push 0x4189d3
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4189af
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
mov ecx, dword [ebp - 4]
mov dl, 1
mov eax, dword [0x4136d0]
call fcn.00414608
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
call fcn.00414164
cmp edx, 0
jne 0x418905
cmp eax, 0x1000
jae 0x41891d
jmp 0x418907
jge 0x41891d
mov byte [ebp - 5], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00403a70
jmp 0x4189df
lea edx, [ebp - 0x4c]
mov ecx, 0x40
mov eax, dword [ebp - 0xc]
call fcn.004142ec
cmp word [ebp - 0x4c], 0x5a4d
je 0x41894b
mov byte [ebp - 5], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00403a70
jmp 0x4189df
xor ecx, ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x10]
lea edx, [ebp - 0x144]
mov ecx, 0xf8
mov eax, dword [ebp - 0xc]
call fcn.004142ec
cmp dword [ebp - 0x144], 0x4550
je 0x41898a
mov byte [ebp - 5], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00403a70
jmp 0x4189df
mov ax, word [ebp - 0x12e]
and ax, 0x2000
cmp ax, 0x2000
jne 0x4189a1
mov byte [ebp - 5], 2
jmp 0x4189a5
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4189bd
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4189da
mov eax, dword [ebp - 0xc]
call fcn.00403608
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4189fc
lea eax, [ebp - 4]
call fcn.0040404c
ret
Function at 0x419024
Capabilities:
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
nop
nop
nop
nop
nop
call fcn.004052e0
push eax
call fcn.00405338
mov ebx, eax
call fcn.004052e8
push eax
call fcn.00405358
mov esi, eax
push pe_nt_image_headers32
call fcn.004052e0
push eax
mov eax, dword [0x421df8]
mov eax, dword [eax]
call eax
push 0xf
call fcn.004052e8
push eax
call fcn.004053f0
push 0xa
mov eax, dword [0x421e5c]
mov eax, dword [eax]
call eax
rdtsc
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
push 0x1f4
call dword [0x4226fc]
rdtsc
sub eax, dword [ebp - 4]
sbb edx, dword [ebp - 8]
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
push esi
call fcn.004052e8
push eax
call fcn.004053f0
push ebx
call fcn.004052e0
push eax
mov eax, dword [0x421df8]
mov eax, dword [eax]
call eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x14], eax
fild qword [ebp - 0x18]
fld dword [0x4190ec]
call fcn.00402fd0
call fcn.00402c2c
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
nop
nop
nop
nop
nop
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x41e704
Capabilities:
Acquire debug privileges

Disassembly:
push ebx
add esp, 0xffffffdc
nop
nop
nop
nop
nop
push esp
push 0x28
call fcn.004052e0
push eax
mov eax, dword [0x421e18]
mov eax, dword [eax]
call eax
test eax, eax
jne 0x41e725
xor ebx, ebx
lea eax, [esp + 8]
push eax
push 0x41e7a4
push 0
call fcn.00405218
test eax, eax
jne 0x41e749
mov eax, dword [esp]
push eax
mov eax, dword [0x421d60]
mov eax, dword [eax]
call eax
xor ebx, ebx
mov dword [esp + 0x14], 1
mov eax, dword [esp + 8]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 2
lea eax, [esp + 0x10]
push eax
push 0
push 0x10
lea eax, [esp + 0x20]
push eax
push 0
mov eax, dword [esp + 0x14]
push eax
call fcn.00405208
test eax, eax
jne 0x41e796
mov eax, dword [esp]
push eax
mov eax, dword [0x421d60]
mov eax, dword [eax]
call eax
xor ebx, ebx
nop
nop
nop
nop
nop
mov eax, ebx
add esp, 0x24
pop ebx
ret
Function at 0x40355d
Capabilities:
Terminate process

Disassembly:
jmp 0x458cd4
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x458ce5
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.004057ea
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x40367f
Capabilities:
Query environment variable

Disassembly:
jmp 0x4a1791
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4a17a2
pop esi
ret
push ebx
push edi
push esi
call fcn.004a1678
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403f17
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4a17ca
push ebx
push esi
push edi
call fcn.004055dd
add esp, 0xc
push 0
call fcn.00406113
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x40569b
Capabilities:
Parse pe header

Disassembly:
jmp 0x447ecb
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x447f0a
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x447f0a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x447f0a
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x447f0a
cmp dword [ecx + 0x74], 0xe
jbe 0x447f0a
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x445bbb
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
call fcn.004036e3
mov eax, dword [eax + 0x14]
test eax, eax
je 0x445bfe
and dword [ebp - 4], 0
lea ecx, [ebp - 4]
push 2
push ecx
push 0x22
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
movzx eax, word [ebp - 4]
sub eax, 0x30
je 0x445bfe
sub eax, 1
je 0x445bf9
sub eax, 1
je 0x445bf5
xor eax, eax
leave
ret
push 3
jmp 0x445c00
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret

Function at 0x48c565
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401d61
mov eax, dword [0x4d1040]
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.00405d30
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x49b578
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x49b6d4
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00405e75
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x4d4858]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00403206
mov ecx, dword [esi*4 + 0x4d4858]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x49b6cd
cmp eax, dword [ecx + edi + 0x24]
jne 0x49b6cd
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49b6cd
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00403206
add esp, 0x14
test edx, edx
jl 0x49b6cd
jg 0x49b643
test eax, eax
jb 0x49b6cd
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x49b6cd
jl 0x49b65d
cmp dword [ebp - 0x1008], eax
ja 0x49b6cd
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x49b67b
test ebx, ebx
je 0x49b6b4
cmp ecx, edi
jae 0x49b6b4
mov al, byte [ecx]
cmp al, 0xd
jne 0x49b695
lea eax, [edi - 1]
cmp ecx, eax
jae 0x49b6a1
cmp byte [ecx + 1], 0xa
jne 0x49b6a1
inc ecx
jmp 0x49b6a1
movzx eax, al
movsx eax, byte [eax + 0x4d13a8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x49b67b
cmp edx, ebx
jne 0x49b67b
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x49b6d2
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00402fea
leave
ret
Function at 0x49be13
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 + 0x4d4858]
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 0x49be53
cmp byte [ebx], 0xa
jne 0x49be53
or byte [edi + eax + 0x28], 4
jmp 0x49be58
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 0x49bf57
mov dl, byte [eax]
cmp dl, 0x1a
je 0x49bf3a
inc eax
cmp dl, 0xd
je 0x49be84
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x49beaa
cmp eax, ecx
jae 0x49beb8
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 0x49be6c
jmp 0x49bf57
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 0x49bf35
cmp dword [ebp - 0x10], 0
je 0x49bf35
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4d4858]
test byte [eax + edi + 0x28], 0x48
je 0x49bf0f
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x49befa
mov byte [esi], dl
jmp 0x49bf0b
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4d4858]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x49bf57
cmp byte [ebp - 1], 0xa
jne 0x49bf1e
cmp esi, ebx
jne 0x49bf1e
mov byte [esi], 0xa
jmp 0x49bf56
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00401906
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x49bf57
mov byte [esi], 0xd
jmp 0x49bf56
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4d4858]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x49bf54
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x49bf57
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x49bfb3
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 + 0x4d4858]
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 0x49bff9
cmp word [ebx], dx
jne 0x49bff9
or byte [eax + edi + 0x28], 4
jmp 0x49bffe
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 0x49c161
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 0x49c141
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x49c03f
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x49c075
cmp eax, edx
jae 0x49c083
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 0x49c01a
jmp 0x49c161
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 0x49c13c
cmp dword [ebp - 0x18], 0
je 0x49c13c
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4d4858]
test byte [eax + edi + 0x28], 0x48
je 0x49c112
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 0x49c0d6
mov word [esi], cx
jmp 0x49c10d
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4d4858]
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 + 0x4d4858]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4d4858]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x49c161
pop eax
cmp word [ebp - 4], ax
jne 0x49c122
cmp esi, ebx
jne 0x49c122
mov word [esi], ax
jmp 0x49c15e
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00401906
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x49c161
push 0xd
pop eax
jmp 0x49c11d
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4d4858]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x49c15b
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x49c161
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret