joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401f10
Capabilities:
Get disk information
Inspect load icon resource
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x148
push ebx
push esi
push edi
push 0x65
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [esp + 0xc]
call fcn.00401000
lea ecx, [esp + 0x50]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc]
push edx
call fcn.004012b0
test eax, eax
je 0x402021
lea eax, [esp + 0x50]
push 0x404030
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x402084
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x10]
call fcn.00401290
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
sub eax, 8
push 0
push eax
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x24]
push 8
push edx
call ebx
mov eax, dword [esp + 0x2c]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x48]
push 0x38
push ecx
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x50]
add esp, 0x3c
test eax, eax
mov eax, dword [esp + 0x10]
push edx
push eax
jne 0x401ffe
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401800
jmp 0x402084
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401a90
jmp 0x402084
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, eax
mov esi, 1
xor ebx, ebx
test edi, esi
je 0x40206a
mov dl, bl
lea ecx, [esp + 0x10]
add dl, 0x41
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x40412c
lea ecx, [esp + 0x14]
call fcn.004020e2
lea ecx, [esp + 0xc]
mov eax, dword [esp + 0x10]
push eax
push 0
call fcn.00401cf0
add esi, esi
inc ebx
cmp ebx, 0x1a
jl 0x402039
lea ecx, [esp + 0xc]
call fcn.00401040
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
call fcn.00401030
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x148
ret 0x10

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

Disassembly:
pushal
nop
nop
nop
call 0x43300c
nop
nop
nop
nop
pop eax
nop
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x433030
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x47f7e0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section..reloc
lea edi, [esi - 0x66000]
push edi
jmp 0x47f7fa
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x47f801
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x47f7f0
mov eax, 1
add ebx, ebx
jne 0x47f813
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x47f824
jne 0x47f843
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x47f843
dec eax
add ebx, ebx
jne 0x47f830
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x47f808
add ebx, ebx
jne 0x47f83f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x47f895
xor ecx, ecx
sub eax, 3
jb 0x47f85b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x47f8ca
sar eax, 1
mov ebp, eax
jmp 0x47f866
add ebx, ebx
jne 0x47f866
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x47f834
inc ecx
add ebx, ebx
jne 0x47f874
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x47f834
add ebx, ebx
jne 0x47f881
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x47f876
jne 0x47f892
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x47f876
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x47f8b4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x47f8a6
jmp 0x47f7f6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x47f8b4
add edi, ecx
jmp 0x47f7f6
pop esi
mov edi, esi
mov ecx, 0xc54
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x47f8d2
cmp byte [edi], 0x11
jne 0x47f8d2
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x47f8d7
lea edi, [esi + 0x7c000]
mov eax, dword [edi]
or eax, eax
je 0x47f94f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xb9614]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xb96a4]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x47f904
mov ecx, edi
jns 0x47f933
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xb96ac]
or eax, eax
je 0x47f949
mov dword [ebx], eax
add ebx, 4
jmp 0x47f921
call dword [esi + 0xb96a8]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x47f980
cmp al, 0xef
ja 0x47f973
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x47f955
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x47f962
mov ebp, dword [esi + 0xb96b0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x47f9b4
sub esp, 0xffffff80
jmp 0x40997c
Function at 0x402af4
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
shr edi, 0x10
xor esi, esi
push 1
cmp di, si
pop ebx
jne 0x402b68
movzx eax, word [ebp + 0xc]
dec eax
je 0x402bbd
dec eax
je 0x402b82
sub eax, 4
je 0x402ba3
sub eax, 0x6d
je 0x402b96
sub eax, 0xa
je 0x402b8c
dec eax
je 0x402b82
sub eax, 0x18
jne 0x402b68
push 2
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
cmp eax, esi
je 0x402b4e
push str.Cancel
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
push esi
push esi
push esi
push esi
push dword [0x408390]
push 0x408018
push dword [ebp + 8]
call fcn.0040248f
add esp, 0x1c
cmp word [ebp + 0xc], 0x77
jne 0x402bc7
cmp di, si
jne 0x402bff
push ebx
push esi
push esi
push str.http:__eula.mindspark.com_ask_pp.html_
jmp 0x402bf3
push dword [ebp + 8]
call fcn.00402d08
jmp 0x402c01
push dword [ebp + 8]
call fcn.00402c08
jmp 0x402c01
push esi
push esi
push esi
push esi
mov dword [0x408390], ebx
push ebx
jmp 0x402b58
mov eax, dword [0x408ab4]
push 2
pop ecx
push eax
push esi
push eax
mov dword [0x408390], ecx
push dword [0x408ab0]
push ecx
jmp 0x402b58
push dword [ebp + 8]
call fcn.00402d6f
jmp 0x402c01
cmp word [ebp + 0xc], 0x93
jne 0x402bde
cmp di, si
jne 0x402bff
push ebx
push esi
push esi
push str.http:__www.mindspark.com_faq.html_
jmp 0x402bf3
cmp word [ebp + 0xc], 0xe1
jne 0x402bff
cmp di, si
jne 0x402bff
push ebx
push esi
push esi
push str.http:__eula.mindspark.com_ask__
push esi
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov eax, ebx
jmp 0x402c01
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x402e2a
Capabilities:
Create process on windows
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x570
push ebx
push 2
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
xor ebx, ebx
cmp eax, ebx
je 0x402fb8
lea ecx, [ebp - 0x170]
push 0x104
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x402fb8
lea eax, [ebp - 0x170]
test eax, eax
je 0x402fb8
lea eax, [ebp - 0x170]
push str.finish
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x402fb8
push esi
lea eax, [ebp - 8]
push edi
push eax
lea eax, [ebp - 4]
mov byte [ebp - 0x570], bl
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call fcn.00401117
lea eax, [ebp - 0x6c]
push 0x64
push eax
push 0x405338
push str.SoftwareCatsCatapults_bt_bar
push 0x80000002
call fcn.004043fd
add esp, 0x1c
test eax, eax
je 0x402f1f
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x6c]
push eax
call esi
mov edi, eax
movsx eax, byte [ebp - 0x6c]
push eax
call fcn.0040420e
cmp edi, 2
pop ecx
jl 0x402f22
push str.http:__free.catsandcatapults.com_installComplete.jhtml_
call esi
mov ecx, 0x3f1
sub ecx, eax
cmp ecx, edi
jle 0x402f22
cmp dword [ebp - 4], ebx
lea eax, [ebp - 0x6c]
push eax
je 0x402f18
push str._new_window_http:__free.catsandcatapults.com_installComplete.jhtml_partner_s
lea eax, [ebp - 0x570]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x402f22
push str._new_http:__free.catsandcatapults.com_installComplete.jhtml_partner_s
jmp 0x402f06
mov byte [ebp - 0x6c], bl
cmp byte [ebp - 0x570], bl
pop edi
pop esi
jne 0x402f4a
cmp dword [ebp - 4], ebx
je 0x402f38
push str._new_window_http:__free.catsandcatapults.com_installComplete.jhtml_
jmp 0x402f3d
push str._new_http:__free.catsandcatapults.com_installComplete.jhtml_
lea eax, [ebp - 0x570]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
push ebx
push 0xf0
push 0x71
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
cmp eax, 1
jne 0x402f79
lea eax, [ebp - 0x570]
push str.sa1
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
push ebx
push 1
jmp 0x402f8e
lea eax, [ebp - 0x570]
push str.sa0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
push ebx
push ebx
call fcn.00401b05
add esp, 0xc
cmp dword [ebp - 4], ebx
mov eax, str.firefox.exe
jne 0x402fa5
mov eax, str.iexplore.exe
push 1
lea ecx, [ebp - 0x570]
push ebx
push ecx
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
call fcn.00401afb
call fcn.004017ad
movzx eax, word [ebp + 0xc]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_EndDialog]
push 1
pop eax
pop ebx
leave
ret 8
Function at 0x401b7a
Capabilities:
Parse pe header

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

Function at 0x4051bb
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004165a0
mov eax, dword [0x41e380]
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.00409995
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4051fd
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x405359
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004164f0
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 + 0x41f330]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0040b41d
mov ecx, dword [esi*4 + 0x41f330]
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 0x405352
cmp eax, dword [ecx + edi + 0x24]
jne 0x405352
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 0x405352
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0040b41d
add esp, 0x14
test edx, edx
jl 0x405352
jg 0x4052c8
test eax, eax
jb 0x405352
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x405352
jl 0x4052e2
cmp dword [ebp - 0x1008], eax
ja 0x405352
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x405300
test ebx, ebx
je 0x405339
cmp ecx, edi
jae 0x405339
mov al, byte [ecx]
cmp al, 0xd
jne 0x40531a
lea eax, [edi - 1]
cmp ecx, eax
jae 0x405326
cmp byte [ecx + 1], 0xa
jne 0x405326
inc ecx
jmp 0x405326
movzx eax, al
movsx eax, byte [eax + 0x41e5c0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x405300
cmp edx, ebx
jne 0x405300
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x405357
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040137a
leave
ret

Function at 0x4091e6
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x418618
push 0x418610
push str.FlsAlloc
push 0x1f
call fcn.004090a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40921a
push dword [ebp + 8]
mov ecx, esi
call dword [0x417140]
call esi
jmp 0x409220
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x409264
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x418628
push 0x418620
push str.FlsGetValue
push 0x21
call fcn.004090a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40929b
push dword [ebp + 8]
mov ecx, esi
call dword [0x417140]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4092a3
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x418630
push 0x418628
push str.FlsSetValue
push 0x22
call fcn.004090a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4092dd
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x417140]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]

Function at 0x40a71b
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 + 0x41f330]
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 0x40a75b
cmp byte [ebx], 0xa
jne 0x40a75b
or byte [edi + eax + 0x28], 4
jmp 0x40a760
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 0x40a85f
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40a842
inc eax
cmp dl, 0xd
je 0x40a78c
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40a7b2
cmp eax, ecx
jae 0x40a7c0
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 0x40a774
jmp 0x40a85f
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 0x40a83d
cmp dword [ebp - 0x10], 0
je 0x40a83d
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x41f330]
test byte [eax + edi + 0x28], 0x48
je 0x40a817
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40a802
mov byte [esi], dl
jmp 0x40a813
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x41f330]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40a85f
cmp byte [ebp - 1], 0xa
jne 0x40a826
cmp esi, ebx
jne 0x40a826
mov byte [esi], 0xa
jmp 0x40a85e
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040b43b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40a85f
mov byte [esi], 0xd
jmp 0x40a85e
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x41f330]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40a85c
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40a85f
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40a868
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 + 0x41f330]
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 0x40a8ae
cmp word [ebx], dx
jne 0x40a8ae
or byte [eax + edi + 0x28], 4
jmp 0x40a8b3
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 0x40aa16
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 0x40a9f6
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40a8f4
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40a92a
cmp eax, edx
jae 0x40a938
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 0x40a8cf
jmp 0x40aa16
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 0x40a9f1
cmp dword [ebp - 0x18], 0
je 0x40a9f1
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x41f330]
test byte [eax + edi + 0x28], 0x48
je 0x40a9c7
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 0x40a98b
mov word [esi], cx
jmp 0x40a9c2
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x41f330]
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 + 0x41f330]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x41f330]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40aa16
pop eax
cmp word [ebp - 4], ax
jne 0x40a9d7
cmp esi, ebx
jne 0x40a9d7
mov word [esi], ax
jmp 0x40aa13
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0040b43b
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40aa16
push 0xd
pop eax
jmp 0x40a9d2
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x41f330]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40aa10
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40aa16
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40e8c5
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x40e962
push ebx
push esi
call fcn.0040e88e
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0040e822
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40e90f
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40e961
push edi
push eax
call fcn.0040c31e
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40e92f
call fcn.00408f38
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40e960
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040e822
add esp, 0x20
test eax, eax
jne 0x40e94e
push edi
call fcn.00408f38
jmp 0x40e956
push ebx
call fcn.00408f38
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x413b75
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00413af1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x413ce4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x413ce4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x413c99
jg 0x413bd1
test eax, eax
je 0x413c8f
push 1
push 0x1000
call fcn.00408edb
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x413bf4
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x413c86
push 0x8000
push ebx
call fcn.0040831b
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x413c1d
jg 0x413c18
cmp ecx, 0x1000
jb 0x413c1d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0040bd83
add esp, 0x10
cmp eax, 0xffffffff
je 0x413c62
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x413c18
jl 0x413c49
test ecx, ecx
jne 0x413c0a
push dword [ebp - 0xc]
push ebx
call fcn.0040831b
push esi
call fcn.00408f38
add esp, 0xc
xor ebx, ebx
jmp 0x413cf2
cmp byte [edi + 0x24], 0
je 0x413c79
cmp dword [edi + 0x20], 5
jne 0x413c79
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x413c84
mov ebx, dword [edi + 0x18]
jmp 0x413c86
xor ebx, ebx
push esi
call fcn.00408f38
pop ecx
jmp 0x413cf2
test ecx, ecx
jg 0x413c5b
jl 0x413c99
test eax, eax
jae 0x413c5b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0040b43b
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x413cb9
cmp byte [edi + 0x1c], 0
je 0x413c5b
jmp 0x413cea
push ebx
call fcn.0040f0b9
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x413c5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x413cf2
cmp byte [edi + 0x1c], 0
je 0x413cef
mov ebx, dword [edi + 0x18]
jmp 0x413cf2
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0040b43b
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4163f0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41641d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41641d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret