joyce8/EMBER2024-capa huggingface dataset:
Function at 0x476430
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bdb9d
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x6441a4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [ebp + 8], 2
mov edi, 0xc0000000
mov eax, dword [ebp + 0x20]
mov ecx, closesocket
setne bl
mov dword [ebp - 4], 0
cmovne edi, ecx
or eax, dword [ebp + 0x24]
je 0x476486
mov edx, 2
test bl, bl
je 0x47648b
mov edx, 3
test bl, bl
mov eax, 1
push 0
mov ecx, 0x100
cmovne ecx, eax
cmp byte [ebp + 0x60], 0
push ecx
push edx
push 0
push eax
push edi
je 0x4764bc
cmp dword [ebp + 0x5c], 8
lea eax, [ebp + 0x48]
cmovae eax, dword [ebp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4764ce
cmp dword [ebp + 0x44], 0x10
lea eax, [ebp + 0x30]
cmovae eax, dword [ebp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, eax
mov dword [esi + 0x70], ecx
cmp ecx, 0xffffffff
jne 0x4764e2
push str.failed_opening_file
jmp 0x4765c1
mov edx, dword [ebp + 0x20]
mov eax, edx
mov edi, dword [ebp + 0x24]
or eax, edi
je 0x476529
test bl, bl
jne 0x476529
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], edi
push eax
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x476512
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x47651f
push dword [esi + 0x70]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x476529
push str.failed_setting_file_size
jmp 0x4765c1
push 0x5c2200
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x5c2210
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [esi + 0x70]
test eax, eax
je 0x476580
lea edx, [ebp - 0x14]
push edx
push ecx
call eax
test eax, eax
je 0x4765bc
mov eax, dword [ebp - 0x10]
xor ecx, ecx
or ecx, dword [ebp - 0x14]
cdq
mov edx, dword [ebp + 0x18]
cmp edx, 0xffffffff
je 0x476571
test eax, eax
jg 0x47656d
jl 0x476571
cmp ecx, edx
jb 0x476571
mov ecx, edx
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [esi + 0x6c], 0
mov dword [esi + 0x68], ecx
jmp 0x4765c8
lea eax, [ebp - 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x4765bc
mov edx, dword [ebp + 0x18]
xor ecx, ecx
or ecx, eax
mov eax, dword [ebp - 0x10]
cmp edx, 0xffffffff
je 0x4765ad
test eax, eax
jg 0x4765a9
jl 0x4765ad
cmp ecx, edx
jb 0x4765ad
mov ecx, edx
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [esi + 0x6c], 0
mov dword [esi + 0x68], ecx
jmp 0x4765c8
push str.failed_querying_file_size
mov ecx, esi
call fcn.00475e70
lea ecx, [ebp + 0x30]
call fcn.00475d50
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x60
Function at 0x478710
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x478725
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x47874b
push dword [ebp + 0xc]
lea eax, [ebp - 8]
push esi
push eax
call fcn.00478550
add esp, 0xc
mov eax, dword [eax]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x478761
mov dword [edi], 0
call fcn.00473270
mov dword [edi + 4], eax
pop edi
test ebx, 0x400
je 0x478798
push esi
call fcn.00477ee0
add esp, 4
test al, al
je 0x47878d
test bl, 0x10
mov eax, 4
mov ecx, 0xb
pop esi
cmovne eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret
and ebx, 0x10
or ebx, 0x20
shr ebx, 4
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4789f0
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
push edi
cmp eax, 1
jne 0x478a1c
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x478aa2
mov dword [esi], 0
call fcn.00473270
mov dword [esi + 4], eax
xor al, al
pop edi
pop esi
pop ebp
ret
cmp eax, 3
je 0x478a3c
cmp eax, 0xb
je 0x478a3c
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x478a33
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x478a50
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x478a49
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x478a8a
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 2
je 0x478a8a
cmp eax, 3
je 0x478a8a
cmp eax, 0x7b
je 0x478a8a
cmp eax, 0xf
je 0x478a8a
cmp eax, 0x15
je 0x478a8a
cmp eax, 0x57
je 0x478a8a
cmp eax, 0xa1
je 0x478a8a
cmp eax, 0x35
je 0x478a8a
call edi
jmp 0x478a8c
xor eax, eax
push str.mars_boost::filesystem::remove
push dword [ebp + 0x10]
push esi
push eax
call fcn.00477d10
add esp, 0x10
test al, al
je 0x478aa8
pop edi
xor al, al
pop esi
pop ebp
ret
pop edi
mov al, 1
pop esi
pop ebp
ret
Function at 0x478b30
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x18
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x478b43
mov ecx, dword [eax]
push str.mars_boost::filesystem::space
push dword [ebp + 0x10]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
neg eax
sbb eax, eax
inc eax
push eax
call fcn.00477d10
mov edx, dword [ebp + 8]
add esp, 0x10
test al, al
jne 0x478bac
mov ecx, dword [ebp - 4]
xor eax, eax
add eax, dword [ebp - 8]
mov dword [edx + 8], eax
adc ecx, 0
xor eax, eax
add eax, dword [ebp - 0x10]
mov dword [edx + 0xc], ecx
mov ecx, dword [ebp - 0xc]
adc ecx, 0
mov dword [edx + 0x10], eax
xor eax, eax
mov dword [edx + 0x14], ecx
add eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
adc ecx, 0
mov dword [edx], eax
mov dword [edx + 4], ecx
mov eax, edx
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
mov dword [edx + 0x10], 0
movlpd qword [ebp - 0x18], xmm0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dword [edx + 0x14], 0
mov dword [edx + 8], 0
mov dword [edx + 0xc], 0
mov dword [edx], eax
mov eax, edx
mov dword [edx + 4], ecx
mov esp, ebp
pop ebp
ret
Function at 0x478bf0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5be05d
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x6441a4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov eax, edi
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2c], esi
cmp dword [edi + 0x14], 8
jb 0x478c31
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
jne 0x478c50
push esi
push edi
push ebx
call fcn.00478550
add esp, 0xc
jmp 0x478d96
test eax, 0x400
je 0x478d65
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x478c65
mov edx, dword [edi]
mov ecx, edx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x478c80
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00402460
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push 0x2000000
push 3
push 0
push 7
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x34], esi
mov edx, dword [ebp - 0x14]
mov dword [ebp - 4], 0
cmp edx, 8
jb 0x478d00
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x478cf6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x478db4
push edx
push ecx
call fcn.004ce396
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp esi, 0xffffffff
jne 0x478d28
push dword [ebp - 0x2c]
push edi
push ebx
call fcn.00478550
add esp, 0xc
jmp 0x478d96
push edi
call fcn.00477ee0
add esp, 4
test al, al
jne 0x478d54
mov eax, dword [ebp - 0x30]
push eax
push edi
call fcn.004781f0
add esp, 8
mov dword [ebx], 9
mov dword [ebx + 4], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x478d96
push esi
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x478d77
mov dword [esi], 0
call fcn.00473270
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x30]
mov esi, eax
push eax
push edi
call fcn.004781f0
xor ecx, ecx
mov dword [ebx + 4], eax
add esp, 8
and esi, 0x10
setne cl
add ecx, 2
mov dword [ebx], ecx
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cdf2e
mov esp, ebp
pop ebp
ret
call fcn.004d85d5
int3
Function at 0x47a3d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5be16d
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x6441a4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x644064]
cmp eax, 0xffffffff
jne 0x47a404
xor ebx, ebx
jmp 0x47a40d
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], 0
test ebx, ebx
je 0x47a4f6
mov eax, dword [ebx + 0x18]
test eax, eax
jne 0x47a430
cmp dword [ebx + 0xc], 0
je 0x47a4af
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x47a47c
mov eax, dword [esi + 4]
mov dword [ebx + 0xc], eax
mov ecx, dword [esi]
test ecx, ecx
je 0x47a462
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [esi]
mov ecx, edi
push 0
mov eax, dword [edi]
call dword [eax]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebx + 0xc]
test esi, esi
jne 0x47a437
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x47a426
mov esi, dword [ebx + 0x14]
mov esi, dword [esi]
mov ecx, dword [esi + 0x14]
test ecx, ecx
je 0x47a499
mov edx, dword [esi + 0x1c]
test edx, edx
je 0x47a499
mov eax, dword [ecx]
push edx
call dword [eax + 4]
push esi
lea ecx, [ebx + 0x14]
call fcn.004793b0
cmp dword [ebx + 0x18], 0
jne 0x47a480
xor eax, eax
jmp 0x47a422
push 0x4799a0
push 0x6484b8
call fcn.004797d0
mov eax, dword [0x644064]
add esp, 8
cmp eax, 0xffffffff
je 0x47a4d4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
or eax, 0xffffffff
lock xadd dword [ebx + 4], eax
jne 0x47a4f6
mov eax, dword [ebx]
mov ecx, ebx
push 0
call dword [eax]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x47aaf0
Capabilities:
Enumerate threads

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5be225
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x6441a4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
push 0x14
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
call fcn.004ce3cc
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
push esi
push 4
mov dword [ebp - 0x3c], esi
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x47ab9d
push 0x14
mov dword [edi], eax
mov dword [edi + 4], eax
call fcn.004ce3cc
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov ecx, dword [ebp - 0x34]
mov dword [edi], ecx
mov edx, dword [edi + 4]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
mov dword [edi + 4], ecx
mov dword [ebp - 0x30], edx
jmp 0x47ac9b
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x1c
xorps xmm0, xmm0
push ecx
push eax
movups xmmword [ebp - 0x28], xmm0
movq qword [ebp - 0x18], xmm0
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x47ac65
cmp dword [ebp - 0x20], esi
jne 0x47ac51
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x34]
call fcn.0047a670
mov ecx, dword [eax + 8]
movq xmm0, qword [eax]
movq qword [ebp - 0x50], xmm0
cmp byte [ecx + 0xd], 0
jne 0x47abf5
mov eax, dword [ebp - 0x24]
cmp eax, dword [ecx + 0x10]
jae 0x47ac51
cmp dword [ebp - 0x30], 0xccccccc
je 0x47acc3
mov esi, dword [ebp - 0x34]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x44], eax
push 0x14
mov byte [ebp - 4], 1
mov dword [ebp - 0x40], 0
call fcn.004ce3cc
mov ecx, dword [ebp - 0x24]
add esp, 4
mov byte [ebp - 4], 0
mov dword [ebp - 0x40], 0
mov dword [eax + 0x10], ecx
lea ecx, [ebp - 0x34]
push eax
push dword [ebp - 0x4c]
mov dword [eax], esi
push dword [ebp - 0x50]
mov dword [eax + 4], esi
mov dword [eax + 8], esi
mov word [eax + 0xc], 0
call fcn.004216b0
mov esi, dword [ebp - 0x3c]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x38]
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x47abc2
push 0x14
mov dword [edi], 0
mov dword [edi + 4], 0
call fcn.004ce3cc
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov ecx, dword [ebp - 0x34]
mov dword [edi], ecx
mov ecx, dword [edi + 4]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x30]
mov dword [edi + 4], eax
mov dword [ebp - 0x30], ecx
add esp, 4
lea ecx, [ebp - 0x34]
call fcn.00420e10
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cdf2e
mov esp, ebp
pop ebp
ret
call fcn.00415bc0
int3
Function at 0x47c7c0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5be390
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x6441a4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
push 0x40
push 0
push esi
call fcn.004d00d0
lea ecx, [esi + 0x40]
add esp, 0xc
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
mov byte [ecx], 0
mov eax, dword [ebp + 0x20]
mov dword [esi + 0x60], eax
mov eax, dword [ebp + 8]
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x10], eax
movzx eax, byte [ebp + 0x1c]
push 0x200
mov dword [ebp - 4], 0
mov byte [esi + 0x58], 0
mov dword [esi + 0x5c], 0
mov byte [esi + 0x64], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], 0xffffffff
mov dword [esi + 0x24], 0xffffffff
mov dword [esi + 0x28], 0xffffffff
mov dword [esi + 0x2c], 0xffffffff
mov dword [esi + 0x30], 0xffffffff
mov dword [esi + 0x34], 0xffffffff
mov dword [esi + 0x38], eax
call fcn.00405980
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 0x1c
Function at 0x486970
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [ebp + 0xc]
test eax, eax
push ebx
mov ebx, 0xb
cmovne ebx, eax
mov dword [ebp - 0x18], ebx
push esi
cmp ebx, 5
jb 0x486b5d
cmp ebx, 0xc
jbe 0x4869a1
pop esi
mov eax, 0xffffffd4
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x14]
bsr eax, eax
bsr ecx, esi
add eax, 2
mov dword [ebp + 0xc], 0
inc ecx
mov dword [ebp + 0xc], 0
cmp ecx, eax
cmovb eax, ecx
cmp ebx, eax
jb 0x486b5d
push edi
push 0
push esi
mov edi, 0x3e
push 0x40000000
sub edi, ebx
push 0
mov dword [ebp - 0x14], edi
call fcn.004cef60
xor ecx, ecx
mov dword [ebp - 0x1c], edx
xor edx, edx
mov dword [ebp - 0x20], eax
lea eax, [edi - 0x14]
mov dword [ebp - 0x10], 0
bts ecx, eax
mov dword [ebp + 0xc], 0
cmp eax, 0x20
mov edi, 1
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov eax, dword [ebp + 0x18]
cmovae edx, ecx
mov dword [ebp - 0x28], ecx
mov ecx, ebx
mov dword [ebp - 0x24], edx
shl edi, cl
mov edx, esi
shr edx, cl
xor ebx, ebx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x2c], edx
mov ecx, dword [ecx + ebx*4]
cmp ecx, esi
je 0x486b54
test ecx, ecx
jne 0x486a49
xor edx, edx
jmp 0x486af0
cmp ecx, edx
ja 0x486a56
dec edi
or edx, 0xffffffff
jmp 0x486aed
mov eax, dword [ebp - 0x1c]
mul ecx
mov esi, eax
mov eax, dword [ebp - 0x20]
mul ecx
mov ecx, dword [ebp - 0x14]
add esi, edx
mov dword [ebp - 8], eax
mov edx, esi
mov dword [ebp - 4], esi
call fcn.004cefd0
movzx esi, ax
cmp si, 8
jge 0x486ac0
mov ecx, dword [ebp - 0x14]
movsx edi, si
mov eax, edi
cdq
call fcn.004cef40
sub dword [ebp - 8], eax
mov ecx, dword [edi*4 + 0x5c3af8]
sbb dword [ebp - 4], edx
mov eax, dword [ebp - 0x24]
mul ecx
mov edi, eax
mov eax, dword [ebp - 0x28]
mul ecx
add edi, edx
cmp dword [ebp - 4], edi
jb 0x486ab9
ja 0x486ab2
cmp dword [ebp - 8], eax
jbe 0x486ab9
mov eax, 1
jmp 0x486abb
xor eax, eax
mov edi, dword [ebp - 0xc]
add esi, eax
movsx eax, si
sub edi, eax
movzx ecx, si
cmp si, word [ebp + 0xc]
mov eax, ebx
movzx edx, si
cmovle eax, dword [ebp - 0x10]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
movzx eax, ax
cmovle ecx, eax
movzx eax, cx
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xc], edi
mov ecx, dword [ebp + 8]
mov word [ecx + ebx*2], dx
inc ebx
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp + 0x10]
cmp ebx, eax
jbe 0x486a33
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
movzx ebx, word [eax + ecx*2]
lea edx, [eax + ecx*2]
movsx ecx, bx
mov eax, edi
sar ecx, 1
neg eax
cmp eax, ecx
jl 0x486b42
push dword [ebp + 0x18]
push esi
push dword [ebp + 0x10]
mov esi, dword [ebp - 0x18]
push esi
push dword [ebp + 8]
call fcn.00486b70
add esp, 0x14
cmp eax, 0xffffff88
jbe 0x486b4b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x18]
lea ecx, [ebx + edi]
mov word [edx], cx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4db820
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004ce9e0
mov eax, dword [0x6441a4]
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.004e2799
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4db862
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4db9be
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004cea50
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 + 0x649400]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004efa7d
mov ecx, dword [esi*4 + 0x649400]
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 0x4db9b7
cmp eax, dword [edi + ecx + 0x24]
jne 0x4db9b7
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 0x4db9b7
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004efa7d
add esp, 0x14
test edx, edx
jl 0x4db9b7
jg 0x4db92d
test eax, eax
jb 0x4db9b7
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4db9b7
jl 0x4db947
cmp dword [ebp - 0x1008], eax
ja 0x4db9b7
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4db965
test ebx, ebx
je 0x4db99e
cmp ecx, edi
jae 0x4db99e
mov al, byte [ecx]
cmp al, 0xd
jne 0x4db97f
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4db98b
cmp byte [ecx + 1], 0xa
jne 0x4db98b
inc ecx
jmp 0x4db98b
movzx eax, al
movsx eax, byte [eax + 0x644318]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4db965
cmp edx, ebx
jne 0x4db965
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4db9bc
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004cdf2e
leave
ret
Function at 0x4e2ea6
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 + 0x649400]
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 0x4e2ee6
cmp byte [ebx], 0xa
jne 0x4e2ee6
or byte [eax + edi + 0x28], 4
jmp 0x4e2eeb
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4e2fe9
mov al, byte [edx]
cmp al, 0x1a
je 0x4e2fcb
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4e2f1a
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4e2f3f
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4e2f49
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 0x4e2efc
jmp 0x4e2fe9
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 0x4e2fc6
cmp dword [ebp - 0xc], 0
je 0x4e2fc6
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x649400]
test byte [eax + edi + 0x28], 0x48
je 0x4e2fa0
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4e2f8b
mov byte [esi], dl
jmp 0x4e2f9c
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x649400]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4e2fe9
cmp byte [ebp - 1], 0xa
jne 0x4e2faf
cmp esi, ebx
jne 0x4e2faf
mov byte [esi], 0xa
jmp 0x4e2fe8
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004efa9b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4e2fe9
mov byte [esi], 0xd
jmp 0x4e2fe8
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x649400]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4e2fe5
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4e2fe9
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret