joyce8/EMBER2024-capa huggingface dataset:
Function at 0x462ff0
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x490f96
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14c
mov eax, dword [0xbde150]
push ebx
push esi
mov ebx, ecx
mov dword [esp + 8], eax
mov dword [esp + 0x15c], 0
mov dword [esp + 0xc], eax
mov esi, dword [esp + 0x164]
lea ecx, [esp + 0xc]
push esi
mov byte [esp + 0x160], 1
call fcn.00480e3f
push str..
lea ecx, [esp + 0x10]
call fcn.00481092
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x463093
lea ecx, [esp + 0xc]
mov byte [esp + 0x15c], 0
call fcn.00480cb6
lea ecx, [esp + 8]
mov dword [esp + 0x15c], 0xffffffff
call fcn.00480cb6
xor eax, eax
jmp 0x4631d8
push ebp
mov ebp, dword [esp + 0x16c]
push edi
mov edi, dword [esp + 0x174]
lea edx, [esp + 0x48]
push 0xbdc264
push edx
call fcn.00470864
add esp, 8
test eax, eax
je 0x463189
lea eax, [esp + 0x48]
push 0xbdc260
push eax
call fcn.00470864
add esp, 8
test eax, eax
je 0x463189
test ebp, ebp
jne 0x4630f5
lea ecx, [esp + 0x48]
push str.desktop.ini
push ecx
call fcn.00470913
add esp, 8
test eax, eax
je 0x463189
push esi
lea ecx, [esp + 0x14]
call fcn.00480e3f
push 0x5c
lea ecx, [esp + 0x14]
call fcn.004810b9
lea edx, [esp + 0x48]
lea ecx, [esp + 0x10]
push edx
call fcn.00481092
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x463135
mov ecx, dword [esp + 0x10]
and al, 0xfe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test byte [esp + 0x1c], 0x10
je 0x463157
mov edx, dword [esp + 0x10]
push edi
push ebp
push edx
mov ecx, ebx
call fcn.00462ff0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x463189
test edi, edi
je 0x46317e
lea ecx, [esp + 0x48]
push str.index.dat
push ecx
call fcn.00470913
add esp, 8
test eax, eax
jne 0x46317e
lea edx, [esp + 0x48]
mov ecx, ebx
push edx
push esi
call fcn.00463200
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4630a3
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x14]
mov byte [esp + 0x164], 0
call fcn.00480cb6
lea ecx, [esp + 0x10]
mov dword [esp + 0x164], 0xffffffff
call fcn.00480cb6
pop edi
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x154]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x158
ret 0xc
Function at 0x463200
Capabilities:
Get file size
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x490fab
push eax
mov eax, 0x2718
mov dword fs:[0], esp
call fcn.00471120
mov eax, dword [0xbde150]
push edi
mov dword [esp + 4], eax
mov ecx, 0x9c4
xor eax, eax
lea edi, [esp + 0xc]
mov dword [esp + 0x2724], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x272c]
push ecx
lea ecx, [esp + 8]
call fcn.00480e3f
push 0x5c
lea ecx, [esp + 8]
call fcn.004810b9
mov edx, dword [esp + 0x2730]
lea ecx, [esp + 4]
push edx
call fcn.00481092
mov eax, dword [esp + 4]
push 0
push 0x80
push 3
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4632a6
lea ecx, [esp + 4]
mov dword [esp + 0x2724], eax
call fcn.00480cb6
xor eax, eax
jmp 0x463323
push ebx
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0
mov esi, eax
push 0x40
push edi
sub esi, 0x40
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
jbe 0x463301
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, 0x2710
push 0
jbe 0x4632f3
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push 0x2710
push edx
push edi
call ebx
sub esi, 0x2710
jne 0x4632cd
jmp 0x463301
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push esi
push ecx
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0xc]
mov dword [esp + 0x272c], 0xffffffff
call fcn.00480cb6
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x271c]
pop edi
mov dword fs:[0], ecx
add esp, 0x2724
ret 8

Function at 0x483146
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x48317e
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0048115d
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00481135
jmp 0x48318a
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x484834
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x484876
call fcn.0048a522
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x484876
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x48486d
xor eax, eax
jmp 0x48487e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00484884
pop edi
pop esi
pop ebx
ret 4
Function at 0x48aa52
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x48aa80
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x48aa9e
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0048a9b8
jmp 0x48aa9e
mov eax, dword [esi + 0x14]
test eax, eax
je 0x48aa9e
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0048a9b8
test edi, edi
mov eax, edi
jne 0x48aa88
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
push 4
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x433072
nop
mov ebx, 0x40de38
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x1f4e1746
nop
nop
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
nop
loop 0x433060
nop
nop
nop
nop
mov eax, section..data
nop
nop
nop
cmp eax, 0
je 0x4330d2
nop
nop
nop
nop
nop
mov ebx, 0x4304d8
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x39616f79
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
loop 0x4330c0
nop
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x401000
Capabilities:
Set registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
lea eax, [esp]
push esi
lea ecx, [esp + 0xc]
xor esi, esi
push eax
push ecx
push esi
push 0xf003f
push esi
push esi
push esi
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x401059
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push 4
push eax
push 4
push esi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40104e
mov esi, 1
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ecx
ret

Function at 0x401060
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10c
push ebp
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x14]
xor ebp, ebp
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x118]
lea eax, [esp + 8]
push eax
push 0xf003f
push ebp
push ecx
push 0x80000002
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], 0x100
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401120
lea edx, [esp + 0xc]
lea eax, [esp + 0x14]
push edx
mov edx, dword [esp + 0x120]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x10]
push ecx
push ebp
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401115
push ebx
push esi
mov esi, dword [esp + 0x128]
lea eax, [esp + 0x1c]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x401105
test cl, cl
je 0x401101
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x401105
add eax, 2
add esi, 2
test cl, cl
jne 0x4010dd
xor eax, eax
jmp 0x40110a
sbb eax, eax
sbb eax, 0xffffffff
pop esi
pop ebx
test eax, eax
jne 0x401115
mov ebp, 1
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebp
pop edi
pop ebp
add esp, 0x10c
ret

Function at 0x401130
Capabilities:
Set registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
lea eax, [esp]
push esi
lea ecx, [esp + 0xc]
xor esi, esi
push eax
push ecx
push esi
push 0xf003f
push esi
push esi
push esi
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x401189
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push 0x40
push eax
push 1
push esi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40117e
mov esi, 1
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ecx
ret
Function at 0x401190
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
sub esp, 0x10c
push ebx
push ebp
mov ebp, dword [esp + 0x118]
push esi
push edi
push str.FILE
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x401201
mov edi, str.c:windows_system32
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40705c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x20]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 2
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push eax
push eax
and ecx, 3
lea eax, [esp + 0x30]
push 0x40000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
jne 0x40128e
push str.CreateFile_Failed__n
call fcn.004016f0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
lea ecx, [esp + 0x18]
push 0
push ecx
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [esp + 0x1c]
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4012ce
lea eax, [esp + 0x1c]
push eax
push str.WriteFile__s_Failed___n
call fcn.004016f0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10c
ret
Function at 0x402ded
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x407700
cmp edx, dword [eax]
je 0x402e0f
add eax, 8
inc ecx
cmp eax, 0x407790
jl 0x402e00
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x407700]
jne 0x402f3d
mov eax, dword [0x407c58]
cmp eax, 1
je 0x402f17
test eax, eax
jne 0x402e40
cmp dword [0x4073c8], 1
je 0x402f17
cmp edx, 0xfc
je 0x402f3d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x402e77
lea eax, [ebp - 0x1a4]
push 0x406448
push eax
call fcn.00403660
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004030f0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x402eba
lea eax, [ebp - 0x1a4]
push eax
call fcn.004030f0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x406444
push edi
call fcn.00404740
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x406428
push eax
call fcn.00403660
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00403670
lea eax, [ebp - 0xa0]
push 0x406424
push eax
call fcn.00403670
push dword [esi + 0x407704]
lea eax, [ebp - 0xa0]
push eax
call fcn.00403670
push 0x12010
lea eax, [ebp - 0xa0]
push 0x4063fc
push eax
call fcn.004046ae
add esp, 0x2c
pop edi
jmp 0x402f3d
lea eax, [ebp + 8]
lea esi, [esi + 0x407704]
push 0
push eax
push dword [esi]
call fcn.004030f0
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 0x403670
Capabilities:
Terminate process

Disassembly:
jmp 0x4540f9
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x45410a
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.004059e3
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 0x4037a1
Capabilities:
Query environment variable

Disassembly:
jmp 0x49d692
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49d6a3
pop esi
ret
push ebx
push edi
push esi
call fcn.0049d579
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00404075
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49d6cb
push ebx
push esi
push edi
call fcn.004057d1
add esp, 0xc
push 0
call fcn.00406343
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x40588f
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401dc0
mov eax, dword [0x5079d0]
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.00405f42
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x493925
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x493a81
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0040609b
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 + 0x50b658]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004032e7
mov ecx, dword [esi*4 + 0x50b658]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x493a7a
cmp eax, dword [edi + ecx + 0x24]
jne 0x493a7a
push 0
lea eax, [ebp - 0x1014]
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 0x493a7a
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004032e7
add esp, 0x14
test edx, edx
jl 0x493a7a
jg 0x4939f0
test eax, eax
jb 0x493a7a
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x493a7a
jl 0x493a0a
cmp dword [ebp - 0x1008], eax
ja 0x493a7a
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x493a28
test ebx, ebx
je 0x493a61
cmp ecx, edi
jae 0x493a61
mov al, byte [ecx]
cmp al, 0xd
jne 0x493a42
lea eax, [edi - 1]
cmp ecx, eax
jae 0x493a4e
cmp byte [ecx + 1], 0xa
jne 0x493a4e
inc ecx
jmp 0x493a4e
movzx eax, al
movsx eax, byte [eax + 0x507d08]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x493a28
cmp edx, ebx
jne 0x493a28
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x493a7f
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004030c1
leave
ret
Function at 0x4941c0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
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 + 0x50b658]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x494200
cmp byte [ebx], 0xa
jne 0x494200
or byte [eax + edi + 0x28], 4
jmp 0x494205
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x494303
mov al, byte [edx]
cmp al, 0x1a
je 0x4942e5
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x494234
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x494259
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x494263
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x494216
jmp 0x494303
push 0
lea eax, [ebp - 0xc]
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 0x4942e0
cmp dword [ebp - 0xc], 0
je 0x4942e0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x50b658]
test byte [eax + edi + 0x28], 0x48
je 0x4942ba
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4942a5
mov byte [esi], dl
jmp 0x4942b6
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x50b658]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x494303
cmp byte [ebp - 1], 0xa
jne 0x4942c9
cmp esi, ebx
jne 0x4942c9
mov byte [esi], 0xa
jmp 0x494302
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00401951
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x494303
mov byte [esi], 0xd
jmp 0x494302
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x50b658]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4942ff
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x494303
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x49435f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x50b658]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4943a2
cmp word [esi], dx
jne 0x4943a2
or byte [edi + eax + 0x28], 4
jmp 0x4943a7
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4944fa
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4944da
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4943e9
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x49441f
cmp eax, edx
jae 0x49442b
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
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 - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4943c1
jmp 0x4944fa
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 0x4944d6
cmp dword [ebp - 0x14], 0
je 0x4944d6
mov eax, dword [ebx*4 + 0x50b658]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4944ae
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x494477
mov word [esi], cx
jmp 0x4944aa
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x50b658]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x50b658]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x50b658]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4944fa
pop ebx
cmp word [ebp - 4], bx
jne 0x4944bf
cmp esi, dword [ebp + 0xc]
jne 0x4944bf
mov word [esi], bx
jmp 0x4944f7
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00401951
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4944fa
push 0xd
jmp 0x4944f3
mov ecx, dword [ebx*4 + 0x50b658]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4944f1
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4944fa
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret