joyce8/EMBER2024-capa huggingface dataset:
Function at 0x424065
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
lea edi, [ebp - 0x1b]
mov byte [ebp - 0x1c], bl
push 0x10
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x1c]
mov dword [ebp - 8], ebx
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
call fcn.00413952
lea edi, str.MIGFCQGLVXWJWJXG
sub edi, 0x400000
mov dword [ebp - 8], edi
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00417848
add esp, 0x10
mov edi, eax
push ebx
push 0x20
push 3
push ebx
push 2
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
mov esi, eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 4]
push ebx
push eax
lea eax, [ebp - 0x1c]
push 0x10
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 0x400000
mov esi, edi
add edi, 0x3c
mov edi, dword [edi]
add edi, esi
add edi, 0x58
sub edi, esi
mov dword [ebp - 0xc], edi
push ebx
push 0x20
push 3
push ebx
push 2
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push ebx
push dword [ebp - 0xc]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 4]
push ebx
push eax
lea eax, [ebp - 0x1c]
push 4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
nop
nop
pop eax
nop
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x433030
nop
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43301e
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x404470
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x4044a6
mov dword [0x447520], eax
mov edx, 0x404450
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040cf40
test eax, eax
sete al
movzx eax, al
mov dword [0x43f020], eax
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete al
movzx eax, al
mov dword [0x43f020], eax
leave
ret

Function at 0x404590
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp - 0xc]
sub esp, 0x68
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov dword [ebp - 0x28], 0x401aa0
mov dword [ebp - 0x24], 0x43e354
mov dword [ebp - 0x1c], 0x404650
mov dword [ebp - 0x18], esp
mov dword [esp], eax
call fcn.0040d3a0
cmp dword [0x43f020], 0
mov dword [ebp - 0x44], 0x447530
je 0x404630
jl 0x404670
mov dword [ebp - 0x3c], 1
mov eax, dword [0x447520]
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x50]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x54]
sub esp, 4
test eax, eax
mov dword [ebp - 0x48], eax
je 0x404713
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x44], eax
lea esi, [esi]
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.0040d480
mov eax, dword [ebp - 0x44]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov edx, dword [0x447b50]
mov eax, 0xffffffff
test edx, edx
je 0x40468a
mov eax, dword [0x43f024]
test eax, eax
je 0x4046ca
xor eax, eax
test eax, eax
jne 0x4046c0
mov edi, dword [0x43f020]
test edi, edi
js 0x4046c0
mov dword [ebp - 0x44], 0x447530
mov ebx, dword [0x43f020]
test ebx, ebx
je 0x404630
jmp 0x4045de
xor esi, esi
mov dword [0x43f020], esi
jmp 0x404698
mov dword [esp], 0x43f028
mov dword [ebp - 0x3c], 1
call sub.KERNEL32.dll_InterlockedIncrement
sub esp, 4
test eax, eax
je 0x404751
mov eax, dword [0x43f024]
test eax, eax
jne 0x404688
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x3c], 1
call eax
sub esp, 4
mov eax, dword [0x43f024]
test eax, eax
je 0x4046ed
jmp 0x404688
mov dword [esp], 8
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x48], eax
test eax, eax
je 0x404745
mov dword [esp + 4], eax
mov eax, dword [0x447520]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
xor edx, edx
test eax, eax
je 0x40477a
test edx, edx
je 0x404765
mov dword [ebp - 0x3c], 1
call fcn.00403ff0
call fcn.00404470
mov eax, 1
mov dword [0x43f024], eax
jmp 0x404688
mov eax, dword [ebp - 0x48]
mov dword [eax], 0
mov dword [eax + 4], 0
jmp 0x404626
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
jmp 0x404741
Function at 0x409f50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00409f30
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edi
call sub.msvcrt.dll__read
cmp eax, 0xffffffff
mov ebx, eax
jne 0x409f9c
call sub.msvcrt.dll__errno
cmp dword [eax], 4
je 0x409f70
add esp, 0x1c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40d290
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [0x447ba0]
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x40d2d0
mov dword [ebx + 0x2c], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call fcn.0040cf40
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x30], eax
add esp, 0x14
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x30], eax
add esp, 0x14
pop ebx
pop ebp
ret
Function at 0x40d680
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x447ba0]
mov edi, dword [ebp + 8]
test eax, eax
je 0x40d75c
mov ecx, dword [eax + 0x30]
test ecx, ecx
js 0x40d771
mov edx, dword [eax + 0x30]
test edx, edx
jne 0x40d730
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea ebx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
jmp 0x40d6c8
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
xor ecx, ecx
test eax, eax
mov edx, 5
je 0x40d6d8
mov ecx, dword [eax + 0x18]
xor edx, edx
cmp edx, 5
je 0x40d723
test edx, edx
jne 0x40d716
test ecx, ecx
je 0x40d6c0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp], 1
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call ecx
cmp eax, 6
je 0x40d780
cmp eax, 8
je 0x40d6c0
mov eax, 3
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
mov eax, 5
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x40d6b2
call fcn.0040d050
mov eax, dword [0x447ba0]
mov ecx, dword [eax + 0x30]
test ecx, ecx
jns 0x40d6a4
call fcn.0040d2f0
mov eax, dword [0x447ba0]
jmp 0x40d6a4
mov dword [edi + 0xc], 0
mov eax, dword [ebp - 0x14]
mov edx, ebx
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.0040d5f0
cmp eax, 7
jne 0x40d71b
mov eax, dword [0x447ba0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40d7d3
mov edi, dword [eax + 0x30]
test edi, edi
js 0x40d7fe
mov esi, dword [eax + 0x30]
test esi, esi
jne 0x40d7df
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.0040d050
mov eax, dword [0x447ba0]
jmp 0x40d7b1
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x40d7c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40d7c2
call fcn.0040d2f0
mov eax, dword [0x447ba0]
jmp 0x40d7b8
Function at 0x40da60
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [0x447ba0]
mov edi, dword [ebp + 8]
test eax, eax
je 0x40daf4
mov esi, dword [eax + 0x30]
test esi, esi
js 0x40db10
mov ebx, dword [eax + 0x30]
test ebx, ebx
jne 0x40db30
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
mov ecx, dword [edi + 0xc]
mov dword [ebp - 0x14], eax
test ecx, ecx
jne 0x40dae8
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.0040d5f0
cmp eax, 7
jne 0x40dbaf
mov eax, dword [0x447ba0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40db86
mov edx, dword [eax + 0x30]
test edx, edx
js 0x40dba0
mov edi, dword [eax + 0x30]
test edi, edi
jne 0x40db60
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.0040d810
jmp 0x40daa5
call fcn.0040d050
mov eax, dword [0x447ba0]
mov esi, dword [eax + 0x30]
test esi, esi
jns 0x40da80
lea esi, [esi]
call fcn.0040d2f0
mov eax, dword [0x447ba0]
mov ebx, dword [eax + 0x30]
test ebx, ebx
je 0x40da8b
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x40da8e
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x40dad7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40dad7
call fcn.0040d050
mov eax, dword [0x447ba0]
mov edx, dword [eax + 0x30]
test edx, edx
jns 0x40dac9
nop
lea esi, [esi]
call fcn.0040d2f0
mov eax, dword [0x447ba0]
jmp 0x40dac9
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]
Function at 0x40dbc0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov esi, dword [edi + 0xc]
test esi, esi
je 0x40dc52
mov eax, dword [0x447ba0]
test eax, eax
je 0x40dc46
mov ebx, dword [eax + 0x30]
test ebx, ebx
js 0x40dcc1
mov ecx, dword [eax + 0x30]
test ecx, ecx
jne 0x40dc67
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.0040d810
cmp eax, 7
jne 0x40dcdf
mov eax, dword [0x447ba0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40dcb2
mov edx, dword [eax + 0x30]
test edx, edx
js 0x40dcd0
mov edi, dword [eax + 0x30]
test edi, edi
jne 0x40dc93
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.0040d050
mov eax, dword [0x447ba0]
jmp 0x40dbe2
mov dword [esp], edi
call fcn.0040d680
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x40dbf7
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x40dc35
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40dc35
call fcn.0040d050
mov eax, dword [0x447ba0]
jmp 0x40dc20
call fcn.0040d2f0
mov eax, dword [0x447ba0]
jmp 0x40dbed
call fcn.0040d2f0
mov eax, dword [0x447ba0]
jmp 0x40dc2b
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]
Function at 0x4035bc
Capabilities:
Terminate process

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

Disassembly:
jmp 0x4a6701
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4a6712
pop esi
ret
push ebx
push edi
push esi
call fcn.004a65e8
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403f85
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4a673a
push ebx
push esi
push edi
call fcn.00405664
add esp, 0xc
push 0
call fcn.004061a4
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x405727
Capabilities:
Parse pe header

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

Function at 0x44ab4e
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
call fcn.00403747
mov eax, dword [eax + 0x14]
test eax, eax
je 0x44ab91
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 0x44ab91
sub eax, 1
je 0x44ab8c
sub eax, 1
je 0x44ab88
xor eax, eax
leave
ret
push 3
jmp 0x44ab93
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret

Function at 0x4914da
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401d70
mov eax, dword [0x4d6040]
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.00405dd0
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4a05d5
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4a0731
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00405f1a
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 + 0x4d9978]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0040325b
mov ecx, dword [esi*4 + 0x4d9978]
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 0x4a072a
cmp eax, dword [ecx + edi + 0x24]
jne 0x4a072a
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 0x4a072a
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0040325b
add esp, 0x14
test edx, edx
jl 0x4a072a
jg 0x4a06a0
test eax, eax
jb 0x4a072a
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4a072a
jl 0x4a06ba
cmp dword [ebp - 0x1008], eax
ja 0x4a072a
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4a06d8
test ebx, ebx
je 0x4a0711
cmp ecx, edi
jae 0x4a0711
mov al, byte [ecx]
cmp al, 0xd
jne 0x4a06f2
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4a06fe
cmp byte [ecx + 1], 0xa
jne 0x4a06fe
inc ecx
jmp 0x4a06fe
movzx eax, al
movsx eax, byte [eax + 0x4d6398]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4a06d8
cmp edx, ebx
jne 0x4a06d8
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4a072f
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040303f
leave
ret
Function at 0x4a0e70
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 + 0x4d9978]
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 0x4a0eb0
cmp byte [ebx], 0xa
jne 0x4a0eb0
or byte [edi + eax + 0x28], 4
jmp 0x4a0eb5
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 0x4a0fb4
mov dl, byte [eax]
cmp dl, 0x1a
je 0x4a0f97
inc eax
cmp dl, 0xd
je 0x4a0ee1
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4a0f07
cmp eax, ecx
jae 0x4a0f15
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 0x4a0ec9
jmp 0x4a0fb4
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 0x4a0f92
cmp dword [ebp - 0x10], 0
je 0x4a0f92
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4d9978]
test byte [eax + edi + 0x28], 0x48
je 0x4a0f6c
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4a0f57
mov byte [esi], dl
jmp 0x4a0f68
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4d9978]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4a0fb4
cmp byte [ebp - 1], 0xa
jne 0x4a0f7b
cmp esi, ebx
jne 0x4a0f7b
mov byte [esi], 0xa
jmp 0x4a0fb3
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040190b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a0fb4
mov byte [esi], 0xd
jmp 0x4a0fb3
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4d9978]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a0fb1
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a0fb4
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a1010
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 + 0x4d9978]
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 0x4a1056
cmp word [ebx], dx
jne 0x4a1056
or byte [eax + edi + 0x28], 4
jmp 0x4a105b
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 0x4a11be
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 0x4a119e
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4a109c
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4a10d2
cmp eax, edx
jae 0x4a10e0
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 0x4a1077
jmp 0x4a11be
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 0x4a1199
cmp dword [ebp - 0x18], 0
je 0x4a1199
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4d9978]
test byte [eax + edi + 0x28], 0x48
je 0x4a116f
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 0x4a1133
mov word [esi], cx
jmp 0x4a116a
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4d9978]
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 + 0x4d9978]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4d9978]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4a11be
pop eax
cmp word [ebp - 4], ax
jne 0x4a117f
cmp esi, ebx
jne 0x4a117f
mov word [esi], ax
jmp 0x4a11bb
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0040190b
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4a11be
push 0xd
pop eax
jmp 0x4a117a
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4d9978]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4a11b8
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4a11be
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret