joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48eece
Capabilities:
Enumerate pe sections

Disassembly:
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 0x48ef09
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [edx + 0xc]
jb 0x48ef02
mov eax, dword [edx + 8]
add eax, dword [edx + 0xc]
cmp ecx, eax
jb 0x48ef0e
add edx, 0x28
cmp edx, esi
jne 0x48eef3
xor eax, eax
pop esi
pop ebp
ret
mov eax, edx
jmp 0x48ef0b

Function at 0x48f377
Capabilities:
Parse pe header

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

Function at 0x490091
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push esi
push 0x4ae0dc
push 0x4ae0d4
push 0x4ae0dc
push 0
call fcn.0048ffa6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4900c4
push dword [ebp + 8]
mov ecx, esi
call dword [0x4ad5a0]
call esi
pop esi
pop ebp
ret
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsAlloc]

Function at 0x490107
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push 0x4ae100
push 0x4ae0f8
push 0x4ae100
push 2
call fcn.0048ffa6
add esp, 0x10
mov esi, eax
push dword [ebp + 8]
test esi, esi
je 0x490139
mov ecx, esi
call dword [0x4ad5a0]
call esi
jmp 0x49013f
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
pop esi
pop ebp
ret

Function at 0x490142
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push 0x4ae114
push 0x4ae10c
push 0x4ae114
push 3
call fcn.0048ffa6
add esp, 0x10
mov esi, eax
push dword [ebp + 0xc]
push dword [ebp + 8]
test esi, esi
je 0x490177
mov ecx, esi
call dword [0x4ad5a0]
call esi
jmp 0x49017d
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
pop ebp
ret

Function at 0x493593
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
movzx eax, word [esi]
cmp eax, 0x5c
je 0x4935b6
cmp eax, 0x2f
jne 0x4935c0
cmp ax, word [esi + 2]
jne 0x4935c0
xor eax, eax
jmp 0x493604
movsx eax, byte [esi]
push eax
call fcn.004939ad
pop ecx
push 0x3d
pop ecx
movzx eax, ax
push 0x3a
mov word [ebp - 0xa], ax
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push esi
push eax
mov word [ebp - 0xc], cx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x4935bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049f1d2
pop ecx
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0048ea75
mov esp, ebp
pop ebp
ret
Function at 0x493613
Capabilities:
Get common file path
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4934ea
call fcn.0049f1f5
and dword [eax], 0
call fcn.0049f208
mov dword [eax], 0x16
call fcn.0049f14c
or eax, 0xffffffff
jmp 0x493574
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x493504
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049f1d2
pop ecx
jmp 0x4934e2
push ebx
push esi
push edi
lea eax, [ebp - 0x210]
mov esi, 0x105
push eax
push esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x493552
cmp ebx, esi
jb 0x493582
push 2
push ebx
call fcn.0049f21b
push edi
mov esi, eax
call fcn.0049f278
push 0
mov edi, esi
call fcn.0049f278
add esp, 0x10
test esi, esi
je 0x493565
push esi
push ebx
mov dword [ebp - 0x214], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, ebx
mov ebx, eax
test ebx, ebx
jne 0x49351e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049f1d2
pop ecx
or esi, 0xffffffff
push edi
call fcn.0049f278
pop ecx
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048ea75
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x210]
push eax
call fcn.00493593
pop ecx
mov esi, eax
jmp 0x493568
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp 0x4934ae

Function at 0x49c3d5
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
call fcn.004a1605
test al, al
je 0x49c403
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0x68]
shr eax, 8
test al, 1
jne 0x49c403
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp + 8]
call fcn.0049c45a
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4a11f6
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.FlsAlloc
push 0x4b0370
push str.FlsAlloc
push 3
call fcn.004a106b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4a1235
push dword [ebp + 8]
mov ecx, esi
call dword [0x4ad5a0]
call esi
jmp 0x4a123b
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0048ea75
mov esp, ebp
pop ebp
ret 4

Function at 0x4a12a2
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.FlsGetValue
push 0x4b0394
push str.FlsGetValue
push 5
call fcn.004a106b
add esp, 0x10
mov esi, eax
push dword [ebp + 8]
test esi, esi
je 0x4a12e1
mov ecx, esi
call dword [0x4ad5a0]
call esi
jmp 0x4a12e7
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0048ea75
mov esp, ebp
pop ebp
ret 4
Function at 0x4a12f8
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.FlsSetValue
push 0x4b03a8
push str.FlsSetValue
push 6
call fcn.004a106b
add esp, 0x10
mov esi, eax
push dword [ebp + 0xc]
push dword [ebp + 8]
test esi, esi
je 0x4a133a
mov ecx, esi
call dword [0x4ad5a0]
call esi
jmp 0x4a1340
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0048ea75
mov esp, ebp
pop ebp
ret 8
Function at 0x4a1997
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, eax
and eax, 0x3f
sar ecx, 6
push ebx
imul ebx, eax, 0x30
push esi
mov eax, dword [ecx*4 + 0x4cc880]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], ecx
mov eax, dword [eax + ebx + 0x18]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x14]
add eax, edi
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x38], eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
cmp edi, ecx
jae 0x4a1b37
mov ch, byte [edi]
xor eax, eax
mov word [ebp - 0x18], ax
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 0x1b], ch
mov edx, dword [eax*4 + 0x4cc880]
mov cl, byte [edx + ebx + 0x2d]
test cl, 4
je 0x4a1a31
mov al, byte [edx + ebx + 0x2e]
and cl, 0xfb
mov byte [ebp - 0xc], al
lea eax, [ebp - 0xc]
push 2
mov byte [ebp - 0xb], ch
mov byte [edx + ebx + 0x2d], cl
push eax
jmp 0x4a1a6b
call fcn.004a0cb8
movzx ecx, byte [edi]
mov edx, 0x8000
test word [eax + ecx*2], dx
je 0x4a1a68
cmp edi, dword [ebp - 0x24]
jae 0x4a1b0e
push 2
lea eax, [ebp - 0x18]
push edi
push eax
call fcn.0049f4e3
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a1b37
inc edi
jmp 0x4a1a80
push 1
push edi
lea eax, [ebp - 0x18]
push eax
call fcn.0049f4e3
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a1b37
xor ecx, ecx
lea eax, [ebp - 0x14]
push ecx
push ecx
push 5
push eax
push 1
lea eax, [ebp - 0x18]
inc edi
push eax
push ecx
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x4a1b37
push 0
lea ecx, [ebp - 0x20]
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4a1b2f
mov eax, dword [esi + 8]
sub eax, dword [ebp - 0x30]
add eax, edi
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x20], eax
jb 0x4a1b37
cmp byte [ebp - 0x1b], 0xa
jne 0x4a1b03
push 0xd
pop eax
push 0
mov word [ebp - 0x1c], ax
lea eax, [ebp - 0x20]
push eax
push 1
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4a1b2f
cmp dword [ebp - 0x20], 1
jb 0x4a1b37
inc dword [esi + 8]
inc dword [esi + 4]
cmp edi, dword [ebp - 0x24]
jb 0x4a19fa
jmp 0x4a1b37
mov edx, dword [ebp - 0x2c]
mov al, byte [edi]
mov ecx, dword [edx*4 + 0x4cc880]
mov byte [ecx + ebx + 0x2e], al
mov eax, dword [edx*4 + 0x4cc880]
or byte [eax + ebx + 0x2d], 4
inc dword [esi + 4]
jmp 0x4a1b37
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048ea75
mov esp, ebp
pop ebp
ret
Function at 0x4a1c2d
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1410
call fcn.004ac5b0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, ecx
sar eax, 6
and ecx, 0x3f
imul ecx, ecx, 0x30
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [eax*4 + 0x4cc880]
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [eax + ecx + 0x18]
mov eax, dword [ebp + 0x14]
and dword [esi], 0
add eax, ebx
and dword [esi + 4], 0
and dword [esi + 8], 0
mov dword [ebp - 0x1410], ecx
mov dword [ebp - 0x1408], eax
jmp 0x4a1ceb
lea edi, [ebp - 0x1404]
cmp ebx, eax
jae 0x4a1cae
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x4a1c9e
inc dword [esi + 8]
mov byte [edi], 0xd
inc edi
mov byte [edi], al
lea eax, [ebp - 5]
inc edi
cmp edi, eax
mov eax, dword [ebp - 0x1408]
jb 0x4a1c8c
lea eax, [ebp - 0x1404]
sub edi, eax
lea eax, [ebp - 0x140c]
push 0
push eax
push edi
lea eax, [ebp - 0x1404]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4a1cf1
mov eax, dword [ebp - 0x140c]
add dword [esi + 4], eax
cmp eax, edi
jb 0x4a1cf9
mov eax, dword [ebp - 0x1408]
mov ecx, dword [ebp - 0x1410]
cmp ebx, eax
jb 0x4a1c86
jmp 0x4a1cf9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048ea75
mov esp, ebp
pop ebp
ret

Function at 0x4a1d0c
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1410
call fcn.004ac5b0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, ecx
sar eax, 6
and ecx, 0x3f
imul ecx, ecx, 0x30
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [eax*4 + 0x4cc880]
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [eax + ecx + 0x18]
mov eax, dword [ebp + 0x14]
add eax, ebx
mov dword [ebp - 0x1410], ecx
xor edx, edx
mov dword [ebp - 0x1408], eax
mov dword [esi], edx
mov dword [esi + 4], edx
mov dword [esi + 8], edx
jmp 0x4a1dd9
lea edi, [ebp - 0x1404]
cmp ebx, eax
jae 0x4a1d99
movzx eax, word [ebx]
add ebx, 2
cmp eax, 0xa
jne 0x4a1d86
add dword [esi + 8], 2
push 0xd
pop edx
mov word [edi], dx
add edi, 2
mov word [edi], ax
lea eax, [ebp - 6]
add edi, 2
cmp edi, eax
mov eax, dword [ebp - 0x1408]
jb 0x4a1d6a
lea eax, [ebp - 0x1404]
sub edi, eax
lea eax, [ebp - 0x140c]
push 0
push eax
and edi, 0xfffffffe
lea eax, [ebp - 0x1404]
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4a1ddf
mov eax, dword [ebp - 0x140c]
add dword [esi + 4], eax
cmp eax, edi
jb 0x4a1de7
mov eax, dword [ebp - 0x1408]
mov ecx, dword [ebp - 0x1410]
cmp ebx, eax
jb 0x4a1d64
jmp 0x4a1de7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048ea75
mov esp, ebp
pop ebp
ret
Function at 0x4a1dfa
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1418
call fcn.004ac5b0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, ecx
sar eax, 6
and ecx, 0x3f
imul ecx, ecx, 0x30
push ebx
push esi
mov eax, dword [eax*4 + 0x4cc880]
xor ebx, ebx
mov esi, dword [ebp + 8]
push edi
mov eax, dword [eax + ecx + 0x18]
mov ecx, dword [ebp + 0x10]
mov edi, ecx
mov dword [ebp - 0x1414], eax
mov eax, dword [ebp + 0x14]
add eax, ecx
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [ebp - 0x140c], eax
mov dword [esi + 8], ebx
cmp ecx, eax
jae 0x4a1f14
mov esi, dword [ebp - 0x140c]
lea eax, [ebp - 0x6b0]
cmp edi, esi
jae 0x4a1e8b
movzx ecx, word [edi]
add edi, 2
cmp ecx, 0xa
jne 0x4a1e7e
push 0xd
pop edx
mov word [eax], dx
add eax, 2
mov word [eax], cx
add eax, 2
lea ecx, [ebp - 8]
cmp eax, ecx
jb 0x4a1e66
push ebx
push ebx
push 0xd55
lea ecx, [ebp - 0x1408]
push ecx
lea ecx, [ebp - 0x6b0]
sub eax, ecx
sar eax, 1
push eax
mov eax, ecx
push eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1418], eax
test eax, eax
je 0x4a1f0c
push 0
lea ecx, [ebp - 0x1410]
sub eax, ebx
push ecx
push eax
lea eax, [ebp - 0x1408]
add eax, ebx
push eax
push dword [ebp - 0x1414]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4a1f0c
add ebx, dword [ebp - 0x1410]
mov eax, dword [ebp - 0x1418]
cmp ebx, eax
jb 0x4a1ec0
mov eax, edi
sub eax, dword [ebp + 0x10]
mov dword [esi + 4], eax
cmp edi, dword [ebp - 0x140c]
jae 0x4a1f14
xor ebx, ebx
jmp 0x4a1e5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048ea75
mov esp, ebp
pop ebp
ret
Function at 0x4a272a
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push 1
push esi
push esi
push edi
call fcn.004a34ef
mov ecx, eax
mov dword [ebp - 0x10], eax
and ecx, edx
mov dword [ebp - 0xc], edx
add esp, 0x10
cmp ecx, 0xffffffff
jne 0x4a2761
call fcn.0049f208
mov eax, dword [eax]
jmp 0x4a28b5
push 2
push esi
push esi
push edi
call fcn.004a34ef
mov ecx, eax
add esp, 0x10
and ecx, edx
cmp ecx, 0xffffffff
je 0x4a2755
push ebx
mov ebx, dword [ebp + 0xc]
sub ebx, eax
mov eax, dword [ebp + 0x10]
sbb eax, edx
mov dword [ebp - 4], eax
js 0x4a2863
jg 0x4a2795
cmp ebx, esi
jbe 0x4a2863
push 1
push 0x1000
call fcn.0049f21b
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a27b9
call fcn.0049f208
mov dword [eax], 0xc
jmp 0x4a2851
push 0x8000
push edi
call fcn.0049e6c4
pop ecx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
pop ecx
test eax, eax
jl 0x4a27e1
jg 0x4a27da
cmp ebx, 0x1000
jb 0x4a27e1
mov eax, 0x1000
jmp 0x4a27e3
mov eax, ebx
push eax
push esi
push edi
call fcn.004a2012
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a283c
cdq
sub ebx, eax
mov eax, dword [ebp - 4]
sbb eax, edx
mov dword [ebp - 4], eax
test eax, eax
jg 0x4a27da
jl 0x4a2808
test ebx, ebx
jne 0x4a27cc
push dword [ebp - 8]
push edi
call fcn.0049e6c4
push esi
call fcn.0049f278
add esp, 0xc
xor esi, esi
push esi
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push edi
call fcn.004a34ef
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4a28b2
call fcn.0049f208
mov eax, dword [eax]
jmp 0x4a28b4
call fcn.0049f1f5
cmp dword [eax], 5
jne 0x4a2851
call fcn.0049f208
mov dword [eax], 0xd
call fcn.0049f208
push esi
mov edi, dword [eax]
call fcn.0049f278
pop ecx
mov eax, edi
jmp 0x4a28b4
cmp eax, esi
jg 0x4a281c
jl 0x4a286d
cmp ebx, esi
jae 0x4a281c
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.004a34ef
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x4a2833
push edi
call fcn.004a26c0
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4a281c
call fcn.0049f208
mov dword [eax], 0xd
call fcn.0049f1f5
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
jmp 0x4a2833
xor eax, eax
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4a28bb
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
and eax, 0x3f
mov edx, dword [ebp + 0xc]
push ebx
sar ecx, 6
push esi
push edi
imul edi, eax, 0x30
mov eax, dword [ecx*4 + 0x4cc880]
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 0x4a28fc
cmp byte [edx], 0xa
jne 0x4a28fc
or byte [eax + edi + 0x28], 4
jmp 0x4a2901
and byte [eax + edi + 0x28], 0xfb
lea eax, [edx + ecx]
mov ebx, edx
mov dword [ebp - 8], eax
mov esi, edx
cmp edx, eax
jae 0x4a2a07
lea eax, [edx + 1]
mov cl, byte [ebx]
cmp cl, 0x1a
je 0x4a29e8
cmp cl, 0xd
je 0x4a2930
mov byte [esi], cl
inc esi
inc ebx
inc eax
jmp 0x4a29db
mov ecx, dword [ebp - 8]
cmp eax, ecx
jae 0x4a2956
cmp byte [eax], 0xa
jne 0x4a294b
add ebx, 2
mov byte [esi], 0xa
add eax, 2
inc esi
jmp 0x4a29de
mov byte [esi], 0xd
inc esi
inc ebx
inc eax
jmp 0x4a29de
inc ebx
inc eax
push 0
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x18]
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 0x4a29d1
cmp dword [ebp - 0x18], 0
je 0x4a29d1
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x4cc880]
test byte [eax + edi + 0x28], 0x48
je 0x4a29a7
mov dl, byte [ebp - 1]
cmp dl, 0xa
jne 0x4a2997
mov byte [esi], dl
jmp 0x4a29d5
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4cc880]
mov byte [eax + edi + 0x2a], dl
jmp 0x4a29d5
cmp byte [ebp - 1], 0xa
jne 0x4a29ba
mov edx, dword [ebp + 0xc]
cmp esi, edx
jne 0x4a29ba
mov byte [esi], 0xa
inc esi
jmp 0x4a29d8
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004a34ef
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a29d5
mov byte [esi], 0xd
inc esi
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
cmp ebx, ecx
jb 0x4a2916
jmp 0x4a2a07
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x4cc880]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a2a02
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a2a07
mov cl, byte [ebx]
mov byte [esi], cl
inc esi
sub esi, edx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4a2a12
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
and eax, 0x3f
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
sar ecx, 6
imul edi, eax, 0x30
mov dword [ebp - 8], ecx
push 0xa
mov eax, dword [ecx*4 + 0x4cc880]
pop ebx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], edx
mov edx, dword [ebp + 0xc]
test esi, esi
je 0x4a2a56
cmp word [edx], bx
jne 0x4a2a56
or byte [eax + edi + 0x28], 4
jmp 0x4a2a5b
and byte [eax + edi + 0x28], 0xfb
lea eax, [edx + esi*2]
mov ebx, edx
mov dword [ebp - 0x10], eax
mov esi, edx
cmp edx, eax
jae 0x4a2bc4
lea eax, [edx + 2]
movzx ecx, word [ebx]
mov dword [ebp - 0xc], ecx
cmp ecx, 0x1a
mov ecx, dword [ebp - 8]
je 0x4a2ba4
push 0xd
pop edx
cmp word [ebp - 0xc], dx
mov edx, dword [ebp + 0xc]
je 0x4a2aa2
mov ecx, dword [ebp - 0xc]
add ebx, 2
mov word [esi], cx
add esi, 2
add eax, 2
jmp 0x4a2b99
cmp eax, dword [ebp - 0x10]
jae 0x4a2ada
push 0xa
pop edx
cmp word [eax], dx
mov edx, dword [ebp + 0xc]
jne 0x4a2ac6
push 0xa
pop ecx
add ebx, 4
mov word [esi], cx
add eax, 4
add esi, 2
jmp 0x4a2b99
push 0xd
pop edx
mov word [esi], dx
add ebx, 2
add esi, 2
add eax, 2
jmp 0x4a2b96
add eax, 2
add ebx, 2
push 0
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a2b8a
cmp dword [ebp - 0x18], 0
je 0x4a2b8a
mov ecx, dword [ebp - 8]
push 0xa
mov eax, dword [ecx*4 + 0x4cc880]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x4a2b58
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x4a2b2c
mov word [esi], ax
jmp 0x4a2b93
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ecx*4 + 0x4cc880]
push 0xa
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ecx*4 + 0x4cc880]
mov byte [eax + edi + 0x2b], dh
mov eax, dword [ecx*4 + 0x4cc880]
pop edx
mov byte [eax + edi + 0x2c], dl
jmp 0x4a2b93
cmp word [ebp - 4], ax
jne 0x4a2b70
mov edx, dword [ebp + 0xc]
cmp esi, edx
jne 0x4a2b70
mov word [esi], ax
add esi, 2
mov eax, dword [ebp - 0xc]
jmp 0x4a2b99
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004a34ef
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4a2b93
push 0xd
pop eax
mov word [esi], ax
add esi, 2
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 0xc]
cmp ebx, dword [ebp - 0x10]
jb 0x4a2a70
jmp 0x4a2bc4
mov ecx, dword [ecx*4 + 0x4cc880]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a2bbb
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a2bc4
mov cx, word [ebx]
mov word [esi], cx
add esi, 2
sub esi, edx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4a3d47
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.004ac5b0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push dword [ebp + 8]
call fcn.004a09a1
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4a3d80
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4a3ed3
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004ac2f0
mov ecx, ebx
mov dword [ebp - 0x1008], eax
and ecx, 0x3f
mov dword [ebp - 0x1018], edx
mov esi, ebx
imul edi, ecx, 0x30
sar esi, 6
push 0
mov ecx, dword [esi*4 + 0x4cc880]
push dword [ecx + edi + 0x24]
push dword [ecx + edi + 0x20]
push ebx
call fcn.004a34d4
mov ecx, dword [esi*4 + 0x4cc880]
add esp, 0x10
mov dword [ebp - 0x100c], eax
mov eax, edx
mov edx, dword [ebp - 0x100c]
mov dword [ebp - 0x1014], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x4a3ecc
cmp eax, dword [ecx + edi + 0x24]
jne 0x4a3ecc
push 0
lea eax, [ebp - 0x1010]
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 0x4a3ecc
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004a34d4
add esp, 0x10
test edx, edx
jg 0x4a3e3f
jl 0x4a3ecc
test eax, eax
jb 0x4a3ecc
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1010]
test ebx, ebx
jl 0x4a3e59
jg 0x4a3ecc
cmp dword [ebp - 0x1008], eax
ja 0x4a3ecc
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4a3e77
test ebx, ebx
je 0x4a3eb3
cmp ecx, edi
jae 0x4a3eb3
mov al, byte [ecx]
cmp al, 0xd
jne 0x4a3e94
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4a3ea0
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x4a3ea0
mov ecx, eax
jmp 0x4a3ea0
movzx eax, al
movsx eax, byte [eax + 0x4cb240]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4a3e77
cmp edx, ebx
jne 0x4a3e77
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x100c]
adc edx, dword [ebp - 0x1014]
jmp 0x4a3ed1
or eax, 0xffffffff
or edx, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0048ea75
mov esp, ebp
pop ebp
ret