joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40e3ee
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 0x40e41c
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 0x40e423
cmp ebx, dword [eax + 4]
jae 0x40e423
xor eax, eax
jmp 0x40e613
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40e434
xor eax, eax
inc eax
jmp 0x40e612
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40e44a
cmp ecx, edx
jae 0x40e58f
cmp dword [eax + 4], 0
je 0x40e453
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40e43b
cmp dword [ebp + 8], 0
je 0x40e475
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40e58f
cmp eax, esi
jae 0x40e58f
mov eax, dword [0x419168]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40e49a
cmp dword [esi*4 + 0x419170], edi
je 0x40e593
inc esi
cmp esi, eax
jl 0x40e488
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e60f
cmp dword [ebp - 8], 0x1000000
jne 0x40e60f
test byte [ebp - 0xc], 0xcc
je 0x40e518
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40e60f
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40e60f
cmp word [eax + 0x18], 0x10b
jne 0x40e60f
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40e60f
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40e518
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40e518
test byte [ecx + 0x27], 0x80
jne 0x40e58f
push 1
push 0x4191b0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40e42c
mov ecx, dword [0x419168]
test ecx, ecx
mov edx, ecx
jle 0x40e54c
lea eax, [ecx*4 + 0x41916c]
cmp dword [eax], edi
je 0x40e54c
dec edx
sub eax, 4
test edx, edx
jg 0x40e540
test edx, edx
jne 0x40e57d
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40e559
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40e571
lea eax, [edx*4 + 0x419170]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40e55f
cmp ecx, 0x10
jge 0x40e57d
inc ecx
mov dword [0x419168], ecx
push 0
push 0x4191b0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40e42c
xor eax, eax
jmp 0x40e612
test esi, esi
jle 0x40e42c
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4191b0
call ebx
test eax, eax
jne 0x40e42c
cmp dword [esi*4 + 0x419170], edi
je 0x40e5e9
mov eax, dword [0x419168]
lea esi, [eax - 1]
test esi, esi
jl 0x40e5d7
cmp dword [esi*4 + 0x419170], edi
je 0x40e5d3
dec esi
jns 0x40e5c7
test esi, esi
jge 0x40e5e7
cmp eax, 0x10
jge 0x40e5e2
inc eax
mov dword [0x419168], eax
lea esi, [eax - 1]
jmp 0x40e5e9
je 0x40e601
xor ecx, ecx
test esi, esi
jl 0x40e601
lea eax, [ecx*4 + 0x419170]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40e5ef
push 0
push 0x4191b0
call ebx
jmp 0x40e42c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e632
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4191bc], ebx
push esi
push edi
jne 0x40e6b2
push 0x4149f8
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40e6ed
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4149ec
push edi
call esi
test eax, eax
mov dword [0x4191bc], eax
je 0x40e6ed
push 0x4149dc
push edi
call esi
push 0x4149c8
push edi
mov dword [0x4191c0], eax
call esi
cmp dword [0x418e80], 2
mov dword [0x4191c4], eax
jne 0x40e6b2
push 0x4149ac
push edi
call esi
test eax, eax
mov dword [0x4191cc], eax
je 0x40e6b2
push 0x414994
push edi
call esi
mov dword [0x4191c8], eax
mov eax, dword [0x4191c8]
test eax, eax
je 0x40e6f7
call eax
test eax, eax
je 0x40e6de
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x4191cc]
test eax, eax
je 0x40e6de
test byte [ebp - 8], 1
jne 0x40e6f7
cmp dword [0x418e8c], 4
jb 0x40e6f1
or byte [ebp + 0x12], 0x20
jmp 0x40e716
xor eax, eax
jmp 0x40e726
or byte [ebp + 0x12], 4
jmp 0x40e716
mov eax, dword [0x4191c0]
test eax, eax
je 0x40e716
call eax
mov ebx, eax
test ebx, ebx
je 0x40e716
mov eax, dword [0x4191c4]
test eax, eax
je 0x40e716
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4191bc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40edff
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4173a0]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40ee30
xor eax, eax
jmp 0x40efb9
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x419460]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40ee6c
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00410577
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40ef47
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40ef85
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40eed0
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40eec1
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x40eea1
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ef10
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40ef19
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40ee92
jmp 0x40ef1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40efb4
cmp dword [ebp - 0x6c], edi
je 0x40ef85
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40ef7a
call fcn.0040c543
mov dword [eax], 9
call fcn.0040c54c
mov dword [eax], esi
jmp 0x40efaf
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ef6f
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40ef1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40ef1b
push dword [ebp - 0x6c]
call fcn.0040c555
pop ecx
jmp 0x40efaf
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40ef9d
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40ef9d
xor eax, eax
jmp 0x40efb7
call fcn.0040c543
mov dword [eax], 0x1c
call fcn.0040c54c
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40efb7
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0040857d
add ebp, 0x3a0
leave
ret
Function at 0x40f4f2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x40f6c6
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x419460]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40f6c6
test cl, 0x48
je 0x40f55d
cmp byte [eax + 5], 0xa
je 0x40f55d
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f5af
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40f597
call fcn.0040c543
mov dword [eax], 9
call fcn.0040c54c
mov dword [eax], esi
jmp 0x40f5a7
cmp eax, 0x6d
je 0x40f6c6
push eax
call fcn.0040c555
pop ecx
or eax, 0xffffffff
jmp 0x40f6c8
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40f6c1
test eax, eax
je 0x40f5d6
cmp byte [ebx], 0xa
jne 0x40f5d6
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40f5df
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40f6bb
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40f6ab
cmp al, 0xd
je 0x40f611
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40f69d
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40f62b
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40f626
add dword [ebp + 0x10], 2
jmp 0x40f67f
mov dword [ebp + 0x10], eax
jmp 0x40f699
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
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 0x40f653
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40f699
cmp dword [ebp - 0xc], 0
je 0x40f699
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40f674
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40f67f
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40f69c
cmp ebx, dword [ebp + 0xc]
jne 0x40f684
cmp byte [ebp - 1], 0xa
jne 0x40f684
mov byte [ebx], 0xa
jmp 0x40f69c
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040ece0
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40f69d
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40f5f5
jmp 0x40f6bb
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40f6bb
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40f6c8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4105fa
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.004076f0
mov eax, dword [0x4173a0]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.0040ece0
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1008], eax
je 0x41072d
push 2
push esi
push dword [ebp + 8]
call fcn.0040ece0
add esp, 0xc
cmp eax, ebx
je 0x41072d
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x4106cd
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00408590
push 0x8000
push dword [ebp + 8]
call fcn.00411091
add esp, 0x14
mov dword [ebp - 0x100c], eax
cmp edi, ebx
mov eax, ebx
jge 0x410683
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call fcn.0040edff
add esp, 0xc
cmp eax, 0xffffffff
je 0x4106a3
sub edi, eax
test edi, edi
jg 0x41067b
jmp 0x4106bb
call fcn.0040c54c
cmp dword [eax], 5
jne 0x4106b8
call fcn.0040c543
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0x100c]
push dword [ebp + 8]
call fcn.00411091
pop ecx
pop ecx
jmp 0x410715
jge 0x410715
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040ece0
push dword [ebp + 8]
call fcn.0040f1b7
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x410715
call fcn.0040c543
mov dword [eax], 0xd
call fcn.0040c54c
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0x1008]
push dword [ebp + 8]
call fcn.0040ece0
add esp, 0xc
mov eax, esi
pop edi
jmp 0x41072f
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0040857d
leave
ret
Function at 0x401a20
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._vfprintf
call sym._abort
jmp dbg.mark_section_writable

Function at 0x401a80
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x405050]
test esi, esi
jle 0x401b6d
mov edi, dword [0x405054]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401ab4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x401b66
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x401aa0
mov dword [esp], eax
mov ebx, eax
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x401baa
lea ebx, [esi + esi*2]
mov esi, dword [0x405054]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x405054]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401b8a
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401b5f
sub eax, 0x40
and eax, 0xffffffbf
je 0x401b5f
mov eax, dword [esp + 0x20]
add ebx, dword [0x405054]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x401b74
add dword [0x405050], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x401abe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
mov eax, dword [0x405054]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
Function at 0x402070
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x405408
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x405400]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x4020c5
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4020be
test esi, esi
je 0x4020be
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4020a0
mov dword [esp], 0x405408
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4022e0
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x402318
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x40230e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40231a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402300
xor eax, eax
pop ebx
pop esi
ret
Function at 0x40a15c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
mov word [ebp + 0xc], ax
mov ebx, 0x19826993
mov eax, ebx
mul ebx
mov dword [ebp - 0x10], eax
mov ebx, eax
xor esi, esi
mov eax, ebx
mul ebx
mov dword [ebp - 0x14], eax
mov ebx, eax
mov word [ebp - 0xc], 0
jmp 0x40a272
mov eax, ebx
xor eax, ebx
mov ebx, eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
call fcn.00405066
pop ecx
mov edx, eax
mov byte [ebp - 1], dl
cmp byte [ebp - 1], 0
jne 0x40a1b3
mov byte [ebp - 2], 0
jmp 0x40a1dd
call fcn.0040ddd8
mov dword [ebp - 0x18], eax
mov eax, 0x7fff
mov edi, 7
movzx edx, byte [ebp - 1]
mov ecx, edi
sub ecx, edx
cdq
idiv ecx
mov ecx, eax
mov eax, dword [ebp - 0x18]
cdq
idiv ecx
mov edx, eax
mov byte [ebp - 2], dl
mov eax, dword [ebp + 8]
mov al, byte [esi + eax]
cmp al, 0x70
jb 0x40a1fc
cmp al, 0x7f
ja 0x40a1fc
mov eax, dword [ebp + 8]
add eax, esi
inc eax
movzx edx, byte [eax]
movzx ecx, byte [ebp - 2]
sub edx, ecx
mov byte [eax], dl
mov eax, dword [ebp + 8]
movzx eax, byte [esi + eax]
cmp eax, 0xe2
jne 0x40a21b
mov eax, dword [ebp + 8]
add eax, esi
inc eax
movzx edx, byte [eax]
movzx ecx, byte [ebp - 2]
sub edx, ecx
mov byte [eax], dl
mov eax, ebx
sub eax, ebx
mov ebx, eax
push 8
push 0x90
lea eax, [ebp - 0xa]
push eax
call fcn.0040ddc0
movzx eax, byte [ebp - 1]
push eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
lea eax, [ebp - 0xa]
movzx edx, byte [ebp - 2]
add eax, edx
push eax
call fcn.0040ddb4
mov eax, ebx
sub eax, ebx
mov ebx, eax
push 6
lea eax, [ebp - 0xa]
push eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
call fcn.0040ddb4
add esp, 0x24
mov eax, ebx
add eax, ebx
mov ebx, eax
add esi, 6
inc word [ebp - 0xc]
movzx eax, word [ebp + 0xc]
dec eax
cmp esi, eax
jb 0x40a190
pop edi
pop esi
pop ebx
leave
ret

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

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [0x407054], 1
mov dword [0x407058], 1
mov dword [0x40705c], 1
mov dword [0x407048], 1
mov dword [ebp - 4], 0x400000
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x401415
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x401438
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
movzx eax, ax
cmp eax, 0x10b
je 0x40145a
cmp eax, 0x20b
je 0x40147f
jmp 0x4014aa
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
cmp eax, 0xe
ja 0x40146c
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x4014af
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, 0xe
ja 0x401497
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x4014af
mov eax, 0
leave
ret

Function at 0x401ca8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
lea eax, [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [esp], 2
call fcn.00402ce8
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov ebx, dword [ebp - 0xc]
mov dword [esp], 2
call fcn.00402ce8
mov dword [esp + 8], ebx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort

Function at 0x4027f8
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x402817
mov eax, 0
jmp 0x40285b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x40283a
mov eax, 0
jmp 0x40285b
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
cmp ax, 0x10b
je 0x402856
mov eax, 0
jmp 0x40285b
mov eax, 1
leave
ret
Function at 0x40285d
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x14]
movzx edx, ax
mov eax, dword [ebp - 0xc]
add eax, edx
add eax, 0x18
mov dword [ebp - 4], eax
jmp 0x4028bc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
cmp dword [ebp + 0xc], eax
jb 0x4028b4
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, edx
cmp dword [ebp + 0xc], eax
jae 0x4028b4
mov eax, dword [ebp - 4]
jmp 0x4028d0
add dword [ebp - 8], 1
add dword [ebp - 4], 0x28
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 8], eax
jb 0x402891
mov eax, 0
leave
ret

Function at 0x402e50
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cmp dword [0x404020], 0
jne 0x402f96
push ebp
xor ecx, ecx
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 0xc]
xor eax, eax
mov esi, dword [edx + 0x18]
test esi, esi
je 0x402eb5
mov ecx, dword [esi + 0x3c]
mov ecx, dword [esi + ecx + 0x78]
test ecx, ecx
je 0x402eaf
lea eax, [esi + ecx]
mov ebx, dword [eax + 0xc]
add ebx, esi
mov ecx, dword [ebx]
or ecx, 0x20202020
cmp ecx, 0x6c64746e
jne 0x402eaf
mov ecx, dword [ebx + 4]
or ecx, 0x20202020
cmp ecx, 0x6c642e6c
je 0x402ec1
mov edx, dword [edx]
mov ecx, esi
jmp 0x402e74
xor edx, edx
test eax, eax
je 0x402f8c
mov esi, ecx
mov edx, dword [eax + 0x20]
mov edi, dword [eax + 0x24]
mov dword [0x404fe4], esi
xor ebx, ebx
mov ebp, dword [eax + 0x1c]
add edi, esi
add edx, esi
mov dword [esp + 8], edi
mov edi, dword [eax + 0x18]
add ebp, esi
mov dword [esp + 4], edx
dec edi
mov edx, dword [esp + 4]
mov eax, dword [edx + edi*4]
add eax, esi
cmp word [eax], 0x775a
jne 0x402f2a
mov dword [esp], eax
lea ecx, [ebx*8 + 0x404024]
mov dword [esp + 0xc], ecx
call fcn.00402e30
mov ecx, dword [esp + 0xc]
mov dword [ebx*8 + 0x404024], eax
mov eax, dword [esp + 8]
inc ebx
movzx eax, word [eax + edi*2]
mov eax, dword [ebp + eax*4]
mov dword [ecx + 4], eax
cmp ebx, 0x1f4
je 0x402f35
lea eax, [edi - 1]
test edi, edi
je 0x402f35
mov edi, eax
jmp 0x402ee4
mov dword [0x404020], ebx
dec ebx
test ebx, ebx
je 0x402f87
xor eax, eax
mov edx, dword [eax*8 + 0x404028]
inc eax
mov ecx, dword [eax*8 + 0x404028]
cmp edx, ecx
ja 0x402f5b
cmp eax, ebx
jb 0x402f42
jmp 0x402f3b
mov esi, dword [eax*8 + 0x40401c]
mov edi, dword [eax*8 + 0x404024]
mov dword [eax*8 + 0x404020], ecx
mov dword [eax*8 + 0x404028], edx
mov dword [eax*8 + 0x40401c], edi
mov dword [eax*8 + 0x404024], esi
jmp 0x402f55
mov edx, 1
add esp, 0x10
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, 1
mov eax, edx
ret