joyce8/EMBER2024-capa huggingface dataset:
Function at 0x480cc0
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], 0
jmp 0x480cdb
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xe3
jge 0x480d3d
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + ecx*4 + 0x9c4]
and eax, 0x80000000
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + ecx*4 + 0x9c8]
and ecx, 0x7fffffff
or eax, ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
shr edx, 1
mov eax, dword [ebp - 0xc]
and eax, 1
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor edx, eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
xor edx, dword [eax + ecx*4 + 0xff8]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
mov dword [eax + ecx*4 + 4], edx
jmp 0x480cd2
jmp 0x480d48
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0x26f
jge 0x480dac
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + edx*4 + 0x9c4]
and ecx, 0x80000000
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + edx*4 + 0x9c8]
and edx, 0x7fffffff
or ecx, edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
shr eax, 1
mov ecx, dword [ebp - 0x10]
and ecx, 1
neg ecx
sbb ecx, ecx
and ecx, 0x9908b0df
xor eax, ecx
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
xor eax, dword [ecx + edx*4 - 0x388]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + edx*4 + 4], eax
jmp 0x480d3f
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + edx*4 + 0x9c4]
and ecx, 0x80000000
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 4]
and eax, 0x7fffffff
or ecx, eax
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
shr ecx, 1
mov edx, dword [ebp - 8]
and edx, 1
neg edx
sbb edx, edx
and edx, 0x9908b0df
xor ecx, edx
mov eax, dword [ebp - 0x14]
xor ecx, dword [eax + 0x634]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
mov dword [eax + edx*4 + 4], ecx
mov ecx, dword [ebp - 0x14]
mov dword [ecx], 0
mov esp, ebp
pop ebp
ret

Function at 0x480e10
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], 0x270
jmp 0x480e2b
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x4e0
jge 0x480e8d
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + ecx*4 - 0x9bc]
and eax, 0x80000000
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + ecx*4 - 0x9b8]
and ecx, 0x7fffffff
or eax, ecx
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
shr edx, 1
mov eax, dword [ebp - 8]
and eax, 1
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor edx, eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
xor edx, dword [eax + ecx*4 - 0x388]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
mov dword [eax + ecx*4 + 4], edx
jmp 0x480e22
mov esp, ebp
pop ebp
ret
Function at 0x480e00
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x4c000]
push edi
or ebp, 0xffffffff
jmp 0x480e22
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x480e29
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x480e18
mov eax, 1
add ebx, ebx
jne 0x480e3b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x480e30
jne 0x480e4c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x480e30
xor ecx, ecx
sub eax, 3
jb 0x480e60
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x480ed2
mov ebp, eax
add ebx, ebx
jne 0x480e6b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x480e78
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x480e9c
inc ecx
add ebx, ebx
jne 0x480e88
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x480e7d
jne 0x480e99
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x480e7d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x480ebc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x480ead
jmp 0x480e1e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x480ebc
add edi, ecx
jmp 0x480e1e
pop esi
mov edi, esi
mov ecx, 0x1e66
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x480eda
cmp byte [edi], 0x11
jne 0x480eda
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 0x480edf
lea edi, [esi + 0x7b000]
mov eax, dword [edi]
or eax, eax
je 0x480f4e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x9523c]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x952c8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x480f0c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x952cc]
or eax, eax
je 0x480f48
mov dword [ebx], eax
add ebx, 4
jmp 0x480f29
call dword [esi + 0x952dc]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x480f7f
cmp al, 0xef
ja 0x480f72
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x480f54
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x480f61
mov ebp, dword [esi + 0x952d0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x217]
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 0x480fb3
sub esp, 0xffffff80
jmp 0x434858
Function at 0x401610
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebx, dword [esp + 0x80]
mov edi, dword [esp + 0x84]
mov eax, dword [ebx]
test eax, eax
je 0x401790
mov esi, dword [ebx + 4]
mov eax, dword [edi + 4]
mov ebp, dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esp], eax
call ebp
sub esp, 4
add esi, eax
mov dword [esp + 4], esi
mov dword [esp + 8], 0
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [edi + 8]
mov dword [esp], eax
call ebp
sub esp, 4
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x4017d3
mov edx, dword [ebx]
mov eax, dword [edi + 8]
mov dword [esp + 0x1c], edx
mov dword [esp], eax
call ebp
sub esp, 4
mov edx, dword [esp + 0x1c]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [esp + 0xc], edx
call sub.msvcrt.dll_fread
test eax, eax
je 0x4017c0
cmp byte [edi + 0x10], 1
je 0x4016d1
mov eax, dword [ebx]
test eax, eax
je 0x4016c7
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebx], 0
add esp, 0x6c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00405d20
mov eax, dword [edi + 0xc]
mov dword [esp], eax
call ebp
sub esp, 4
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [esp + 0x1c], eax
je 0x40183a
mov eax, dword [edi + 8]
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x28], esi
mov dword [esp], eax
call ebp
sub esp, 4
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0xc]
mov dword [esp], eax
call ebp
sub esp, 4
lea ebp, [esp + 0x28]
mov dword [esp + 8], 0x38
mov dword [esp + 4], 0x40c093
mov dword [esp + 0x38], eax
mov dword [esp], ebp
call fcn.004061e0
test eax, eax
js 0x4017e6
mov dword [esp + 4], 4
mov dword [esp], ebp
call fcn.00406280
test eax, eax
js 0x401820
mov dword [esp], ebp
call fcn.00408150
mov dword [esp], esi
call sub.msvcrt.dll_free
mov esi, dword [esp + 0x1c]
jmp 0x4016b3
lea eax, [ebx + 0x68]
mov dword [esp + 4], 0x40c02c
mov dword [esp], eax
call fcn.00403250
test eax, eax
mov dword [ebx], eax
jne 0x40162f
mov dword [esp], str.Cannot_open_archive_file_n
xor esi, esi
call fcn.00401f00
jmp 0x4016c7
mov dword [esp], str.Could_not_read_from_file_n
xor esi, esi
call fcn.00401f00
jmp 0x4016c7
mov dword [esp], str.Could_not_allocate_read_buffer_n
xor esi, esi
call fcn.00401f00
jmp 0x4016c7
mov edx, dword [esp + 0x40]
mov dword [esp + 4], eax
mov dword [esp], str.Error__d_from_inflateInit:__s_n
mov dword [esp + 8], edx
call fcn.00401f00
mov dword [esp], esi
add edi, 0x12
xor esi, esi
call sub.msvcrt.dll_free
mov dword [esp + 4], edi
mov dword [esp], str.Error_decompressing__s_n
call fcn.00401f00
jmp 0x4016c7
mov edx, dword [esp + 0x40]
mov dword [esp + 4], eax
mov dword [esp], str.Error__d_from_inflate:__s_n
mov dword [esp + 8], edx
call fcn.00401f00
jmp 0x4017fe
mov dword [esp], str.Error_allocating_decompression_buffer_n
call fcn.00401f00
jmp 0x4017fe
Function at 0x401850
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.00401610
mov dword [esp], ebx
mov edi, eax
call fcn.00404cd0
cmp eax, 0xffffffff
je 0x4018d9
lea ebp, [esi + 0x12]
add ebx, 0x2068
mov dword [esp], ebx
mov dword [esp + 4], ebp
call fcn.00404f00
mov ebx, eax
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_ntohl]
sub esp, 4
test ebx, ebx
mov esi, eax
je 0x4018f8
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_fwrite
cmp eax, 1
je 0x4018c7
test esi, esi
jne 0x4018e1
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp], edi
call sub.msvcrt.dll_free
xor eax, eax
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebp
mov dword [esp], str.Failed_to_write_all_bytes_for__s_n
call fcn.00401ea0
mov eax, 0xffffffff
jmp 0x4018d9
mov dword [esp + 4], ebp
mov dword [esp], str._s_could_not_be_extracted__n
call fcn.00401ea0
mov eax, 0xffffffff
jmp 0x4018d9
Function at 0x404a60
Capabilities:
Delete file

Disassembly:
push ebx
mov ebx, eax
sub esp, 0x18
mov dword [esp], 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
mov dword [esp], ebx
call sub.msvcrt.dll_remove
add esp, 0x18
pop ebx
ret

Function at 0x404a90
Capabilities:
Query environment variable

Disassembly:
push ebx
mov eax, 0x4018
call fcn.0040abb0
sub esp, eax
mov eax, dword [esp + 0x4020]
lea ebx, [esp + 0x10]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405770
mov dword [esp + 8], 0x2000
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
sub esp, 0xc
test eax, eax
jne 0x404af0
add esp, 0x4018
xor eax, eax
pop ebx
ret
lea eax, [esp + 0x2010]
mov dword [esp + 8], 0x2000
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub esp, 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0
call fcn.004055d0
test eax, eax
je 0x404adc
cmp byte [eax], 0
je 0x404adc
mov dword [esp], eax
call sub.msvcrt.dll__strdup
add esp, 0x4018
pop ebx
ret

Function at 0x404b40
Capabilities:
Set environment variable

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405770
mov esi, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405770
mov dword [esp], esi
mov ebx, eax
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov edi, eax
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [esp], ebx
call sub.msvcrt.dll_free
add esp, 0x10
mov eax, edi
pop ebx
pop esi
pop edi
ret

Function at 0x404bb0
Capabilities:
Set environment variable

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00405770
mov dword [esp + 4], 0
mov ebx, eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov esi, eax
mov dword [esp], ebx
call sub.msvcrt.dll_free
add esp, 0x14
mov eax, esi
pop ebx
pop esi
ret
Function at 0x404c00
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
push edi
mov eax, 0x202c
push esi
push ebx
call fcn.0040abb0
sub esp, eax
lea ebx, [esp + 0x20]
mov esi, dword [esp + 0x2040]
mov dword [esp], 0x1000
mov dword [esp + 4], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub esp, 8
lea edi, [esp + 0x10]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0x1000
mov dword [esp], esi
mov ebx, 5
call fcn.004055d0
call sub.msvcrt.dll__getpid
mov dword [esp + 4], str._MEI_d
mov dword [esp + 8], eax
mov dword [esp], edi
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__tempnam]
mov dword [esp], eax
mov ebp, eax
call sub.msvcrt.dll__mkdir
test eax, eax
je 0x404ca0
mov dword [esp], ebp
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x404c65
add esp, 0x202c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebp
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
mov dword [esp], ebp
call sub.msvcrt.dll_free
add esp, 0x202c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x404d30
Capabilities:
Delete directory

Disassembly:
push ebp
push edi
mov eax, 0x125c
push esi
push ebx
call fcn.0040abb0
sub esp, eax
mov eax, dword [esp + 0x1270]
lea ebp, [esp + 0x24f]
mov dword [esp], ebp
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], ebp
call sub.msvcrt.dll_strlen
mov edx, eax
mov dword [esp + 0x12c], eax
movzx edx, byte [esp + edx + 0x24e]
cmp dl, 0x5c
je 0x404d81
cmp dl, 0x2f
jne 0x404e30
lea ebx, [esp + 0x134]
mov edx, 0x2a
mov word [ebp + eax], dx
mov dword [esp], ebp
mov dword [esp + 4], ebx
call dword [sym.imp.msvcrt.dll__findfirst]
cmp eax, 0xffffffff
mov dword [esp + 0x128], eax
je 0x404e11
mov edi, esp
mov esi, ebx
mov ecx, 0x46
rep movsd dword es:[edi], dword [esi]
mov eax, ebp
mov edx, dword [esp + 0x12c]
call fcn.00404e60
jmp 0x404de9
mov edi, esp
mov esi, ebx
mov ecx, 0x46
rep movsd dword es:[edi], dword [esi]
mov eax, ebp
mov edx, dword [esp + 0x12c]
call fcn.00404e60
mov eax, dword [esp + 0x128]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__findnext]
test eax, eax
je 0x404dd0
mov eax, dword [esp + 0x128]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__findclose]
mov eax, dword [esp + 0x1270]
mov dword [esp], eax
call sub.msvcrt.dll__rmdir
add esp, 0x125c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, 0x5c
mov word [ebp + eax], cx
add eax, 1
mov dword [esp], ebp
mov dword [esp + 0x12c], eax
call sub.msvcrt.dll_strlen
jmp 0x404d81
Function at 0x404e60
Capabilities:
Delete file

Disassembly:
push ebp
push edi
mov ecx, 2
push esi
push ebx
mov edi, 0x40db9c
mov ebp, eax
sub esp, 0x1c
lea ebx, [esp + 0x44]
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
seta cl
mov esi, ecx
setb cl
mov eax, esi
cmp al, cl
je 0x404e99
mov edi, 0x40db9e
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x404ea1
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [ebp + edx], 0
mov dword [esp + 4], ebx
mov dword [esp], ebp
call sub.msvcrt.dll_strcat
test byte [esp + 0x30], 0x10
mov dword [esp], ebp
jne 0x404ed0
call sub.msvcrt.dll_remove
test eax, eax
je 0x404e99
mov eax, ebp
call fcn.00404a60
jmp 0x404e99
call fcn.00404d30
jmp 0x404e99

Function at 0x404f00
Capabilities:
Create directory

Disassembly:
push edi
push esi
mov eax, 0x2040
push ebx
call fcn.0040abb0
sub esp, eax
mov eax, dword [esp + 0x2050]
lea edi, [esp + 0x40]
lea ebx, [esp + 0x1040]
lea esi, [esp + 0x1c]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov eax, dword [esp + 0x2054]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], ebx
mov dword [esp + 4], 0x40dba1
call sub.msvcrt.dll_strtok
test eax, eax
mov ebx, eax
je 0x404fe0
nop
mov ecx, edi
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x404f62
mov eax, edx
shr eax, 0x10
test edx, 0x8080
cmove edx, eax
lea eax, [ecx + 2]
cmove ecx, eax
add dl, dl
sbb ecx, 3
sub ecx, edi
lea eax, [edi + ecx + 1]
mov byte [edi + ecx], 0x5c
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov dword [esp + 4], 0x40dba1
mov dword [esp], 0
call sub.msvcrt.dll_strtok
test eax, eax
mov ebx, eax
je 0x404fe0
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0040abf0
test eax, eax
jns 0x404f60
mov dword [esp], edi
call sub.msvcrt.dll__mkdir
jmp 0x404f60
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0040abf0
test eax, eax
je 0x405010
mov dword [esp], edi
mov dword [esp + 4], 0x40dbd5
call fcn.00403250
add esp, 0x2040
pop ebx
pop esi
pop edi
ret
mov dword [esp + 4], edi
mov dword [esp], str.WARNING:_file_already_exists_but_should_not:__s_n
call fcn.00401f00
jmp 0x404ff0
Function at 0x405030
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push edi
push esi
mov eax, 0x1010
push ebx
call fcn.0040abb0
sub esp, eax
mov eax, dword [esp + 0x1020]
mov dword [esp + 4], 0x40dbd8
mov dword [esp], eax
call fcn.00403250
mov ebx, eax
mov eax, dword [esp + 0x1028]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1024]
mov dword [esp], eax
call fcn.00404f00
test eax, eax
mov edi, eax
je 0x405135
test ebx, ebx
je 0x405135
lea esi, [esp + 0x10]
nop
lea esi, [esi]
mov dword [esp], ebx
call sub.msvcrt.dll_feof
test eax, eax
jne 0x405131
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x1000
mov dword [esp], esi
call sub.msvcrt.dll_fread
cmp eax, 0xffffffff
je 0x405112
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x1000
mov dword [esp], esi
call sub.msvcrt.dll_fwrite
mov dword [esp], edi
call sub.msvcrt.dll_ferror
test eax, eax
je 0x405090
mov dword [esp], edi
mov esi, 0xffffffff
call sub.msvcrt.dll_clearerr
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp], edi
call sub.msvcrt.dll_fclose
mov eax, esi
add esp, 0x1010
pop ebx
pop esi
pop edi
ret
mov dword [esp], ebx
call sub.msvcrt.dll_ferror
test eax, eax
je 0x405090
mov dword [esp], ebx
mov esi, 0xffffffff
call sub.msvcrt.dll_clearerr
jmp 0x4050f6
xor esi, esi
jmp 0x4050f6
mov eax, 0xffffffff
jmp 0x405108
Function at 0x4051b0
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
push edi
push esi
mov eax, 0x20a0
push ebx
call fcn.0040abb0
sub esp, eax
mov eax, dword [esp + 0x20b0]
lea esi, [esp + 0xa0]
mov dword [esp + 8], 0x1000
mov dword [esp + 0x3c], 0
lea edi, [esp + 0x5c]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00405770
mov dword [esp + 4], 1
mov dword [esp], 0x16
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 0xf
call sub.msvcrt.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 0x15
call sub.msvcrt.dll_signal
mov dword [esp], str.LOADER:_Setting_up_to_run_child_n
call fcn.00401f60
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 1
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, 1
sub esp, 4
mov word [esp + 0x8c], ax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x88], 0x101
mov dword [esp], eax
call sub.msvcrt.dll__fileno
mov ebx, dword [sym.imp.msvcrt.dll__get_osfhandle]
mov dword [esp], eax
call ebx
mov dword [esp + 0x94], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll__fileno
mov dword [esp], eax
call ebx
mov dword [esp + 0x98], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll__fileno
mov dword [esp], eax
call ebx
mov dword [esp], str.LOADER:_Creating_child_process_n
mov dword [esp + 0x9c], eax
call fcn.00401f60
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea edx, [esp + 0x4c]
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], edx
lea edx, [esp + 0x40]
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
jne 0x405371
mov dword [esp], str.Error_creating_child_process__n
call fcn.00401ea0
add esp, 0x20a0
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
ret
mov dword [esp], str.LOADER:_Waiting_for_child_process_to_finish..._n
call fcn.00401f60
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
sub esp, 8
mov eax, dword [esp + 0x3c]
add esp, 0x20a0
pop ebx
pop esi
pop edi
ret
Function at 0x409fb0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
lea ebx, [esp + 0x24]
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_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 sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp fcn.0040a010

Function at 0x40a010
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x3c
mov eax, dword [0x41e2f0]
test eax, eax
jle 0x40a113
mov edx, dword [0x41e2f4]
xor ebx, ebx
mov ecx, dword [edx + 4]
cmp ecx, esi
ja 0x40a041
mov edi, dword [edx + 8]
add ecx, dword [edi + 8]
cmp esi, ecx
jb 0x40a0b6
add ebx, 1
add edx, 0xc
cmp ebx, eax
jne 0x40a030
mov dword [esp], esi
call fcn.0040a990
test eax, eax
mov edi, eax
je 0x40a13a
lea esi, [ebx + ebx*2]
mov ebx, dword [0x41e2f4]
shl esi, 2
add ebx, esi
mov dword [ebx + 8], eax
mov dword [ebx], 0
call fcn.0040aa80
add eax, dword [edi + 0xc]
mov dword [ebx + 4], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [0x41e2f4]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x40a11a
mov eax, dword [ebp - 0x20]
cmp eax, 0x40
jne 0x40a0c0
add dword [0x41e2f0], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 4
je 0x40a0af
cmp eax, 0x80
je 0x40a0af
cmp eax, 8
je 0x40a0af
mov eax, dword [ebp - 0x28]
add esi, dword [0x41e2f4]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x40a0af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00409fb0
xor ebx, ebx
jmp 0x40a04b
mov eax, dword [0x41e2f4]
mov eax, dword [eax + esi + 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 fcn.00409fb0
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00409fb0
lea esi, [esi]

Function at 0x40a8b0
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 0x40a8e8
xor edx, edx
nop
mov ecx, dword [eax + 0xc]
cmp ecx, ebx
ja 0x40a8de
add ecx, dword [eax + 8]
cmp ebx, ecx
jb 0x40a8ea
add edx, 1
add eax, 0x28
cmp edx, esi
jb 0x40a8d0
xor eax, eax
pop ebx
pop esi
ret