joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402a90
Capabilities:
Parse pe header

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0xffffffff
jne 0x402a9c
xor eax, eax
pop esi
ret
mov eax, dword [esi + 8]
push ebx
or ebx, 0xffffffff
cmp word [eax], 0x5a4d
push edi
jne 0x402b0f
mov edi, dword [eax + 0x3c]
add edi, eax
push 0xe0
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x402b0f
cmp dword [edi], 0x4550
jne 0x402b0f
mov al, byte [esi + 0x14c]
test al, al
je 0x402b0f
mov ecx, esi
call fcn.00402420
mov cl, byte [esi + 0x14c]
test cl, cl
je 0x402aed
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 0x3c]
mov dword [edx + ecx + 0x50], eax
mov ecx, esi
call fcn.004026a0
mov ecx, dword [esi + 0x148]
mov ebx, eax
mov al, byte [esi + 0x140]
add ebx, ecx
test al, al
je 0x402b0f
mov ecx, esi
call fcn.00402610
mov eax, dword [esi + 8]
test eax, eax
je 0x402b24
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esi + 8], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x402b3c
push eax
call edi
mov dword [esi + 4], 0xffffffff
mov al, byte [esi + 0x14c]
test al, al
je 0x402b80
cmp ebx, 0xffffffff
je 0x402b62
mov eax, dword [esi]
push 0
push 0
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea edx, [esi + 0x138]
push edx
mov edx, dword [esi]
lea eax, [esi + 0x130]
push eax
lea ecx, [esi + 0x128]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x402b8e
push eax
call edi
test eax, eax
jne 0x402b94
pop edi
pop ebx
xor eax, eax
pop esi
ret
pop edi
pop ebx
mov dword [esi], 0xffffffff
mov eax, 1
pop esi
ret
Function at 0x402bb0
Capabilities:
Get file size
Write file on windows

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
test edi, edi
mov esi, ecx
mov dword [esi + 0x11c], 0
je 0x402d49
mov al, byte [esp + 0x14]
lea edx, [esi + 0xc]
mov byte [esi + 0x14c], al
mov eax, edi
sub edx, edi
jmp 0x402be0
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402be0
mov cl, byte [esi + 0x14c]
neg cl
push 0
push 0
push 3
push 0
push 1
sbb ecx, ecx
and ecx, 0x40000000
add ecx, 0x80000000
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x402d49
mov cl, byte [esi + 0x14c]
test cl, cl
je 0x402c43
lea edx, [esi + 0x138]
push edx
lea ecx, [esi + 0x130]
push ecx
lea edx, [esi + 0x128]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x11c], eax
add dword [esi + 0x110], ecx
je 0x402cbb
mov edx, dword [esi]
push ebx
push 2
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 0x110]
push eax
call fcn.00402fd8
mov ecx, dword [esi + 0x110]
mov edx, ecx
mov ebx, eax
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
add esp, 4
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esi + 0x110]
mov edx, dword [esi]
push 0
lea eax, [esp + 0x1c]
push eax
push ecx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call fcn.004034f5
add esp, 4
pop ebx
mov ecx, dword [esi + 0x11c]
mov eax, dword [esi + 0x110]
mov dl, byte [esi + 0x14c]
add eax, ecx
xor ecx, ecx
test dl, dl
mov edx, dword [esi]
push 0
setne cl
push 0
push 0
mov dword [esi + 0x114], eax
lea ecx, [ecx + ecx + 2]
push ecx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x402d19
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x402d12
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x402d12
mov dword [esi], 0xffffffff
pop edi
xor eax, eax
pop esi
ret 0xc
mov ecx, esi
call fcn.00402320
test eax, eax
mov ecx, esi
jne 0x402d39
call fcn.004022d0
mov ecx, esi
call fcn.004022f0
pop edi
xor eax, eax
pop esi
ret 0xc
call fcn.00402370
test eax, eax
jne 0x402d50
mov ecx, esi
call fcn.00402a90
pop edi
xor eax, eax
pop esi
ret 0xc
mov al, byte [esi + 0x140]
test al, al
je 0x402d61
mov ecx, esi
call fcn.004029f0
mov al, byte [esi + 0x14c]
test al, al
je 0x402d72
mov ecx, esi
call fcn.004024a0
pop edi
mov eax, 1
pop esi
ret 0xc
Function at 0x403c58
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.00403540
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403cf3
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 [0x40e83c]
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 0x403cf3
cmp eax, 1
je 0x403d14
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 0x403cf3
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x403cc0
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x403cef
xor eax, eax
inc eax
jmp 0x403d33
cmp edi, eax
jae 0x403cf7
xor eax, eax
jmp 0x403d33
cmp eax, esi
jae 0x403cfe
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 [0x40e83c]
jmp 0x403d17
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 0x403f72
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x40b948
call fcn.004041a0
mov edi, 0x94
mov eax, edi
call fcn.00403540
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 [0x40e83c], ecx
mov eax, dword [esi + 4]
mov dword [0x40e848], eax
mov edx, dword [esi + 8]
mov dword [0x40e84c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40e840], esi
cmp ecx, 2
je 0x403fd2
or esi, 0x8000
mov dword [0x40e840], esi
shl eax, 8
add eax, edx
mov dword [0x40e844], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x40400b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40400b
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x404023
cmp eax, 0x20b
je 0x404010
mov dword [ebp - 0x1c], edi
jmp 0x404037
cmp dword [ecx + 0x84], 0xe
jbe 0x40400b
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x404031
cmp dword [ecx + 0x74], 0xe
jbe 0x40400b
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.004052f8
pop ecx
test eax, eax
jne 0x404063
cmp dword [0x40e804], 2
je 0x404050
call fcn.00408612
push 0x1c
call fcn.0040849b
push 0xff
call fcn.004067ea
pop ecx
pop ecx
call fcn.00408d5e
mov dword [ebp - 4], edi
call fcn.00408bb3
test eax, eax
jge 0x40407c
push 0x1b
call fcn.00403f4d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40fe00], eax
call fcn.00408a91
mov dword [0x40e7fc], eax
call fcn.004089ef
test eax, eax
jge 0x4040a2
push 8
call fcn.00403f4d
pop ecx
call fcn.004087bc
test eax, eax
jge 0x4040b3
push 9
call fcn.00403f4d
pop ecx
push 1
call fcn.0040681a
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x4040c9
push eax
call fcn.00403f4d
pop ecx
mov eax, dword [0x40e85c]
mov dword [0x40e860], eax
push eax
push dword [0x40e854]
push dword [0x40e850]
call fcn.00401c70
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x4040f8
push esi
call fcn.00406945
call fcn.00406967
jmp 0x40412a
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.004041db
ret
Function at 0x406884
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40e87c], esi
push edi
jne 0x4068a4
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 [0x40e878], esi
mov byte [0x40e874], al
jne 0x40690a
mov ecx, dword [0x40fb8c]
test ecx, ecx
je 0x4068eb
mov eax, dword [0x40fb88]
sub eax, 4
cmp eax, ecx
jmp 0x4068e4
mov eax, dword [eax]
test eax, eax
je 0x4068d6
call eax
mov eax, dword [0x40fb88]
sub eax, 4
cmp eax, dword [0x40fb8c]
mov dword [0x40fb88], eax
jae 0x4068ce
mov eax, 0x40e030
mov esi, 0x40e03c
cmp eax, esi
mov edi, eax
jae 0x40690a
mov eax, dword [edi]
test eax, eax
je 0x406903
call eax
add edi, 4
cmp edi, esi
jb 0x4068fb
mov eax, 0x40e040
mov esi, 0x40e048
cmp eax, esi
mov edi, eax
jae 0x406929
mov eax, dword [edi]
test eax, eax
je 0x406922
call eax
add edi, 4
cmp edi, esi
jb 0x40691a
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x406943
push dword [ebp + 8]
mov dword [0x40e87c], 1
call fcn.004067ea
pop ebp
ret
Function at 0x4069bd
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 0x4069eb
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 0x4069f2
cmp ebx, dword [eax + 4]
jae 0x4069f2
xor eax, eax
jmp 0x406be2
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x406a03
xor eax, eax
inc eax
jmp 0x406be1
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x406a19
cmp ecx, edx
jae 0x406b5e
cmp dword [eax + 4], 0
je 0x406a22
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x406a0a
cmp dword [ebp + 8], 0
je 0x406a44
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x406b5e
cmp eax, esi
jae 0x406b5e
mov eax, dword [0x40e888]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x406a69
cmp dword [esi*4 + 0x40e890], edi
je 0x406b62
inc esi
cmp esi, eax
jl 0x406a57
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x406bde
cmp dword [ebp - 8], 0x1000000
jne 0x406bde
test byte [ebp - 0xc], 0xcc
je 0x406ae7
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x406bde
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x406bde
cmp word [eax + 0x18], 0x10b
jne 0x406bde
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x406bde
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x406ae7
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x406ae7
test byte [ecx + 0x27], 0x80
jne 0x406b5e
push 1
push 0x40e8d0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4069fb
mov ecx, dword [0x40e888]
test ecx, ecx
mov edx, ecx
jle 0x406b1b
lea eax, [ecx*4 + 0x40e88c]
cmp dword [eax], edi
je 0x406b1b
dec edx
sub eax, 4
test edx, edx
jg 0x406b0f
test edx, edx
jne 0x406b4c
push 0xf
pop ebx
cmp ecx, ebx
jg 0x406b28
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x406b40
lea eax, [edx*4 + 0x40e890]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x406b2e
cmp ecx, 0x10
jge 0x406b4c
inc ecx
mov dword [0x40e888], ecx
push 0
push 0x40e8d0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4069fb
xor eax, eax
jmp 0x406be1
test esi, esi
jle 0x4069fb
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x40e8d0
call ebx
test eax, eax
jne 0x4069fb
cmp dword [esi*4 + 0x40e890], edi
je 0x406bb8
mov eax, dword [0x40e888]
lea esi, [eax - 1]
test esi, esi
jl 0x406ba6
cmp dword [esi*4 + 0x40e890], edi
je 0x406ba2
dec esi
jns 0x406b96
test esi, esi
jge 0x406bb6
cmp eax, 0x10
jge 0x406bb1
inc eax
mov dword [0x40e888], eax
lea esi, [eax - 1]
jmp 0x406bb8
je 0x406bd0
xor ecx, ecx
test esi, esi
jl 0x406bd0
lea eax, [ecx*4 + 0x40e890]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x406bbe
push 0
push 0x40e8d0
call ebx
jmp 0x4069fb
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40849b
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40e0b0]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40e498]
je 0x4084d0
inc eax
cmp eax, 0x13
jb 0x4084c1
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40e498]
jne 0x4085f6
mov eax, dword [0x40e804]
cmp eax, 1
je 0x4085ce
cmp eax, edx
jne 0x408500
cmp dword [0x40e0f0], 1
je 0x4085ce
cmp ecx, 0xfc
je 0x4085f6
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x408536
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00408df0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00404370
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40856a
mov eax, edi
push eax
call fcn.00404370
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40b9d4
push edi
call fcn.004093b0
add esp, 0x10
push edi
call fcn.00404370
push dword [esi + 0x40e49c]
mov ebx, eax
call fcn.00404370
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00403540
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00408df0
push edi
push ebx
call fcn.00408e00
push 0x40b9d0
push ebx
call fcn.00408e00
push dword [esi + 0x40e49c]
push ebx
call fcn.00408e00
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004092ae
add esp, 0x2c
jmp 0x4085f6
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40e49c]
push dword [esi]
call fcn.00404370
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]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040352b
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4092ae
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40ea18], ebx
push esi
push edi
jne 0x40932e
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x409369
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x40ea18], eax
je 0x409369
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40ea1c], eax
call esi
cmp dword [0x40e83c], 2
mov dword [0x40ea20], eax
jne 0x40932e
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40ea28], eax
je 0x40932e
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40ea24], eax
mov eax, dword [0x40ea24]
test eax, eax
je 0x409373
call eax
test eax, eax
je 0x40935a
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40ea28]
test eax, eax
je 0x40935a
test byte [ebp - 8], 1
jne 0x409373
cmp dword [0x40e848], 4
jb 0x40936d
or byte [ebp + 0x12], 0x20
jmp 0x409392
xor eax, eax
jmp 0x4093a2
or byte [ebp + 0x12], 4
jmp 0x409392
mov eax, dword [0x40ea1c]
test eax, eax
je 0x409392
call eax
mov ebx, eax
test ebx, ebx
je 0x409392
mov eax, dword [0x40ea20]
test eax, eax
je 0x409392
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40ea18]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409e0e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40ea40]
mov eax, dword [0x40e0b0]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x409fd4
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40ea60]
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 0x409fd4
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x409e78
xor eax, eax
jmp 0x409fe8
test al, 0x20
je 0x409e89
push 2
push edi
push edi
push ecx
call fcn.0040a461
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x409f5e
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x409fa5
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x409eeb
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x409edc
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 0x409ebe
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 0x409f2b
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x409f37
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x409eb2
jmp 0x409f39
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x409fcf
cmp dword [ebp + 0x3a4], edi
je 0x409fa5
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x409f97
mov dword [0x40e834], eax
jmp 0x409fdb
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 0x409f89
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x409f39
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x409f39
push dword [ebp + 0x3a4]
call fcn.0040a402
pop ecx
jmp 0x409fe5
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x409fbd
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x409e71
mov dword [0x40e830], 0x1c
mov dword [0x40e834], edi
jmp 0x409fe5
sub eax, dword [ebp - 0x7c]
jmp 0x409fe8
and dword [0x40e834], 0
mov dword [0x40e830], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040352b
add ebp, 0x39c
leave
ret
Function at 0x40a184
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 [0x40ea40]
push edi
jae 0x40a359
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x40ea60]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40a359
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40a22f
test dl, 2
jne 0x40a22f
test dl, 0x48
je 0x40a1f9
cmp byte [eax + 5], 0xa
je 0x40a1f9
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 0x40a242
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40a22a
mov dword [0x40e834], ecx
jmp 0x40a360
cmp eax, 0x6d
jne 0x40a236
xor eax, eax
jmp 0x40a36d
push eax
call fcn.0040a402
pop ecx
jmp 0x40a36a
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40a354
test eax, eax
je 0x40a269
cmp byte [ebx], 0xa
jne 0x40a269
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40a272
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 0x40a34e
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40a33e
cmp al, 0xd
je 0x40a2a4
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40a330
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40a2be
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40a2b9
add dword [ebp - 8], 2
jmp 0x40a312
mov dword [ebp - 8], eax
jmp 0x40a32c
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 0x40a2e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40a32c
cmp dword [ebp - 0x10], 0
je 0x40a32c
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40a307
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40a312
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40a32f
cmp ebx, dword [ebp + 0xc]
jne 0x40a317
cmp byte [ebp - 1], 0xa
jne 0x40a317
mov byte [ebx], 0xa
jmp 0x40a32f
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040a055
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40a330
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40a288
jmp 0x40a34e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40a34e
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 0x40a36d
and dword [0x40e834], 0
mov dword [0x40e830], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401a13
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x40d03c]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x118]
push eax
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x114], 6
sbb ecx, ecx
inc ecx
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004024d6
leave
ret

Function at 0x401a59
Capabilities:
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x401adf
cmp dword [esp + 0xc], 0
je 0x401adf
call fcn.00401a13
push dword [esp + 0xc]
push esi
test al, al
je 0x401ac7
push str.ALLUSERSPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push esi
call fcn.00401f5f
cmp word [esi + eax*2 - 2], 0x5c
pop ecx
je 0x401aac
push esi
call fcn.00401f5f
push 0x5c
pop ecx
push esi
mov word [esi + eax*2], cx
call fcn.00401f5f
pop ecx
pop ecx
xor ecx, ecx
mov word [esi + eax*2], cx
push 0x40a230
push esi
call fcn.00402676
push 0x40a22c
push esi
call fcn.00402676
add esp, 0x10
jmp 0x401adf
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push esi
call fcn.0040264a
pop ecx
pop ecx
xor ecx, ecx
mov word [eax + 2], cx
pop esi
ret 8

Function at 0x4024d6
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40d03c]
jne 0x4024e0
repz ret
jmp fcn.0040490c