joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4058f8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef4
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x10c], ecx
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x4059bc
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
call fcn.004041f4
lea eax, [ebp - 0x105]
push eax
push 0x104
call sub.kernel32.dll_GetTempPathA
test eax, eax
je 0x4059a3
mov eax, ebx
lea edx, [ebp - 0x105]
mov ecx, 0x105
call fcn.00404354
mov eax, dword [ebx]
call fcn.00405090
test al, al
je 0x40599c
test esi, esi
je 0x4059a3
lea edx, [ebp - 0x10c]
mov eax, dword [ebx]
call fcn.0040525c
mov edx, dword [ebp - 0x10c]
mov eax, ebx
mov ecx, esi
call fcn.004043c4
mov eax, dword [ebx]
call fcn.00405090
test al, al
jne 0x4059a3
mov eax, dword [ebx]
call fcn.00405354
mov eax, dword [ebx]
call fcn.00405090
test al, al
jne 0x4059a3
mov eax, ebx
call fcn.004041f4
jmp 0x4059a3
mov eax, ebx
call fcn.004041f4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4059c3
lea eax, [ebp - 0x10c]
call fcn.004041f4
ret

Function at 0x4059cc
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef4
push ebx
xor edx, edx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x405a71
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 4]
mov eax, dword [0x40e800]
call fcn.00405794
cmp dword [ebp - 4], 0
jne 0x405a08
lea edx, [ebp - 4]
xor eax, eax
call fcn.004058f8
cmp dword [ebp - 4], 0
je 0x405a54
mov eax, dword [ebp - 4]
call fcn.00405090
test al, al
je 0x405a54
lea eax, [ebp - 0x109]
push eax
push 0
mov eax, dword [0x40e810]
call fcn.0040453c
push eax
mov eax, dword [ebp - 4]
call fcn.0040453c
push eax
call sub.kernel32.dll_GetTempFileNameA
test eax, eax
je 0x405a54
mov eax, ebx
lea edx, [ebp - 0x109]
mov ecx, 0x105
call fcn.00404354
jmp 0x405a5b
mov eax, ebx
call fcn.004041f4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405a78
lea eax, [ebp - 4]
call fcn.004041f4
ret

Function at 0x405a80
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffef8
mov ebx, eax
push 0x105
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
mov eax, ebx
mov edx, esp
mov ecx, 0x105
call fcn.00404354
add esp, 0x108
pop ebx
ret

Function at 0x406bf0
Capabilities:
Hide graphical window

Disassembly:
push ebx
mov ebx, eax
test dl, dl
je 0x406bfd
xor cl, 1
mov byte [ebx + 0xc], cl
cmp byte [ebx + 0xc], 0
jne 0x406c15
cmp dword [ebx + 0x10], 0
je 0x406c30
mov eax, dword [ebx + 0x10]
call fcn.004050b4
test al, al
je 0x406c30
cmp byte [ebx + 0xd], 0
jne 0x406c52
mov byte [ebx + 0xd], 1
mov eax, dword [ebx + 4]
test eax, eax
je 0x406c52
push 0
push eax
call sub.user32.dll_ShowWindow
pop ebx
ret
cmp byte [ebx + 0xd], 0
je 0x406c52
mov byte [ebx + 0xd], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x406c52
push 5
push eax
call sub.user32.dll_ShowWindow
mov eax, dword [ebx + 4]
push eax
call sub.user32.dll_SetForegroundWindow
pop ebx
ret
Function at 0x406d7c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
mov esi, ecx
mov ebx, edx
mov dword [ebp - 4], eax
lea eax, [ebp - 0x44]
xor ecx, ecx
mov edx, 0x3c
call fcn.00403488
mov cl, 1
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00406bf0
mov dword [ebp - 0x44], 0x3c
mov dword [ebp - 0x40], 0x540
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3c], eax
cmp byte [ebp + 8], 0
je 0x406dd3
call fcn.004056e8
test al, al
je 0x406dd3
mov eax, 0x406ea4
mov dword [ebp - 0x38], eax
jmp 0x406ddb
mov eax, 0x406eac
mov dword [ebp - 0x38], eax
mov eax, ebx
call fcn.0040453c
mov dword [ebp - 0x34], eax
mov eax, esi
call fcn.0040453c
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x18]
call fcn.0040453c
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x44]
push eax
call sub.shell32.dll_ShellExecuteExA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x406e7d
xor eax, eax
push ebp
push 0x406e76
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebp + 0x14], 0
je 0x406e5f
jmp 0x406e41
mov cl, 1
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00406bf0
push 0x64
call sub.kernel32.dll_Sleep_1
mov eax, dword [ebp - 4]
call fcn.00406b14
test al, al
je 0x406e5f
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_WaitForSingleObject
cmp eax, 0x102
je 0x406e2e
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406e7d
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
mov cl, 1
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00406bf0
lea eax, [ebp - 0x44]
xor ecx, ecx
mov edx, 0x3c
call fcn.00403488
movzx eax, byte [ebp - 5]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14

Function at 0x407240
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov word [ebp - 2], cx
mov edi, edx
mov esi, eax
push 0
push 0x8000080
push 3
push 0
push 1
push 0xc0000000
push esi
call sub.kernel32.dll_CreateFileA_1
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40727e
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp + 8]
mov dword [edx], eax
xor eax, eax
jmp 0x4072cf
lea eax, [ebp - 0xc]
push eax
movzx eax, word [ebp - 2]
push eax
push edi
call sub.kernel32.dll_DosDateTimeToFileTime
test eax, eax
je 0x4072b2
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.kernel32.dll_LocalFileTimeToFileTime
test eax, eax
je 0x4072b2
lea eax, [ebp - 0x14]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
push ebx
call sub.kernel32.dll_SetFileTime
push ebx
call sub.kernel32.dll_CloseHandle_1
movzx eax, word [ebp + 0xc]
and ax, 0x27
movzx eax, ax
push eax
push esi
call sub.kernel32.dll_SetFileAttributesA
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4073a4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
mov ebx, edx
mov esi, eax
lea edi, [ebp - 0xd]
xor eax, eax
mov dword [esi + 0x1c], eax
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [esi + 4], 0
je 0x4074ca
push 0
push 0x8000000
push 3
push 0
push 0
push 0x80000000
mov eax, ebx
call fcn.0040453c
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x4074ca
xor eax, eax
push ebp
push 0x4074c3
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
lea eax, [ebp - 0x14]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x407421
cmp dword [ebp - 0x14], 0x24
je 0x40742b
call fcn.00403d34
jmp 0x4074ca
mov eax, dword [ebp - 0x38]
cmp eax, dword [str.MSCF0w_]
je 0x407440
call fcn.00403d34
jmp 0x4074ca
push 0
push 0
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_SetFilePointer_1
cmp eax, dword [ebp - 0x28]
je 0x40745d
call fcn.00403d34
jmp 0x4074ca
movzx ebx, word [ebp - 0x1c]
dec ebx
test ebx, ebx
jl 0x4074a6
inc ebx
push 0
lea eax, [ebp - 0x14]
push eax
push 0x10
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x4074a6
cmp dword [ebp - 0x14], 0x10
jne 0x4074a6
push 0
lea eax, [ebp - 0x14]
push eax
push 1
push edi
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile_1
cmp byte [edi], 0
jne 0x407486
mov eax, dword [ebp - 0x48]
add dword [esi + 0x1c], eax
dec ebx
jne 0x407467
mov eax, dword [esi + 0x1c]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4074ca
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407970
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x407a59
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.004041f4
xor eax, eax
mov dword [ebp - 8], eax
mov eax, 0x40b7cc
mov esi, eax
cmp bl, byte [esi]
jne 0x407a33
mov byte [ebp - 9], 0
movzx ebx, byte [esi + 1]
imul bx, word [esi + 3]
movzx eax, word [esi + 1]
mov edx, eax
movzx edi, word [esi + 3]
imul dx, di
movzx edx, dx
shr edx, 8
xor bl, dl
movzx edx, ax
push edx
movzx eax, ax
movzx edx, di
add eax, edx
dec eax
pop edx
sub eax, edx
jl 0x407a43
inc eax
mov dword [ebp - 0x10], eax
mov edi, edx
lea eax, [ebp - 0x14]
mov edx, dword [0x40b7c8]
movzx edx, byte [edx + edi - 1]
xor dl, bl
not dl
xor dl, byte [ebp - 9]
call fcn.00404314
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
call fcn.00404378
mov eax, dword [ebp - 4]
mov eax, dword [0x40b7c8]
movzx eax, byte [eax + edi - 1]
mov byte [ebp - 9], al
movzx eax, byte [esi + 1]
add al, byte [esi + 3]
imul bl
add al, byte [ebp - 8]
mov ebx, eax
inc edi
dec dword [ebp - 0x10]
jne 0x4079e8
jmp 0x407a43
inc dword [ebp - 8]
add eax, 5
cmp dword [ebp - 8], 0x4b
jne 0x4079a3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407a60
lea eax, [ebp - 0x14]
call fcn.004041f4
ret
Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x40153b
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push esp
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [esp + 0x2c], 1
je 0x401554
movzx esi, word [esp + 0x30]
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x4044e0], eax
mov dword [ebp - 0x4c], 0x30
call fcn.0040152b
mov dword [ebp - 0x48], 3
mov dword [ebp - 0x44], 0x40120e
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], str.Trick
mov dword [ebp - 0x20], eax
call fcn.0040151e
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test eax, eax
je 0x401626
mov eax, 0x80000000
push edi
push dword [ebp - 0x38]
push edi
push edi
push eax
push eax
push eax
push eax
push 0x80
push str.Qindom
push str.Trick
push edi
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 0
push eax
mov dword [0x4044e8], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x4044e8]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push edi
push edi
push edi
lea edx, [ebp - 0x1c]
push edx
call esi
test eax, eax
je 0x401626
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
push ebx
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
lea eax, [ebp - 0x1c]
push eax
call edi
lea ecx, [ebp - 0x1c]
push ecx
call ebx
xor eax, eax
push eax
push eax
push eax
lea edx, [ebp - 0x1c]
push edx
call esi
test eax, eax
jne 0x40160a
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40353f
Capabilities:
Terminate process

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

Disassembly:
jmp 0x49b2d8
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49b2e9
pop esi
ret
push ebx
push edi
push esi
call fcn.0049b1bf
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403eae
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49b311
push ebx
push esi
push edi
call fcn.0040556a
add esp, 0xc
push 0
call fcn.004060a5
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x405637
Capabilities:
Parse pe header

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

Function at 0x440edc
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
call fcn.004036b1
push 2
lea ecx, [ebp - 4]
push ecx
mov eax, dword [eax + 0x14]
push 0x22
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
movzx eax, word [ebp - 4]
sub eax, 0x30
je 0x440f1b
sub eax, 1
je 0x440f16
sub eax, 1
je 0x440f12
xor eax, eax
leave
ret
push 3
jmp 0x440f1d
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret
Function at 0x4962b2
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401d89
mov eax, dword [0x4ca040]
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.00405cc2
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4962f4
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x496450
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00405e16
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 + 0x4cd868]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004031de
mov ecx, dword [esi*4 + 0x4cd868]
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 0x496449
cmp eax, dword [edi + ecx + 0x24]
jne 0x496449
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 0x496449
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004031de
add esp, 0x14
test edx, edx
jl 0x496449
jg 0x4963bf
test eax, eax
jb 0x496449
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x496449
jl 0x4963d9
cmp dword [ebp - 0x1008], eax
ja 0x496449
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4963f7
test ebx, ebx
je 0x496430
cmp ecx, edi
jae 0x496430
mov al, byte [ecx]
cmp al, 0xd
jne 0x496411
lea eax, [edi - 1]
cmp ecx, eax
jae 0x49641d
cmp byte [ecx + 1], 0xa
jne 0x49641d
inc ecx
jmp 0x49641d
movzx eax, al
movsx eax, byte [eax + 0x4cabe0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4963f7
cmp edx, ebx
jne 0x4963f7
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x49644e
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00402fd6
leave
ret
Function at 0x499877
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x4ca040]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x4998c2
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00499d39
test al, al
jne 0x4998bc
sub edx, 2
cmp edx, edi
jne 0x4998a2
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4998e4
lea eax, [edi + 2]
cmp edx, eax
je 0x4998e4
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00499470
add esp, 0x10
jmp 0x4999de
push esi
lea ecx, [ebp - 0x255]
call fcn.00499d39
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x499927
push dword [ebp - 0x25c]
jmp 0x4998d4
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x499964
cmp word [ebp - 0x226], 0
je 0x499985
cmp word [ebp - 0x226], ax
jne 0x499964
cmp word [ebp - 0x224], 0
je 0x499985
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00499470
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4999d1
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x49993e
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x4999b9
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4999de
push 0x498e58
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004053cb
add esp, 0x10
jmp 0x4999ae
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402fd6
leave
ret
Function at 0x4a54dd
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 + 0x4cd868]
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 0x4a551d
cmp byte [ebx], 0xa
jne 0x4a551d
or byte [eax + edi + 0x28], 4
jmp 0x4a5522
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4a5620
mov al, byte [edx]
cmp al, 0x1a
je 0x4a5602
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4a5551
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4a5576
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4a5580
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 0x4a5533
jmp 0x4a5620
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 0x4a55fd
cmp dword [ebp - 0xc], 0
je 0x4a55fd
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x4cd868]
test byte [eax + edi + 0x28], 0x48
je 0x4a55d7
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4a55c2
mov byte [esi], dl
jmp 0x4a55d3
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4cd868]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4a5620
cmp byte [ebp - 1], 0xa
jne 0x4a55e6
cmp esi, ebx
jne 0x4a55e6
mov byte [esi], 0xa
jmp 0x4a561f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00401924
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a5620
mov byte [esi], 0xd
jmp 0x4a561f
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x4cd868]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a561c
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a5620
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a567c
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 + 0x4cd868]
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 0x4a56bf
cmp word [esi], dx
jne 0x4a56bf
or byte [edi + eax + 0x28], 4
jmp 0x4a56c4
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 0x4a5817
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 0x4a57f7
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4a5706
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4a573c
cmp eax, edx
jae 0x4a5748
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 0x4a56de
jmp 0x4a5817
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 0x4a57f3
cmp dword [ebp - 0x14], 0
je 0x4a57f3
mov eax, dword [ebx*4 + 0x4cd868]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4a57cb
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4a5794
mov word [esi], cx
jmp 0x4a57c7
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x4cd868]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x4cd868]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x4cd868]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4a5817
pop ebx
cmp word [ebp - 4], bx
jne 0x4a57dc
cmp esi, dword [ebp + 0xc]
jne 0x4a57dc
mov word [esi], bx
jmp 0x4a5814
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00401924
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4a5817
push 0xd
jmp 0x4a5810
mov ecx, dword [ebx*4 + 0x4cd868]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a580e
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a5817
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