joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402d70
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
test edi, edi
je 0x402dd0
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x402dd0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402da0
and eax, 0x10
xor ecx, ecx
cmp al, 0x10
pop edi
sete cl
mov al, cl
pop esi
ret
push edi
call fcn.0040c257
mov esi, eax
push 0x5c
push esi
call fcn.0040c230
add esp, 0xc
test eax, eax
je 0x402dea
push esi
mov byte [eax], 0
call fcn.00402d70
add esp, 4
test al, al
push esi
jne 0x402dd5
call fcn.0040c1db
add esp, 4
pop edi
xor al, al
pop esi
ret
call fcn.0040c1db
add esp, 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x402dd0
pop edi
mov al, 1
pop esi
ret

Function at 0x402e30
Capabilities:
Timestomp file

Disassembly:
sub esp, 0x28
mov eax, dword [esp + 0x2c]
push esi
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
jne 0x402e5b
xor al, al
pop esi
add esp, 0x28
ret
lea ecx, [esp + 0x1c]
push ebx
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x2c]
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
cmp eax, 1
sete bl
test bl, bl
je 0x402ed0
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x10]
push ecx
push eax
shr eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
cmp eax, 1
sete bl
test bl, bl
je 0x402ed0
lea edx, [esp + 8]
lea eax, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
cmp eax, 1
sete bl
test bl, bl
je 0x402ed0
lea ecx, [esp + 8]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0xc]
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp eax, 1
sete bl
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
pop ebx
pop esi
add esp, 0x28
ret
Function at 0x4050b0
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x4050bf
xor eax, eax
pop esi
ret 0xc
mov eax, dword [0x42c2d8]
test eax, eax
je 0x4050cd
call fcn.00404f60
mov edx, dword [esp + 0x10]
cmp edx, 8
mov eax, dword [esp + 8]
not eax
jb 0x4051c1
push ebx
push edi
mov edi, edx
shr edi, 3
xor ecx, ecx
mov cl, byte [esi]
mov ebx, eax
shr ebx, 8
sub edx, 8
xor ecx, eax
and ecx, 0xff
mov eax, dword [ecx*4 + 0x42e988]
xor eax, ebx
xor ecx, ecx
mov cl, byte [esi + 1]
inc esi
xor ecx, eax
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x42e988]
shr eax, 8
xor ecx, eax
xor eax, eax
mov al, byte [esi + 1]
inc esi
xor eax, ecx
and eax, 0xff
mov eax, dword [eax*4 + 0x42e988]
shr ecx, 8
xor eax, ecx
xor ecx, ecx
mov cl, byte [esi + 1]
inc esi
xor ecx, eax
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x42e988]
shr eax, 8
xor ecx, eax
xor eax, eax
mov al, byte [esi + 1]
inc esi
xor eax, ecx
and eax, 0xff
mov eax, dword [eax*4 + 0x42e988]
shr ecx, 8
xor eax, ecx
xor ecx, ecx
mov cl, byte [esi + 1]
inc esi
xor ecx, eax
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x42e988]
shr eax, 8
xor ecx, eax
xor eax, eax
mov al, byte [esi + 1]
inc esi
xor eax, ecx
and eax, 0xff
mov eax, dword [eax*4 + 0x42e988]
shr ecx, 8
xor eax, ecx
xor ecx, ecx
mov cl, byte [esi + 1]
inc esi
xor ecx, eax
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x42e988]
shr eax, 8
xor eax, ecx
inc esi
dec edi
jne 0x4050e7
pop edi
pop ebx
test edx, edx
je 0x4051e1
xor ecx, ecx
mov cl, byte [esi]
xor ecx, eax
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x42e988]
shr eax, 8
xor eax, ecx
inc esi
dec edx
jne 0x4051c5
not eax
pop esi
ret 0xc
Function at 0x411985
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x42e140
cmp edx, dword [eax]
je 0x4119a7
add eax, 8
inc ecx
cmp eax, 0x42e1d0
jl 0x411998
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x42e140]
jne 0x411ad5
mov eax, dword [0x430d78]
cmp eax, 1
je 0x411aaf
test eax, eax
jne 0x4119d8
cmp dword [0x42db44], 1
je 0x411aaf
cmp edx, 0xfc
je 0x411ad5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x411a0f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00410e80
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0040f680
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x411a52
lea eax, [ebp - 0x1a4]
push eax
call fcn.0040f680
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4275e8
push edi
call fcn.004134b0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00410e80
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00410e90
lea eax, [ebp - 0xa0]
push 0x4275c8
push eax
call fcn.00410e90
push dword [esi + 0x42e144]
lea eax, [ebp - 0xa0]
push eax
call fcn.00410e90
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00413807
add esp, 0x2c
pop edi
jmp 0x411ad5
lea eax, [ebp + 8]
lea esi, [esi + 0x42e144]
push 0
push eax
push dword [esi]
call fcn.0040f680
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x417710
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.0040c760
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x4177db
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x4177db
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x41778e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x417799
or bh, 8
and edi, 0x8000000
je 0x4177b4
mov eax, dword [0x43251c]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x4177db
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x417bb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x417bdb
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x417bff
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x417c1a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x41928e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x4230b4
call fcn.0040cdb0
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x18], eax
call fcn.00421580
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x4192cd
call fcn.00421580
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x4192db
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4192e9
or eax, 0xffffffff
jmp 0x4193d1
mov ecx, esi
call fcn.00419204
mov dword [ebp - 0x14], eax
call fcn.0041a09a
xor edi, edi
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
je 0x419320
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x419320
push edi
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x20], 1
push esi
mov dword [ebp - 4], edi
call fcn.0041a04e
push dword [ebp - 0x14]
call fcn.00419b9c
push ebx
push eax
push dword [ebp - 0x18]
mov ecx, esi
call fcn.00418f91
cmp eax, edi
je 0x419393
test byte [esi + 0x24], 0x10
je 0x419361
push 4
mov ecx, esi
pop ebx
call fcn.0041c1b1
test ah, 1
je 0x419359
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.0041bba5
cmp dword [esi + 0x1c], edi
je 0x419393
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.0041c216
jmp 0x419393
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], edi
je 0x4193a7
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x4193c0
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x4193c0
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x58]
mov ecx, esi
call fcn.0041923e
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret

Function at 0x41ba53
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 0x41ba95
call fcn.00421580
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x41ba95
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x41ba8c
xor eax, eax
jmp 0x41ba9d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0041baa3
pop edi
pop esi
pop ebx
ret 4
Function at 0x421d1a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0x421dca
mov ecx, 0x430920
call fcn.004224c0
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, eax
cmp word [esi + 8], 0
jne 0x421da8
push str.COMCTL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov dword [ebp + 0xc], eax
je 0x421d86
mov ecx, dword [ebp + 0x10]
push 5
neg ecx
sbb ecx, ecx
and ecx, 0xe
add ecx, 0x3ee
movzx ecx, cx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x421d86
push ebx
push edi
push eax
call fcn.0041dc04
add esp, 0xc
mov eax, dword [edi]
mov eax, dword [eax - 8]
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 4], eax
push dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ax, word [ebx]
mov word [esi + 8], ax
push dword [esi + 4]
mov ecx, edi
call fcn.0041cb82
mov si, word [esi + 8]
xor eax, eax
mov word [ebx], si
cmp si, 0xffff
pop edi
pop esi
setne al
pop ebx
pop ebp
ret 0xc

Function at 0x4223d3
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x422401
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x42241f
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00422339
jmp 0x42241f
mov eax, dword [esi + 0x14]
test eax, eax
je 0x42241f
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00422339
test edi, edi
mov eax, edi
jne 0x422409
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x403503
Capabilities:
Terminate process

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

Disassembly:
jmp 0x49b0d9
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49b0ea
pop esi
ret
push ebx
push edi
push esi
call fcn.0049afc0
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403e9f
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49b112
push ebx
push esi
push edi
call fcn.00405524
add esp, 0xc
push 0
call fcn.00406028
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x4055e2
Capabilities:
Parse pe header

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

Function at 0x486c2c
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401d5c
mov eax, dword [0x4ce024]
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.00405c54
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x490b65
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x490cc1
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00405d9e
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 + 0x4d1a28]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.004031ac
mov ecx, dword [esi*4 + 0x4d1a28]
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 0x490cba
cmp eax, dword [ecx + edi + 0x24]
jne 0x490cba
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 0x490cba
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004031ac
add esp, 0x14
test edx, edx
jl 0x490cba
jg 0x490c30
test eax, eax
jb 0x490cba
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x490cba
jl 0x490c4a
cmp dword [ebp - 0x1008], eax
ja 0x490cba
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x490c68
test ebx, ebx
je 0x490ca1
cmp ecx, edi
jae 0x490ca1
mov al, byte [ecx]
cmp al, 0xd
jne 0x490c82
lea eax, [edi - 1]
cmp ecx, eax
jae 0x490c8e
cmp byte [ecx + 1], 0xa
jne 0x490c8e
inc ecx
jmp 0x490c8e
movzx eax, al
movsx eax, byte [eax + 0x4ce348]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x490c68
cmp edx, ebx
jne 0x490c68
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x490cbf
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00402f9f
leave
ret
Function at 0x491400
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 + 0x4d1a28]
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 0x491440
cmp byte [ebx], 0xa
jne 0x491440
or byte [edi + eax + 0x28], 4
jmp 0x491445
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 0x491544
mov dl, byte [eax]
cmp dl, 0x1a
je 0x491527
inc eax
cmp dl, 0xd
je 0x491471
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x491497
cmp eax, ecx
jae 0x4914a5
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 0x491459
jmp 0x491544
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 0x491522
cmp dword [ebp - 0x10], 0
je 0x491522
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4d1a28]
test byte [eax + edi + 0x28], 0x48
je 0x4914fc
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4914e7
mov byte [esi], dl
jmp 0x4914f8
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4d1a28]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x491544
cmp byte [ebp - 1], 0xa
jne 0x49150b
cmp esi, ebx
jne 0x49150b
mov byte [esi], 0xa
jmp 0x491543
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040190b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x491544
mov byte [esi], 0xd
jmp 0x491543
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4d1a28]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x491541
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x491544
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4915a0
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 + 0x4d1a28]
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 0x4915e6
cmp word [ebx], dx
jne 0x4915e6
or byte [eax + edi + 0x28], 4
jmp 0x4915eb
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 0x49174e
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 0x49172e
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x49162c
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x491662
cmp eax, edx
jae 0x491670
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 0x491607
jmp 0x49174e
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 0x491729
cmp dword [ebp - 0x18], 0
je 0x491729
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4d1a28]
test byte [eax + edi + 0x28], 0x48
je 0x4916ff
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 0x4916c3
mov word [esi], cx
jmp 0x4916fa
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4d1a28]
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 + 0x4d1a28]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4d1a28]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x49174e
pop eax
cmp word [ebp - 4], ax
jne 0x49170f
cmp esi, ebx
jne 0x49170f
mov word [esi], ax
jmp 0x49174b
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 0x49174e
push 0xd
pop eax
jmp 0x49170a
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4d1a28]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x491748
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x49174e
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret