joyce8/EMBER2024-capa huggingface dataset:
Function at 0x687910
Capabilities:
Check if file exists
Get common file path

Disassembly:
mov eax, dword [esp + 0x10]
sub esp, 0x208
test eax, eax
push ebx
push esi
push edi
jne 0x68793b
lea eax, [esp + 0xc]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
test eax, eax
jne 0x687963
mov byte [esp + 0xc], al
jmp 0x687963
mov edi, dword [esp + 0x21c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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]
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0xc]
mov cl, byte [esp + ecx + 0xb]
cmp cl, 0x5c
je 0x687981
mov byte [eax], 0x5c
mov esi, dword [sym.imp.user32.dll_wsprintfA]
mov edi, dword [sym.imp.kernel32.dll_GetTickCount]
mov ebx, dword [sym.imp.shlwapi.dll_PathFileExistsA]
call edi
lea ecx, [esp + 0xc]
push eax
push ecx
lea edx, [esp + 0x118]
push str._s_x.tmp
push edx
call esi
add esp, 0x10
lea eax, [esp + 0x110]
push eax
call ebx
test eax, eax
jne 0x687993
lea edi, [esp + 0x110]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.006862a0
mov edx, eax
lea edi, [esp + 0x114]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x208
ret

Function at 0x687c60
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push edi
xor edi, edi
push edi
call dword [sym.imp.user32.dll_OpenClipboard]
test eax, eax
je 0x687cb0
push esi
push 1
call dword [sym.imp.user32.dll_GetClipboardData]
mov esi, eax
test esi, esi
je 0x687ca5
push esi
call dword [sym.imp.kernel32.dll_GlobalLock]
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
call fcn.00689300
add esp, 8
mov edi, eax
push esi
call dword [sym.imp.kernel32.dll_GlobalUnlock]
call dword [sym.imp.user32.dll_CloseClipboard]
mov eax, edi
pop esi
pop edi
ret
mov eax, edi
pop edi
ret
Function at 0x688c50
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
push eax
push 0x104
xor esi, esi
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x688c93
push edi
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0xc]
push ecx
call fcn.00689300
add esp, 8
pop edi
pop esi
add esp, 0x104
ret
mov eax, esi
pop esi
add esp, 0x104
ret

Function at 0x6973b0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x6e2a48
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov eax, dword [esp + 0x40]
push ebx
push esi
lea ecx, [esp + 8]
push eax
push ecx
mov ecx, dword [esp + 0x4c]
call fcn.006977a0
mov esi, eax
lea edx, [esp + 0x48]
xor ebx, ebx
push edx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x4c], 0x79e714
call fcn.006b4a48
mov ecx, dword [0x711938]
mov al, byte [esi]
push ecx
push ebx
push esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x48], 1
mov byte [esp + 0x30], al
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
call fcn.00694b10
mov esi, 0x711990
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0xc]
mov byte [esp + 0x3c], 3
cmp eax, ebx
je 0x697457
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x69744e
cmp al, 0xff
je 0x69744e
dec al
mov byte [ecx], al
jmp 0x697457
push ecx
call fcn.006d4fed
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
call fcn.006c2600
mov eax, dword [esp + 0x28]
mov dword [esp + 0x3c], 0xffffffff
cmp eax, ebx
mov dword [esp + 0x18], esi
je 0x69749d
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x697494
cmp al, 0xff
je 0x697494
dec al
mov byte [ecx], al
jmp 0x69749d
push ecx
call fcn.006d4fed
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.006b4acf
mov ecx, dword [esp + 0x34]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret
Function at 0x69df90
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x79e828]
xor edx, edx
cmp eax, edx
jne 0x69dfb6
xor eax, eax
mov byte [eax + 0x79e728], al
inc eax
cmp eax, 0x100
jl 0x69df9e
mov dword [0x79e828], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x79e728
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x69e047
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x69e01a
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x69dfe8
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x69e0c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x69e113
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x69e0fa
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x6a4ac0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x6e2d0e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.006a53e0
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x711bbc
call fcn.006d4fc4
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x6a4b53
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.006d4fc4
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x6a4b4c
push 0
mov ecx, eax
call fcn.0069bbd0
mov dword [esi + 0xc], eax
jmp 0x6a4b55
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x6a4b55
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x6cbae0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x6e3970
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov al, byte [esp + 0x3c]
push ebx
xor ebx, ebx
push esi
mov esi, ecx
mov byte [esp + 0x10], al
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x44]
push ebx
mov dword [esp + 0x40], ebx
mov byte [esp + 0x28], al
mov edx, dword [ecx]
lea ecx, [esp + 0x28]
mov dword [esp + 0x24], edx
call fcn.006c0ba8
mov eax, dword [0x7150e0]
lea ecx, [esp + 0x10]
push eax
push ebx
push ecx
lea ecx, [esp + 0x30]
call fcn.006c0ada
lea edx, [esp + 0x20]
lea eax, [esp + 8]
push edx
push eax
mov ecx, esi
mov byte [esp + 0x44], 1
call fcn.006cc5a0
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0x28]
cmp eax, ebx
mov dword [esp + 0xc], ecx
je 0x6cbb87
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x6cbb7e
cmp al, 0xff
je 0x6cbb7e
dec al
mov byte [ecx], al
jmp 0x6cbb87
push ecx
call fcn.006d4fed
add esp, 4
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], ebx
cmp eax, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
je 0x6cbbb8
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x6cbbaf
cmp al, 0xff
je 0x6cbbaf
dec al
mov byte [ecx], al
jmp 0x6cbbb8
push ecx
call fcn.006d4fed
add esp, 4
mov ecx, dword [esp + 0x34]
lea eax, [esi + 0x10]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret 4
Function at 0x6d7654
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x6d768c
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.006d56de
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.006d56b6
jmp 0x6d7698
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x6d8d42
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 0x6d8d84
call fcn.006de7fb
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x6d8d84
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x6d8d7b
xor eax, eax
jmp 0x6d8d8c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.006d8d92
pop edi
pop esi
pop ebx
ret 4

Function at 0x6ded2b
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_1]
cmp dword [esp + 0x10], 0
jne 0x6ded59
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue_1]
test eax, eax
je 0x6ded77
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.006dec91
jmp 0x6ded77
mov eax, dword [esi + 0x14]
test eax, eax
je 0x6ded77
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.006dec91
test edi, edi
mov eax, edi
jne 0x6ded61
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection_1]
pop esi
pop ebx
ret 8
Function at 0x4265a5
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0041f38f
and dword [ebp - 4], 0
cmp dword [0x4513b8], 0
mov ebx, eax
jne 0x426656
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x426707
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x426707
push eax
call fcn.0041f31d
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x4513b8], eax
call esi
push eax
call fcn.0041f31d
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4513bc], eax
call esi
push eax
call fcn.0041f31d
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x4513c0], eax
call esi
push eax
call fcn.0041f31d
pop ecx
mov dword [0x4513c8], eax
test eax, eax
je 0x426656
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0041f31d
pop ecx
mov dword [0x4513c4], eax
mov eax, dword [0x4513c4]
cmp eax, ebx
je 0x4266ae
cmp dword [0x4513c8], ebx
je 0x4266ae
push eax
call fcn.0041f398
push dword [0x4513c8]
mov esi, eax
call fcn.0041f398
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4266ae
test edi, edi
je 0x4266ae
call esi
test eax, eax
je 0x4266a5
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4266a5
test byte [ebp - 0xc], 1
jne 0x4266ae
or dword [ebp + 0x10], 0x200000
jmp 0x4266e7
mov eax, dword [0x4513bc]
cmp eax, ebx
je 0x4266e7
push eax
call fcn.0041f398
pop ecx
test eax, eax
je 0x4266e7
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4266e7
mov eax, dword [0x4513c0]
cmp eax, ebx
je 0x4266e7
push eax
call fcn.0041f398
pop ecx
test eax, eax
je 0x4266e7
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4513b8]
call fcn.0041f398
pop ecx
test eax, eax
je 0x426707
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x426709
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
pushal
nop
nop
nop
call 0x43300c
nop
nop
nop
pop eax
nop
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]
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
jl 0x433030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x402174
Capabilities:
Create thread

Disassembly:
xor eax, eax
push eax
push eax
push eax
push 0x402062
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
ret

Function at 0x403fba
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x403fdb
jl 0x403fd2
test edi, edi
jne 0x403fdb
xor eax, eax
xor edx, edx
jmp 0x40409c
cmp dword [ebx + 0x38], 0
je 0x403ff0
push eax
push edi
push dword [ebp + 8]
call fcn.004040a2
jmp 0x40409c
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x404037
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x404037
cmp eax, edi
jb 0x404011
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.00405c70
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x40403d
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x404091
mov ecx, ebx
call fcn.00403851
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x40407c
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.0040b061
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x404091
jmp 0x40404f
test edx, edx
je 0x404091
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.0040b061
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x405a53
Capabilities:
Parse pe header

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

Function at 0x4100b9
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x420310
push 0x420308
push str.FlsAlloc
push 0x1e
call fcn.0040ff26
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4100ed
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d15c]
call esi
jmp 0x4100f3
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x410137
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x420320
push 0x420318
push str.FlsGetValue
push 0x20
call fcn.0040ff26
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41016e
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d15c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x4116e3
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00411554

Function at 0x411add
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00405bc0
mov eax, dword [0x427040]
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.00410749
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x411b1f
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x411c7b
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041b970
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 + 0x428978]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00412ad4
mov ecx, dword [esi*4 + 0x428978]
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 0x411c74
cmp eax, dword [edi + ecx + 0x24]
jne 0x411c74
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 0x411c74
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00412ad4
add esp, 0x14
test edx, edx
jl 0x411c74
jg 0x411bea
test eax, eax
jb 0x411c74
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x411c74
jl 0x411c04
cmp dword [ebp - 0x1008], eax
ja 0x411c74
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x411c22
test ebx, ebx
je 0x411c5b
cmp ecx, edi
jae 0x411c5b
mov al, byte [ecx]
cmp al, 0xd
jne 0x411c3c
lea eax, [edi - 1]
cmp ecx, eax
jae 0x411c48
cmp byte [ecx + 1], 0xa
jne 0x411c48
inc ecx
jmp 0x411c48
movzx eax, al
movsx eax, byte [eax + 0x4272f8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x411c22
cmp edx, ebx
jne 0x411c22
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x411c79
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00404df7
leave
ret
Function at 0x411f72
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 + 0x428978]
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 0x411fb2
cmp byte [ebx], 0xa
jne 0x411fb2
or byte [eax + edi + 0x28], 4
jmp 0x411fb7
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4120b5
mov al, byte [edx]
cmp al, 0x1a
je 0x412097
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x411fe6
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x41200b
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x412015
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 0x411fc8
jmp 0x4120b5
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 0x412092
cmp dword [ebp - 0xc], 0
je 0x412092
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x428978]
test byte [eax + edi + 0x28], 0x48
je 0x41206c
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x412057
mov byte [esi], dl
jmp 0x412068
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x428978]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4120b5
cmp byte [ebp - 1], 0xa
jne 0x41207b
cmp esi, ebx
jne 0x41207b
mov byte [esi], 0xa
jmp 0x4120b4
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00412af2
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4120b5
mov byte [esi], 0xd
jmp 0x4120b4
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x428978]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4120b1
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4120b5
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4120be
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 + 0x428978]
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 0x412101
cmp word [esi], dx
jne 0x412101
or byte [edi + eax + 0x28], 4
jmp 0x412106
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 0x412259
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 0x412239
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x412148
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41217e
cmp eax, edx
jae 0x41218a
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 0x412120
jmp 0x412259
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 0x412235
cmp dword [ebp - 0x14], 0
je 0x412235
mov eax, dword [ebx*4 + 0x428978]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x41220d
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4121d6
mov word [esi], cx
jmp 0x412209
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x428978]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x428978]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x428978]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x412259
pop ebx
cmp word [ebp - 4], bx
jne 0x41221e
cmp esi, dword [ebp + 0xc]
jne 0x41221e
mov word [esi], bx
jmp 0x412256
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00412af2
add esp, 0x10
cmp word [ebp - 4], bx
je 0x412259
push 0xd
jmp 0x412252
mov ecx, dword [ebx*4 + 0x428978]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x412250
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x412259
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