joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405e70
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x411e6b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x480
mov eax, dword [0x4161c0]
push ebx
push esi
push edi
push str.para
mov dword [esp + 0x488], eax
lea eax, [esp + 0x14]
push str.uninstallmini
push eax
call fcn.00405da0
add esp, 0xc
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
xor esi, esi
cmp ecx, esi
mov dword [esp + 0x494], esi
je 0x405fc8
push 0x104
lea eax, [esp + 0x27c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x278]
push 0x5c
push ecx
call fcn.004080e6
mov ebx, dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, 1
mov word [eax + 2], si
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
add esp, 8
mov dword [esp + 0x14], edi
mov edi, edi
push 0x104
lea edx, [esp + 0x74]
push edx
push edi
call fcn.004047b0
test eax, eax
je 0x405fb6
cmp word [esp + 0x70], 0
je 0x405fb6
lea eax, [esp + 0x278]
push eax
lea ecx, [esp + 0x74]
push ecx
call fcn.0040911e
add esp, 8
test eax, eax
je 0x405fb6
push str.uninst.exe__u__q
lea edx, [esp + 0x74]
push edx
call esi
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
lea edx, [esp + 0x2c]
push edx
push eax
push eax
push eax
push eax
push eax
push eax
mov dword [esp + 0x44], eax
lea eax, [esp + 0x90]
push eax
push 0
mov dword [esp + 0x50], 0x44
call ebx
test eax, eax
je 0x405fc4
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
mov edx, dword [esp + 0x1c]
push edx
call edi
mov edi, dword [esp + 0x14]
inc edi
cmp edi, 0x10
mov dword [esp + 0x14], edi
jl 0x405f10
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x494], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405fed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x48c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x484]
call fcn.004077be
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406010
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x220
mov eax, dword [0x4161c0]
mov edx, dword [str.SoftwareDianji_]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebp
mov dword [esp + 0x224], eax
mov eax, dword [esp + 0x22c]
push esi
lea ecx, [eax + eax]
push edx
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x20], ecx
call ebx
cmp word [0x417610], 0
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatW]
je 0x40606f
push str.LvOem
lea ecx, [esp + 0x24]
push ecx
call ebp
push 0x417610
lea edx, [esp + 0x24]
push edx
jmp 0x406079
push str.Lava_Lava
lea eax, [esp + 0x24]
push eax
call ebp
lea esi, [esp + 0xc]
call fcn.00405e50
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
lea edx, [esp + 0x3c]
push edx
push 0x80000001
call esi
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x4060bf
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
jmp 0x4060db
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push eax
push edx
call esi
mov edx, dword [str.InstallDir]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push edi
lea ecx, [esp + 0x24]
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x4061a9
mov ecx, dword [esp + 0x14]
push ecx
call esi
mov edx, dword [esp + 0xc]
mov eax, dword [edx - 0xc]
test eax, eax
je 0x406121
mov eax, dword [esp + 0x10]
push eax
call esi
push edi
lea ecx, [esp + 0x24]
push ecx
call ebx
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esp + eax*2 + 0x1e], 0x5c
mov dword [esp + 0x18], eax
je 0x40614c
push 0x4132b0
lea eax, [esp + 0x24]
push eax
call ebp
push 0x416be0
lea ecx, [esp + 0x24]
push ecx
call ebp
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x4061c2
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40618c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x21c]
call fcn.004077be
add esp, 0x220
ret 4
mov eax, dword [esp + 0x14]
push eax
call esi
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x4061c2
mov edx, dword [esp + 0x10]
push edx
call esi
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4061e0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x228]
pop esi
pop ebp
xor eax, eax
pop ebx
call fcn.004077be
add esp, 0x220
ret 4
Function at 0x406a40
Capabilities:
Set current directory

Disassembly:
sub esp, 0x414
mov eax, dword [0x4161c0]
push esi
push 0x104
lea ecx, [esp + 8]
mov dword [esp + 0x418], eax
mov eax, dword [esp + 0x420]
push ecx
push 0
mov dword [0x416bd8], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 4]
push 0x5c
push edx
call fcn.004080e6
mov word [eax + 2], 0
add esp, 8
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.00403230
mov esi, dword [esp + 0x424]
push esi
push str._n_nVer2007_5_28_nlpCmdLine_s_n_n
call fcn.00403310
lea ecx, [esp + 0xc]
push ecx
push str.Path_s_n
call fcn.00403310
add esp, 0x10
call fcn.00404540
push 0x413954
push esi
call fcn.00407624
add esp, 8
test eax, eax
je 0x406adb
mov dword [0x4176d8], 1
push 0x41394c
push esi
call fcn.00407624
add esp, 8
test eax, eax
je 0x406b0f
push 1
call fcn.004035e0
add esp, 4
xor eax, eax
pop esi
mov ecx, dword [esp + 0x410]
call fcn.004077be
add esp, 0x414
ret 0x10
push 0x413944
push esi
call fcn.00407624
add esp, 8
test eax, eax
je 0x406b47
mov cl, 1
call fcn.00404960
xor cl, cl
call fcn.00404960
xor eax, eax
pop esi
mov ecx, dword [esp + 0x410]
call fcn.004077be
add esp, 0x414
ret 0x10
push 0x413338
push esi
call fcn.00407624
add esp, 8
test eax, eax
je 0x406bac
push esi
call fcn.00406790
cmp eax, 0xffffffff
je 0x406b93
cmp eax, 1
jne 0x406c8e
push 0
push 0x68
push 0
call fcn.004043f0
mov eax, 1
pop esi
mov ecx, dword [esp + 0x410]
call fcn.004077be
add esp, 0x414
ret 0x10
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x410]
call fcn.004077be
add esp, 0x414
ret 0x10
push 0x41393c
push esi
call fcn.00407624
add esp, 8
test eax, eax
je 0x406c3d
call fcn.00405e70
push 1
call fcn.00405c00
push 1
call fcn.004039f0
add esp, 8
lea edx, [esp + 4]
push edx
call fcn.00403c70
cmp eax, 3
jne 0x406c8e
lea eax, [esp + 4]
push eax
lea ecx, [esp + 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x416ca8
lea edx, [esp + 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 4]
push eax
lea ecx, [esp + 0x210]
call fcn.00404c90
push 0
call fcn.00406200
xor eax, eax
pop esi
mov ecx, dword [esp + 0x410]
call fcn.004077be
add esp, 0x414
ret 0x10
push 0x413438
push esi
call fcn.00407624
add esp, 8
test eax, eax
je 0x406c77
mov ecx, esi
call fcn.004052c0
test eax, eax
je 0x406c8e
call fcn.00401170
xor eax, eax
pop esi
mov ecx, dword [esp + 0x410]
call fcn.004077be
add esp, 0x414
ret 0x10
push 0x413934
push esi
call fcn.00407624
add esp, 8
test eax, eax
je 0x406c8e
call fcn.00403f20
mov ecx, dword [esp + 0x414]
xor eax, eax
pop esi
call fcn.004077be
add esp, 0x414
ret 0x10
Function at 0x4093fb
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x413ac8
call fcn.00409640
mov edi, 0x94
mov eax, edi
call fcn.00409b30
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x417a84], ecx
mov eax, dword [esi + 4]
mov dword [0x417a90], eax
mov edx, dword [esi + 8]
mov dword [0x417a94], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x417a88], esi
cmp ecx, 2
je 0x40945b
or esi, 0x8000
mov dword [0x417a88], esi
shl eax, 8
add eax, edx
mov dword [0x417a8c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x409496
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x409496
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4094ae
cmp eax, 0x20b
je 0x40949b
mov dword [ebp - 0x1c], esi
jmp 0x4094c2
cmp dword [ecx + 0x84], 0xe
jbe 0x409496
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4094bc
cmp dword [ecx + 0x74], 0xe
jbe 0x409496
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040c739
pop ecx
test eax, eax
jne 0x4094ee
cmp dword [0x417958], 1
jne 0x4094db
call fcn.0040e73b
push 0x1c
call fcn.0040e5c4
push 0xff
call fcn.0040ba93
pop ecx
pop ecx
call fcn.0040edfd
mov dword [ebp - 4], esi
call fcn.0040e20c
test eax, eax
jge 0x409507
push 0x1b
call fcn.004093d6
pop ecx
call fcn.0040ed5e
mov dword [0x419138], eax
call fcn.0040ebf4
mov dword [0x417954], eax
call fcn.0040eb5e
test eax, eax
jge 0x40952c
push 8
call fcn.004093d6
pop ecx
call fcn.0040e92b
test eax, eax
jge 0x40953d
push 9
call fcn.004093d6
pop ecx
push 1
call fcn.0040bac3
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x409553
push eax
call fcn.004093d6
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.0040e8e5
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x409574
movzx eax, word [ebp - 0x40]
jmp 0x409577
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00406a40
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x409595
push edi
call fcn.0040bbee
call fcn.0040bc10
jmp 0x4095c7
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040967b
ret
Function at 0x4097ee
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00409b30
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x409889
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x417a84]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x409889
cmp eax, 1
je 0x4098aa
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x409889
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x409856
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x409885
xor eax, eax
inc eax
jmp 0x4098c9
cmp edi, eax
jae 0x40988d
xor eax, eax
jmp 0x4098c9
cmp eax, esi
jae 0x409894
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x417a84]
jmp 0x4098ad
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40b92d
Capabilities:
Get common file path

Disassembly:
push 0x120
push 0x413da0
call fcn.00409640
mov eax, dword [0x4161c0]
mov dword [ebp - 0x1c], eax
lea edi, [ebp - 0x124]
and dword [ebp - 0x128], 0
mov eax, edi
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
mov dword [ebp - 0x12c], esi
cmp esi, 0x104
jle 0x40b9d1
and dword [ebp - 4], 0
lea eax, [esi + 1]
add eax, 3
and eax, 0xfffffffc
call fcn.00409b30
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x130], edi
jmp 0x40b9be
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x40b9d1
push edi
inc esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x40b9ec
cmp byte [edi + 1], 0x3a
jne 0x40b9ec
movzx eax, byte [edi]
push eax
call fcn.0040f957
pop ecx
mov ebx, eax
sub ebx, 0x40
cmp dword [ebp - 0x128], 0
je 0x40b9fc
push edi
call fcn.00408745
pop ecx
mov eax, ebx
lea esp, [ebp - 0x13c]
mov ecx, dword [ebp - 0x1c]
call fcn.004077be
call fcn.0040967b
ret
Function at 0x40bb2d
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x417ac4], esi
push edi
jne 0x40bb4d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x417ac0], esi
mov byte [0x417abc], al
jne 0x40bbb3
mov ecx, dword [0x41912c]
test ecx, ecx
je 0x40bb94
mov eax, dword [0x419128]
sub eax, 4
cmp eax, ecx
jmp 0x40bb8d
mov eax, dword [eax]
test eax, eax
je 0x40bb7f
call eax
mov eax, dword [0x419128]
sub eax, 4
cmp eax, dword [0x41912c]
mov dword [0x419128], eax
jae 0x40bb77
mov eax, 0x416030
mov esi, 0x416038
cmp eax, esi
mov edi, eax
jae 0x40bbb3
mov eax, dword [edi]
test eax, eax
je 0x40bbac
call eax
add edi, 4
cmp edi, esi
jb 0x40bba4
mov eax, 0x41603c
mov esi, 0x416044
cmp eax, esi
mov edi, eax
jae 0x40bbd2
mov eax, dword [edi]
test eax, eax
je 0x40bbcb
call eax
add edi, 4
cmp edi, esi
jb 0x40bbc3
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40bbec
push dword [ebp + 8]
mov dword [0x417ac4], 1
call fcn.0040ba93
pop ebp
ret
Function at 0x40c4f6
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x40c524
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x40c52b
cmp ebx, dword [eax + 4]
jae 0x40c52b
xor eax, eax
jmp 0x40c71b
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40c53c
xor eax, eax
inc eax
jmp 0x40c71a
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40c552
cmp ecx, edx
jae 0x40c697
cmp dword [eax + 4], 0
je 0x40c55b
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40c543
cmp dword [ebp + 8], 0
je 0x40c57d
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40c697
cmp eax, esi
jae 0x40c697
mov eax, dword [0x417ac8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40c5a2
cmp dword [esi*4 + 0x417ad0], edi
je 0x40c69b
inc esi
cmp esi, eax
jl 0x40c590
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40c717
cmp dword [ebp - 8], 0x1000000
jne 0x40c717
test byte [ebp - 0xc], 0xcc
je 0x40c620
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40c717
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40c717
cmp word [eax + 0x18], 0x10b
jne 0x40c717
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40c717
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40c620
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40c620
test byte [ecx + 0x27], 0x80
jne 0x40c697
push 1
push 0x417b10
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40c534
mov ecx, dword [0x417ac8]
test ecx, ecx
mov edx, ecx
jle 0x40c654
lea eax, [ecx*4 + 0x417acc]
cmp dword [eax], edi
je 0x40c654
dec edx
sub eax, 4
test edx, edx
jg 0x40c648
test edx, edx
jne 0x40c685
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40c661
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40c679
lea eax, [edx*4 + 0x417ad0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40c667
cmp ecx, 0x10
jge 0x40c685
inc ecx
mov dword [0x417ac8], ecx
push 0
push 0x417b10
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40c534
xor eax, eax
jmp 0x40c71a
test esi, esi
jle 0x40c534
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x417b10
call ebx
test eax, eax
jne 0x40c534
cmp dword [esi*4 + 0x417ad0], edi
je 0x40c6f1
mov eax, dword [0x417ac8]
lea esi, [eax - 1]
test esi, esi
jl 0x40c6df
cmp dword [esi*4 + 0x417ad0], edi
je 0x40c6db
dec esi
jns 0x40c6cf
test esi, esi
jge 0x40c6ef
cmp eax, 0x10
jge 0x40c6ea
inc eax
mov dword [0x417ac8], eax
lea esi, [eax - 1]
jmp 0x40c6f1
je 0x40c709
xor ecx, ecx
test esi, esi
jl 0x40c709
lea eax, [ecx*4 + 0x417ad0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40c6f7
push 0
push 0x417b10
call ebx
jmp 0x40c534
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40d890
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x418fe4]
mov eax, dword [0x4161c0]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40da56
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x419000]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x40da56
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40d8fa
xor eax, eax
jmp 0x40da6a
test al, 0x20
je 0x40d90b
push 2
push edi
push edi
push ecx
call fcn.0040ff86
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40d9e0
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40da27
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40d96d
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40d95e
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40d940
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d9ad
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40d9b9
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40d934
jmp 0x40d9bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40da51
cmp dword [ebp + 0x3a4], edi
je 0x40da27
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40da19
mov dword [0x417a7c], eax
jmp 0x40da5d
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40da0b
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x40d9bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x40d9bb
push dword [ebp + 0x3a4]
call fcn.0040b718
pop ecx
jmp 0x40da67
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40da3f
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40d8f3
mov dword [0x417a78], 0x1c
mov dword [0x417a7c], edi
jmp 0x40da67
sub eax, dword [ebp - 0x7c]
jmp 0x40da6a
and dword [0x417a7c], 0
mov dword [0x417a78], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.004077be
add ebp, 0x39c
leave
ret
Function at 0x40e003
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x418fe4]
push edi
jae 0x40e1d8
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x419000]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40e1d8
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40e0ae
test dl, 2
jne 0x40e0ae
test dl, 0x48
je 0x40e078
cmp byte [eax + 5], 0xa
je 0x40e078
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e0c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40e0a9
mov dword [0x417a7c], ecx
jmp 0x40e1df
cmp eax, 0x6d
jne 0x40e0b5
xor eax, eax
jmp 0x40e1ec
push eax
call fcn.0040b718
pop ecx
jmp 0x40e1e9
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40e1d3
test eax, eax
je 0x40e0e8
cmp byte [ebx], 0xa
jne 0x40e0e8
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40e0f1
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40e1cd
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40e1bd
cmp al, 0xd
je 0x40e123
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40e1af
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40e13d
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40e138
add dword [ebp - 8], 2
jmp 0x40e191
mov dword [ebp - 8], eax
jmp 0x40e1ab
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e165
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40e1ab
cmp dword [ebp - 0x10], 0
je 0x40e1ab
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40e186
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40e191
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40e1ae
cmp ebx, dword [ebp + 0xc]
jne 0x40e196
cmp byte [ebp - 1], 0xa
jne 0x40e196
mov byte [ebx], 0xa
jmp 0x40e1ae
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040d5eb
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40e1af
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40e107
jmp 0x40e1cd
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40e1cd
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40e1ec
and dword [0x417a7c], 0
mov dword [0x417a78], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret