joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402e80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [ebp - 0x10], 0
mov esi, dword [ebp + 8]
mov dword [ebp - 0x14], 0
test esi, esi
je 0x402feb
lea eax, [ebp - 0x10]
push edx
push edx
push eax
push esi
call fcn.00404d60
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x403009
cld
mov edi, str.ANDROID_
mov ecx, 8
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x402f97
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402fc6
lea eax, [ebp - 0x14]
push edi
push edi
push eax
mov esi, dword [ebp + 0xc]
push esi
call fcn.00404d60
add esp, 0x10
mov esi, eax
test eax, eax
je 0x40304f
mov edi, dword [sym.imp.msvcrt.dll__iob]
add edi, 0x40
push edi
push 0x17
push 1
push str.creating_boot_image..._n
call sub.msvcrt.dll_fwrite
lea eax, [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [0x42002c]
push eax
mov eax, dword [0x42001c]
push eax
mov eax, dword [0x420018]
push eax
mov eax, dword [0x420028]
push eax
push 0
push 0
mov eax, dword [0x420024]
push eax
mov eax, dword [ebp - 0x14]
push eax
push esi
mov ecx, dword [0x420020]
push ecx
mov edx, dword [ebp - 0x10]
push edx
push ebx
call fcn.00402890
add esp, 0x40
mov esi, eax
test eax, eax
je 0x403036
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x402f70
push eax
push eax
mov eax, dword [ebp + 0x14]
push eax
push esi
call fcn.00402980
add esp, 0x10
push eax
mov ebx, esi
mov eax, dword [ebp - 0x18]
push eax
push str.creating_boot_image____d_bytes_n
push edi
call sub.msvcrt.dll_fprintf
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x18]
add esp, 0x10
mov dword [edx], eax
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x402fad
push eax
push eax
mov eax, dword [ebp + 0x14]
push eax
push ebx
call fcn.00402980
add esp, 0x10
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x402fcd
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
jmp 0x402ef7
mov eax, dword [sym.imp.msvcrt.dll__iob]
xor ebx, ebx
add eax, 0x40
push eax
push 0x25
push 1
push str.cannot_boot_a_boot.img_and_ramdisk_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x402f8d
mov eax, dword [sym.imp.msvcrt.dll__iob]
xor ebx, ebx
add eax, 0x40
push eax
push 0x13
push 1
push str.no_image_specified_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x402f8d
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push eax
call sub.msvcrt.dll_strerror
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push esi
push str.cannot_load__s:__s_n
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x20
jmp 0x402f8d
push edi
push 0x1a
push 1
push str.failed_to_create_boot.img_n
call sub.msvcrt.dll_fwrite
xor ebx, ebx
add esp, 0x10
jmp 0x402f8d
call sub.msvcrt.dll__errno
sub esp, 0xc
xor ebx, ebx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strerror
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [ebp + 0xc]
add eax, 0x40
push edx
push str.cannot_load__s:__s_n
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x20
jmp 0x402f8d
Function at 0x4030b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov eax, dword [0x429318]
mov ebp, esp
test eax, eax
push esi
push ebx
je 0x4030c5
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
mov esi, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 1
add esi, 0x40
jmp 0x4030e4
sub esp, 0xc
xor ebx, ebx
push 1
call fcn.00404790
add esp, 0x10
sub esp, 0xc
push 0x402a80
call fcn.00404c60
add esp, 0x10
mov dword [0x429318], eax
test eax, eax
jne 0x4030be
test ebx, ebx
je 0x4030d5
push esi
push 0x17
push 1
push str.__waiting_for_device___n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x4030d5

Function at 0x403104
Capabilities:
Write file on windows

Disassembly:
push ebp
mov eax, dword [0x429318]
mov ebp, esp
test eax, eax
push esi
push ebx
je 0x4030c5
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
mov esi, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 1
add esi, 0x40
jmp 0x4030e4
sub esp, 0xc
xor ebx, ebx
push 1
call fcn.00404790
add esp, 0x10
sub esp, 0xc
push 0x402a80
call fcn.00404c60
add esp, 0x10
mov dword [0x429318], eax
test eax, eax
jne 0x4030be
test ebx, ebx
je 0x4030d5
push esi
push 0x17
push 1
push str.__waiting_for_device___n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x4030d5

Function at 0x403190
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ebp + 0xc]
add ebx, 0x40
mov dword [ebp - 8], eax
push ebx
push 7
push 1
push str.error:
call sub.msvcrt.dll_fwrite
add esp, 0xc
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 8]
push eax
push ecx
push ebx
call sub.msvcrt.dll_vfprintf
pop eax
pop edx
push ebx
push 0xa
call sub.msvcrt.dll_fputc
mov dword [esp], 1
call sub.msvcrt.dll_exit
lea esi, [esi]
Function at 0x4039e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ecx, 5
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x19c
mov edi, str.boot
cld
mov esi, dword [ebp + 8]
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
mov esi, str.boot.img
cmp dl, al
jne 0x403a54
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x403b20
sub esp, 0xc
lea ebx, [ebp - 0x18f]
push ebx
call fcn.00404e90
push esi
mov esi, dword [ebp + 0xc]
push esi
push str..._.._.._target_product__s__s
push ebx
call sub.msvcrt.dll_strlen
lea eax, [ebx + eax]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
add esp, 0x14
push ebx
call sub.msvcrt.dll__strdup
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebp + 8]
mov edi, str.recovery
mov ecx, 9
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
mov esi, str.recovery.img
cmp dl, al
je 0x403a0b
mov esi, dword [ebp + 8]
mov edi, str.system
mov ecx, 7
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
mov esi, str.system.img
cmp dl, al
je 0x403a0b
mov esi, dword [ebp + 8]
mov edi, str.userdata
mov ecx, 9
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
mov esi, str.userdata.img
cmp dl, al
je 0x403a0b
mov esi, dword [ebp + 8]
mov edi, str.cache
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
mov esi, str.cache.img
cmp dl, al
je 0x403a0b
mov esi, dword [ebp + 8]
mov edi, str.info
mov ecx, 5
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
mov esi, str.android_info.txt
cmp dl, al
je 0x403a0b
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push str.unknown_partition__s_n
push eax
call sub.msvcrt.dll_fprintf
xor eax, eax
add esp, 0x10
jmp 0x403a4c
sub esp, 0xc
push str.ANDROID_PRODUCT_OUT
call sub.msvcrt.dll_getenv
add esp, 0x10
test eax, eax
je 0x403b39
cmp byte [eax], 0
jne 0x403b53
sub esp, 0xc
push str.neither__p_product_specified_nor_ANDROID_PRODUCT_OUT_set
call fcn.00403190
xor eax, eax
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [ebp - 0x18f]
push esi
push eax
push str._s__s
push ebx
call sub.msvcrt.dll_sprintf
mov dword [esp], ebx
call sub.msvcrt.dll__strdup
add esp, 0x10
jmp 0x403a4c
Function at 0x404d60
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x20
mov eax, dword [ebp + 8]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call sub.KERNEL32.dll_CreateFileA
mov esi, eax
pop eax
xor eax, eax
cmp esi, 0xffffffff
je 0x404db2
push eax
push eax
push 0
push esi
call sub.KERNEL32.dll_GetFileSize
pop ecx
mov ebx, eax
pop edi
xor edi, edi
test eax, eax
jne 0x404dc0
sub esp, 0xc
push esi
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov dword [eax], ebx
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push eax
call sub.msvcrt.dll_malloc
add esp, 0x10
mov edi, eax
test eax, eax
je 0x404e18
sub esp, 0xc
lea eax, [ebp - 0x10]
push 0
push eax
push ebx
push edi
push esi
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x404def
cmp ebx, dword [ebp - 0x10]
je 0x404d9f
mov eax, dword [ebp + 8]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push ebx
push str.load_file:_could_not_read__ld_bytes_from__s_n
push eax
call sub.msvcrt.dll_fprintf
mov dword [esp], edi
call sub.msvcrt.dll_free
xor edi, edi
xor ebx, ebx
add esp, 0x10
jmp 0x404d9f
mov eax, dword [sym.imp.msvcrt.dll__iob]
push edx
add eax, 0x40
push ebx
push 0x422610
push eax
call sub.msvcrt.dll_fprintf
xor ebx, ebx
add esp, 0x10
jmp 0x404d9f

Function at 0x404e40
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
push ecx
mov edx, dword [ebp + 8]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push edx
call sub.KERNEL32.dll_CreateFileA
or edx, 0xffffffff
mov esi, eax
pop eax
or eax, 0xffffffff
cmp esi, 0xffffffff
je 0x404e86
push eax
push eax
push 0
push esi
call sub.KERNEL32.dll_GetFileSize
mov ebx, eax
push eax
push esi
call sub.KERNEL32.dll_CloseHandle
mov eax, ebx
xor edx, edx
add esp, 0xc
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
Function at 0x40d8a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov edx, eax
test ebx, ebx
je 0x40d8d1
xor ecx, ecx
mov al, byte [ecx + esi]
inc ecx
xor eax, edx
shr dx, 8
and eax, 0xff
xor dx, word [eax + eax + 0x426480]
cmp ecx, ebx
jne 0x40d8b6
mov eax, edx
pop ebx
and eax, 0xffff
pop esi
pop ebp
ret

Function at 0x40d8e0
Capabilities:
Hash data using sha1

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
mov dword [eax + 0x18], 0
mov dword [eax + 0x14], 0
pop ebp
ret

Function at 0x411730
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x41177a
mov ebx, dword [ebp + 0xc]
xor esi, esi
jmp 0x411751
je 0x411784
add esi, eax
cmp edi, esi
jbe 0x41177a
add ebx, eax
push eax
mov eax, edi
sub eax, esi
push eax
push ebx
mov ecx, dword [ebp + 8]
push ecx
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 0
jge 0x411747
call sub.msvcrt.dll__errno
mov eax, dword [eax]
lea esp, [ebp - 0xc]
neg eax
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
mov eax, 0xffffffea
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4118d0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
mov edx, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
xor edx, 0xffffffff
mov esi, dword [ebp + 0xc]
test ebx, ebx
je 0x411900
xor ecx, ecx
mov al, byte [ecx + esi]
inc ecx
xor eax, edx
shr edx, 8
and eax, 0xff
xor edx, dword [eax*4 + 0x426a20]
cmp ecx, ebx
jne 0x4118e7
xor edx, 0xffffffff
pop ebx
mov eax, edx
pop esi
pop ebp
ret
Function at 0x416640
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
lea eax, [eax + 0x54]
sub esp, 0x1c
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x64]
xor esi, esi
mov dword [ebp - 0x1c], eax
mov edx, dword [ebx + 0x58]
test edx, edx
je 0x4166cc
push eax
push eax
push 0
mov edi, dword [ebp - 0x18]
push edi
call fcn.00405f10
add esp, 0x10
mov esi, eax
cmp eax, 0xfffffffe
je 0x416760
cmp eax, 2
je 0x416760
cmp eax, 0xfffffffc
je 0x41677c
cmp eax, 0xfffffffd
je 0x416798
mov eax, dword [ebx + 0x64]
test eax, eax
jne 0x4166c0
mov edx, dword [ebp - 0x1c]
mov edi, dword [ebx + 0x64]
sub edx, edi
mov eax, dword [ebx + 0x60]
sub eax, edx
mov dword [ebx], edx
mov dword [ebx + 4], eax
xor eax, eax
dec esi
je 0x4166e0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp esi, 1
je 0x41669d
mov edx, dword [ebx + 0x58]
test edx, edx
jne 0x416660
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x4166ef
cmp eax, 0xfffffffb
je 0x4166ef
or eax, 0xffffffff
jmp 0x4166b4
mov dword [ebx + 0x2c], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x34]
test eax, eax
jne 0x416746
mov eax, dword [ebx + 0x18]
xor edi, edi
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x14], eax
push eax
mov eax, dword [ebp - 0x10]
sub eax, edi
push eax
mov eax, dword [ebp - 0x14]
add eax, edi
push eax
mov eax, dword [ebx + 0x10]
push eax
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 0
jle 0x4167b7
add edi, eax
cmp dword [ebp - 0x10], edi
ja 0x416704
mov ecx, dword [ebx + 0x58]
mov eax, dword [ebx + 0x20]
add ecx, edi
mov dword [ebx + 0x54], eax
mov dword [ebx + 0x58], ecx
mov edx, dword [ebx + 0x58]
test edx, edx
jne 0x416660
push eax
push str.unexpected_end_of_file
push 0xfffffffffffffffb
push ebx
call fcn.00411a10
add esp, 0x10
jmp 0x41669d
push esi
push str.internal_error:_inflate_stream_corrupt
push 0xfffffffffffffffe
push ebx
call fcn.00411a10
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push ecx
push str.out_of_memory
push 0xfffffffffffffffc
push ebx
call fcn.00411a10
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x6c]
test eax, eax
je 0x4167c5
push edx
push eax
push 0xfffffffffffffffd
push ebx
call fcn.00411a10
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
jne 0x4167cc
mov dword [ebx + 0x34], 1
jmp 0x41672d
mov eax, str.compressed_data_error
jmp 0x41679f
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push eax
call sub.msvcrt.dll_strerror
add esp, 0xc
push eax
push 0xffffffffffffffff
push ebx
call fcn.00411a10
or eax, 0xffffffff
add esp, 0x10
jmp 0x4166b4
Function at 0x416ac0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov ebx, eax
nop
lea esi, [esi]
mov eax, dword [ebx + 0x2c]
cmp eax, 1
je 0x416b30
cmp eax, 2
je 0x416b10
test eax, eax
jne 0x416af2
mov eax, ebx
call fcn.00416800
inc eax
je 0x416b28
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
je 0x416b06
mov eax, dword [ebx]
test eax, eax
jne 0x416b06
mov eax, dword [ebx + 0x34]
test eax, eax
je 0x416ad0
mov eax, dword [ebx + 0x58]
test eax, eax
jne 0x416ad0
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x18]
add eax, eax
mov dword [ebx + 0x64], eax
mov eax, dword [ebx + 0x24]
mov dword [ebx + 0x60], eax
mov eax, ebx
call fcn.00416640
inc eax
jne 0x416af2
or eax, 0xffffffff
jmp 0x416b08
mov eax, dword [ebx + 0x18]
mov edi, dword [ebx + 0x24]
mov dword [ebx], 0
lea esi, [eax + eax]
nop
mov eax, dword [ebx]
push edx
mov edx, esi
mov ecx, dword [ebx + 0x10]
sub edx, eax
lea eax, [edi + eax]
push edx
push eax
push ecx
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 0
jle 0x416b6f
mov edx, dword [ebx]
add eax, edx
mov dword [ebx], eax
cmp esi, eax
ja 0x416b40
mov eax, dword [ebx + 0x24]
mov dword [ebx + 4], eax
jmp 0x416b06
jne 0x416b80
mov dword [ebx + 0x34], 1
jmp 0x416b67
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push eax
call sub.msvcrt.dll_strerror
add esp, 0xc
push eax
push 0xffffffffffffffff
push ebx
call fcn.00411a10
or eax, 0xffffffff
add esp, 0x10
jmp 0x416b08
Function at 0x405ba9
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4114f8
call fcn.00408a48
mov edi, 0x94
mov eax, edi
call fcn.0040acb0
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 [0x416704], ecx
mov eax, dword [esi + 4]
mov dword [0x416710], eax
mov edx, dword [esi + 8]
mov dword [0x416714], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x416708], esi
cmp ecx, 2
je 0x405c09
or esi, 0x8000
mov dword [0x416708], esi
shl eax, 8
add eax, edx
mov dword [0x41670c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x405c44
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x405c44
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x405c5c
cmp eax, 0x20b
je 0x405c49
mov dword [ebp - 0x1c], esi
jmp 0x405c70
cmp dword [ecx + 0x84], 0xe
jbe 0x405c44
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x405c6a
cmp dword [ecx + 0x74], 0xe
jbe 0x405c44
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040945e
pop ecx
test eax, eax
jne 0x405c84
push 0x1c
call fcn.00405b85
pop ecx
call fcn.00409319
test eax, eax
jne 0x405c95
push 0x10
call fcn.00405b85
pop ecx
call fcn.0040ac27
mov dword [ebp - 4], esi
call fcn.0040aa29
test eax, eax
jge 0x405cae
push 0x1b
call fcn.00405b60
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x417de4], eax
call fcn.0040a907
mov dword [0x416574], eax
call fcn.0040a865
test eax, eax
jge 0x405cd4
push 8
call fcn.00405b60
pop ecx
call fcn.0040a632
test eax, eax
jge 0x405ce5
push 9
call fcn.00405b60
pop ecx
push 1
call fcn.0040a154
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x405cfb
push eax
call fcn.00405b60
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040a5d5
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x405d1c
movzx eax, word [ebp - 0x40]
jmp 0x405d1f
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00402890
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x405d3d
push edi
call fcn.0040a281
call fcn.0040a2a3
jmp 0x405d6f
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00408a83
ret
Function at 0x40a1be
Capabilities:
Terminate process

Disassembly:
push 8
push 0x411e50
call fcn.00408a48
push 8
call fcn.00408a14
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x416744], esi
jne 0x40a1f2
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x416740], esi
mov al, byte [ebp + 0x10]
mov byte [0x41673c], al
cmp dword [ebp + 0xc], edi
jne 0x40a23c
cmp dword [0x416d88], edi
je 0x40a22c
mov eax, dword [0x416d84]
sub eax, 4
mov dword [0x416d84], eax
cmp eax, dword [0x416d88]
jb 0x40a22c
mov eax, dword [eax]
cmp eax, edi
je 0x40a20d
call eax
jmp 0x40a20d
push 0x415050
mov eax, 0x415048
call fcn.0040a13c
pop ecx
push 0x41505c
mov eax, 0x415054
call fcn.0040a13c
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40a26d
cmp dword [ebp + 0x10], edi
jne 0x40a27b
mov dword [0x416744], esi
push dword [ebp + 8]
call fcn.0040a0fa
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40a27a
push 8
call fcn.0040895f
pop ecx
ret
call fcn.00408a83
ret

Function at 0x40a2c1
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x415440]
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 + 0x415a10]
je 0x40a2f6
inc eax
cmp eax, 0x13
jb 0x40a2e7
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x415a10]
jne 0x40a41c
mov eax, dword [0x41657c]
cmp eax, 1
je 0x40a3f4
cmp eax, edx
jne 0x40a326
cmp dword [0x415418], 1
je 0x40a3f4
cmp ecx, 0xfc
je 0x40a41c
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 0x40a35c
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040ad80
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00405d80
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40a390
mov eax, edi
push eax
call fcn.00405d80
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x412248
push edi
call fcn.0040cb60
add esp, 0x10
push edi
call fcn.00405d80
push dword [esi + 0x415a14]
mov ebx, eax
call fcn.00405d80
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040acb0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040ad80
push edi
push ebx
call fcn.0040ad90
push 0x412228
push ebx
call fcn.0040ad90
push dword [esi + 0x415a14]
push ebx
call fcn.0040ad90
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040f0ed
add esp, 0x2c
jmp 0x40a41c
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x415a14]
push dword [esi]
call fcn.00405d80
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.004071d0
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40aef3
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x415440]
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 0x40af24
xor eax, eax
jmp 0x40b0ad
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 + 0x416c80]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40af60
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040f22a
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40b03b
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40b079
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 0x40afc4
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40afb5
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 0x40af95
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 0x40b004
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40b00d
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40af86
jmp 0x40b00f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40b0a8
cmp dword [ebp - 0x6c], edi
je 0x40b079
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40b06e
call fcn.0040b7f0
mov dword [eax], 9
call fcn.0040b7f9
mov dword [eax], esi
jmp 0x40b0a3
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 0x40b063
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40b00f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40b00f
push dword [ebp - 0x6c]
call fcn.0040b802
pop ecx
jmp 0x40b0a3
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40b091
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40b091
xor eax, eax
jmp 0x40b0ab
call fcn.0040b7f0
mov dword [eax], 0x1c
call fcn.0040b7f9
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40b0ab
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.004071d0
add ebp, 0x3a0
leave
ret