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

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x43e9b8]
je 0x41bb7e
inc edi
cmp edi, 0x17
jb 0x41bb6f
cmp edi, 0x17
jae 0x41bcfe
push ebp
push 3
call fcn.0042328f
cmp eax, 1
pop ecx
je 0x41bcca
push 3
call fcn.0042328f
test eax, eax
pop ecx
jne 0x41bbb2
cmp dword [0x43e6e0], 1
je 0x41bcca
cmp ebx, 0xfc
je 0x41bcfd
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4632d8
push ebp
call fcn.0041a68c
add esp, 0xc
test eax, eax
je 0x41bbe8
push esi
push esi
push esi
push esi
push esi
call fcn.0041725e
add esp, 0x14
push 0x104
mov esi, 0x4632f1
push esi
push 0
mov byte [0x4633f5], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41bc2c
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0041a68c
add esp, 0xc
test eax, eax
je 0x41bc2c
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0041725e
add esp, 0x14
push esi
call fcn.00418ac0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41bc71
push esi
call fcn.00418ac0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4635ec
push 0x42d9fc
sub ecx, eax
push ecx
push eax
call fcn.0041a899
add esp, 0x14
test eax, eax
je 0x41bc71
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0041725e
add esp, 0x14
jmp 0x41bc73
xor esi, esi
push 0x42d9f8
push ebx
push ebp
call fcn.0041ac68
add esp, 0xc
test eax, eax
je 0x41bc93
push esi
push esi
push esi
push esi
push esi
call fcn.0041725e
add esp, 0x14
push dword [edi*8 + 0x43e9bc]
push ebx
push ebp
call fcn.0041ac68
add esp, 0xc
test eax, eax
je 0x41bcb5
push esi
push esi
push esi
push esi
push esi
call fcn.0041725e
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004230d2
add esp, 0xc
jmp 0x41bcfd
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x41bcfd
cmp ebp, 0xffffffff
je 0x41bcfd
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x43e9bc]
push dword [esi]
call fcn.00418ac0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4230d2
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0041c805
xor ebx, ebx
cmp dword [0x463bac], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4231a8
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x423288
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x42e448
push edi
call esi
cmp eax, ebx
je 0x423288
push eax
call fcn.0041c797
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x463bac], eax
call esi
push eax
call fcn.0041c797
mov dword [esp], 0x42e424
push edi
mov dword [0x463bb0], eax
call esi
push eax
call fcn.0041c797
mov dword [0x463bb4], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0041a9f5
test eax, eax
pop ecx
pop ecx
je 0x423176
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0041725e
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4231a8
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0041c797
cmp eax, ebx
pop ecx
mov dword [0x463bbc], eax
je 0x4231a8
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0041c797
pop ecx
mov dword [0x463bb8], eax
mov eax, dword [0x463bb8]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x42322d
cmp dword [0x463bbc], ecx
je 0x42322d
push eax
call fcn.0041c80e
push dword [0x463bbc]
mov esi, eax
call fcn.0041c80e
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x42322d
cmp edi, ebx
je 0x42322d
call esi
cmp eax, ebx
je 0x4231fa
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4231fa
test byte [ebp - 0x18], 1
jne 0x42322d
lea eax, [ebp - 0x10]
push eax
call fcn.0041aa2c
test eax, eax
pop ecx
je 0x423215
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0041725e
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x423224
or dword [ebp + 0x10], 0x200000
jmp 0x423268
or dword [ebp + 0x10], 0x40000
jmp 0x423268
mov eax, dword [0x463bb0]
cmp eax, dword [ebp - 8]
je 0x423268
push eax
call fcn.0041c80e
cmp eax, ebx
pop ecx
je 0x423268
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x423268
mov eax, dword [0x463bb4]
cmp eax, dword [ebp - 8]
je 0x423268
push eax
call fcn.0041c80e
cmp eax, ebx
pop ecx
je 0x423268
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x463bac]
call fcn.0041c80e
cmp eax, ebx
pop ecx
je 0x423288
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x42328a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4281ae
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x43e6bc]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00428143
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00416150
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x4281fd
cmp dword [ebp - 0x1c], 5
jb 0x428215
jmp 0x428211
cmp dword [ebp - 0x10], 1
jne 0x428215
cmp dword [ebp - 0x1c], 4
ja 0x428211
jne 0x428215
cmp dword [ebp - 0x18], 0
jbe 0x428215
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x42ee14
call fcn.00428017
test eax, eax
jge 0x428236
mov byte [0x43fc08], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0041613d
add ebp, 0x78
leave
ret
Function at 0xa82789
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0xa95048]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
mov dword [ebp - 0x214], esi
cmp ebx, esi
je 0xa8289a
cmp edi, esi
je 0xa8289a
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0xa827ba
sub eax, edx
sar eax, 1
je 0xa8289a
xor eax, eax
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push esi
push eax
call fcn.00a88ab0
add esp, 0xc
cmp dword [ebp + 8], esi
jne 0xa82825
cmp dword [0xa95f10], 3
jne 0xa82825
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [fcn.00a91020]
push 0xa935d0
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00a85167
add esp, 0xc
jmp 0xa82838
lea eax, [ebp - 0x20c]
push eax
mov esi, 0x104
push esi
call dword [fcn.00a91088]
push edi
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00a85167
and dword [ebp - 0x210], 0
push 0xa935d4
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00a85489
add esp, 0x18
cmp dword [ebp - 0x210], 0
je 0xa8289a
push dword [ebp - 0x210]
xor esi, esi
inc esi
push esi
push 0x200
push ebx
call fcn.00a8571a
push dword [ebp - 0x210]
call fcn.00a857a4
add esp, 0x14
mov dword [ebp - 0x214], esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x214]
xor ecx, ebp
pop esi
call fcn.00a85158
leave
ret

Function at 0xa8293d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0xa95048]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
xor esi, esi
call fcn.00a88ab0
and dword [ebp - 0x210], esi
add esp, 0xc
test edi, edi
je 0xa829e7
lea eax, [ebp - 0x20c]
push eax
mov esi, 0x104
push esi
call dword [fcn.00a91088]
push 0xa935b4
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00a85167
push 0xa935f4
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00a85489
xor esi, esi
add esp, 0x18
inc esi
cmp dword [ebp - 0x210], 0
je 0xa829e7
push dword [ebp - 0x210]
push esi
push 0x200
push edi
call fcn.00a8596f
push dword [ebp - 0x210]
call fcn.00a857a4
add esp, 0x14
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00a85158
leave
ret
Function at 0xa839a0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push 0xa936d0
mov edi, ecx
push eax
lea ecx, [ebp - 4]
push ecx
mov dword [ebp - 4], 0
call fcn.00a85489
add esp, 0xc
test eax, eax
je 0xa839cd
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
push ebx
push esi
push 2
push 0
push edx
call fcn.00a85df5
mov eax, dword [ebp - 4]
push eax
call fcn.00a86005
mov ecx, dword [ebp - 4]
push 0
push 0
push ecx
mov esi, eax
call fcn.00a85df5
lea eax, [esi + edi]
push eax
mov dword [ebp - 0xc], eax
call fcn.00a85c9d
mov edx, dword [ebp - 4]
push edx
push 1
mov ebx, eax
push esi
push ebx
call fcn.00a8571a
mov eax, dword [ebp - 4]
push eax
call fcn.00a857a4
push edi
add esi, ebx
push 0
push esi
mov dword [ebp - 8], esi
call fcn.00a88ab0
mov eax, edi
cdq
and edx, 3
lea esi, [edx + eax]
add esp, 0x40
sar esi, 2
call dword [fcn.00a9102c]
push eax
call fcn.00a8606a
add esp, 4
xor edi, edi
test esi, esi
jle 0xa83a60
lea ebx, [ebx]
call fcn.00a8607c
mov ecx, dword [ebp - 8]
mov dword [ecx + edi*4], eax
inc edi
cmp edi, esi
jl 0xa83a50
mov edx, dword [ebp + 8]
push 0xa936d8
push edx
lea eax, [ebp - 4]
push eax
call fcn.00a85489
add esp, 0xc
test eax, eax
je 0xa83a82
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
push ecx
push 1
push edx
push ebx
call fcn.00a8596f
mov eax, dword [ebp - 4]
push eax
call fcn.00a857a4
add esp, 0x14
test ebx, ebx
je 0xa83aab
push ebx
call fcn.00a85d31
add esp, 4
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret
Function at 0xa83ac0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov eax, dword [0xa95048]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x103
lea eax, [ebp - 0x20b]
push 0
push eax
mov byte [ebp - 0x20c], 0
call fcn.00a88ab0
push 0x103
lea ecx, [ebp - 0x107]
push 0
push ecx
mov byte [ebp - 0x108], 0
call fcn.00a88ab0
push 0x103
lea edx, [ebp - 0x30f]
push 0
push edx
mov byte [ebp - 0x310], 0
call fcn.00a88ab0
mov eax, dword [0xa936e0]
mov ecx, dword [0xa936e4]
mov dx, word [0xa936e8]
mov dword [ebp - 0x324], eax
mov al, byte [0xa936ea]
add esp, 0x24
mov dword [ebp - 0x320], ecx
lea ecx, [ebp - 0x20c]
mov byte [ebp - 0x31a], al
xor eax, eax
push ecx
push 0x104
mov word [ebp - 0x31c], dx
mov dword [ebp - 0x319], eax
mov dword [ebp - 0x315], eax
mov byte [ebp - 0x311], al
call dword [0xa91040]
lea eax, [ebp - 0x324]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0xa83b82
push esi
push edi
lea edi, [ebp - 0x20c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0xa83b96
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x104
lea edx, [ebp - 0x108]
mov ecx, eax
push edx
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
call dword [0xa91044]
lea eax, [ebp - 0x108]
push eax
lea ecx, [ebp - 0x310]
push 0x104
push ecx
call fcn.00a8609d
lea edx, [ebp - 0x310]
push 0x5c
push edx
call fcn.00a85c70
add esp, 0x14
test eax, eax
je 0xa83bf0
mov byte [eax], 0
lea eax, [ebp - 0x20c]
push 0xa936ec
push eax
call fcn.00a861b8
mov esi, eax
add esp, 8
test esi, esi
je 0xa83d51
push esi
push 1
push 9
push 0xa936f0
call fcn.00a8596f
push esi
push 1
push 5
push 0xa936fc
call fcn.00a8596f
lea eax, [ebp - 0x108]
add esp, 0x20
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0xa83c38
push esi
sub eax, edx
push 1
push eax
lea ecx, [ebp - 0x108]
push ecx
call fcn.00a8596f
push esi
push 1
push 2
push 0xa93704
call fcn.00a8596f
push esi
push 1
push 0xa
push 0xa93708
call fcn.00a8596f
lea eax, [ebp - 0x108]
add esp, 0x30
lea edx, [eax + 1]
jmp 0xa83c80
mov cl, byte [eax]
inc eax
test cl, cl
jne 0xa83c80
push esi
sub eax, edx
push 1
push eax
lea edx, [ebp - 0x108]
push edx
call fcn.00a8596f
push esi
push 1
push 0xf
push 0xa93714
call fcn.00a8596f
push esi
push 1
push 7
push 0xa93724
call fcn.00a8596f
lea eax, [ebp - 0x310]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0xa83cc3
push esi
sub eax, ecx
push 1
push eax
lea eax, [ebp - 0x310]
push eax
call fcn.00a8596f
push esi
push 1
push 3
push 0xa9372c
call fcn.00a8596f
push esi
push 1
push 5
push 0xa93730
call fcn.00a8596f
lea eax, [ebp - 0x20c]
add esp, 0x30
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0xa83d06
push esi
sub eax, edx
push 1
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00a8596f
push esi
push 1
push 1
push 0xa93738
call fcn.00a8596f
push esi
call fcn.00a857a4
add esp, 0x24
push 0
push 0
push 0
lea edx, [ebp - 0x20c]
push edx
push 0xa9373c
push 0
call dword [0xa9115c]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00a85158
mov esp, ebp
pop ebp
ret
Function at 0xa85030
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00a8e6d0
mov eax, dword [0xa95048]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [edi]
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push ebx
push 4
lea ecx, [ebp - 0x1008]
push ecx
push edx
mov dword [ebp - 0x100c], eax
call dword [fcn.00a911b8]
cmp eax, 4
je 0xa8507c
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00a85158
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1008], ebx
jbe 0xa850c8
push esi
mov ecx, dword [edi]
push 0
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push ecx
call dword [fcn.00a911b8]
mov esi, eax
test esi, esi
je 0xa850c7
mov edx, dword [ebp - 0x100c]
mov eax, dword [edx]
push eax
push esi
lea ecx, [ebp - 0x1004]
push 1
push ecx
call fcn.00a8596f
add ebx, esi
add esp, 0x10
cmp ebx, dword [ebp - 0x1008]
jb 0xa85085
pop esi
mov edx, dword [ebp - 0x100c]
mov eax, dword [edx]
push eax
call fcn.00a857a4
mov ecx, dword [ebp - 4]
add esp, 4
cmp ebx, dword [ebp - 0x1008]
pop ebx
sbb eax, eax
xor ecx, ebp
inc eax
call fcn.00a85158
mov esp, ebp
pop ebp
ret
Function at 0x407010
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x40704e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x407046
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x407050
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x407036
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x407120
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x407151
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407151
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x407151
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret

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

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..rdata
nop
nop
push 4
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
cmp eax, 0
nop
nop
je 0x433072
nop
nop
nop
nop
mov ebx, 0x40de38
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x7f817dd3
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x433060
mov eax, section..data
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x4330d2
mov ebx, 0x4304d8
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x449d6119
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x4330c0
nop
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x495cd2
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x5401a4]
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 0x495d1d
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00496194
test al, al
jne 0x495d17
sub edx, 2
cmp edx, edi
jne 0x495cfd
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x495d3f
lea eax, [edi + 2]
cmp edx, eax
je 0x495d3f
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004958cb
add esp, 0x10
jmp 0x495e39
push esi
lea ecx, [ebp - 0x255]
call fcn.00496194
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 0x495d82
push dword [ebp - 0x25c]
jmp 0x495d2f
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 0x495dbf
cmp word [ebp - 0x226], 0
je 0x495de0
cmp word [ebp - 0x226], ax
jne 0x495dbf
cmp word [ebp - 0x224], 0
je 0x495de0
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004958cb
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x495e2c
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x495d99
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x495e14
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x495e39
push 0x4952b3
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00405754
add esp, 0x10
jmp 0x495e09
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.0040312a
leave
ret
Function at 0x4a18e8
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401ded
mov eax, dword [0x5401a4]
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.004060f0
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4a192a
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4a1a86
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00406258
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 + 0x543e00]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00403355
mov ecx, dword [esi*4 + 0x543e00]
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 0x4a1a7f
cmp eax, dword [edi + ecx + 0x24]
jne 0x4a1a7f
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 0x4a1a7f
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00403355
add esp, 0x14
test edx, edx
jl 0x4a1a7f
jg 0x4a19f5
test eax, eax
jb 0x4a1a7f
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4a1a7f
jl 0x4a1a0f
cmp dword [ebp - 0x1008], eax
ja 0x4a1a7f
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4a1a2d
test ebx, ebx
je 0x4a1a66
cmp ecx, edi
jae 0x4a1a66
mov al, byte [ecx]
cmp al, 0xd
jne 0x4a1a47
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4a1a53
cmp byte [ecx + 1], 0xa
jne 0x4a1a53
inc ecx
jmp 0x4a1a53
movzx eax, al
movsx eax, byte [eax + 0x540ae0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4a1a2d
cmp edx, ebx
jne 0x4a1a2d
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4a1a84
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040312a
leave
ret
Function at 0x4a21c5
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 + 0x543e00]
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 0x4a2205
cmp byte [ebx], 0xa
jne 0x4a2205
or byte [eax + edi + 0x28], 4
jmp 0x4a220a
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4a2308
mov al, byte [edx]
cmp al, 0x1a
je 0x4a22ea
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4a2239
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4a225e
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4a2268
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 0x4a221b
jmp 0x4a2308
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 0x4a22e5
cmp dword [ebp - 0xc], 0
je 0x4a22e5
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x543e00]
test byte [eax + edi + 0x28], 0x48
je 0x4a22bf
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4a22aa
mov byte [esi], dl
jmp 0x4a22bb
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x543e00]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4a2308
cmp byte [ebp - 1], 0xa
jne 0x4a22ce
cmp esi, ebx
jne 0x4a22ce
mov byte [esi], 0xa
jmp 0x4a2307
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00401983
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a2308
mov byte [esi], 0xd
jmp 0x4a2307
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x543e00]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a2304
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a2308
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret