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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x260]
push esi
mov esi, ecx
test eax, eax
jne 0x407ad6
mov eax, 0x57
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 0x25c
push edi
push eax
lea eax, [ebp - 0x404]
push 0x200
push eax
call fcn.0040bca0
push 0x800
push 0
push dword [esi + 0x264]
call fcn.00411960
push str.__xml_version_1.0_____data_
push 0x800
push dword [esi + 0x264]
call fcn.0040c9d5
push 0x426bec
mov edx, 0x423aec
lea ecx, [ebp - 0x404]
call fcn.00408520
push 0x426bec
mov edx, 0x423aec
lea ecx, [ebp - 0x404]
call fcn.00408520
mov edx, dword [esi + 0x264]
add esp, 0x2c
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407b48
push 0x800
sub ecx, edi
lea eax, [ebp - 0x404]
push eax
push 0x7d0
lea eax, [edx + ecx]
push eax
lea eax, [ebp - 0x40c]
push eax
call fcn.0040cdc6
push str.___data__n
push 0x800
push dword [esi + 0x264]
call fcn.0040d1fe
mov edx, dword [esi + 0x264]
add esp, 0x20
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407b95
mov eax, dword [esi + 0x238]
sub ecx, edi
push 0
lea edi, [ebp - 0x408]
mov dword [ebp - 0x408], ecx
push edi
push ecx
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
test eax, eax
jne 0x407bcc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x407be2
push dword [esi + 0x264]
push esi
call fcn.00409850
add esp, 8
mov ecx, esi
call fcn.00407950
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 0x25c
Function at 0x407df0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 8], 0
push ebx
mov ebx, ecx
je 0x407fbc
cmp dword [ebp + 0x18], 0
je 0x407fbc
push esi
push edi
push 0x800
push 0
push dword [ebx + 0x264]
call fcn.00411960
mov edi, dword [ebp + 0x10]
add esp, 0xc
mov ecx, dword [ebp + 0xc]
test edi, edi
jl 0x407e5b
jg 0x407e32
test ecx, ecx
jb 0x407e5b
mov esi, dword [ebx + 0x22c]
mov eax, esi
cdq
push edx
push eax
push edi
push ecx
call fcn.0041d6e0
mov edi, dword [ebp + 0x14]
push eax
movzx eax, byte [ebp + 0x1c]
push eax
mov eax, edi
cdq
idiv esi
push eax
push esi
push str.__xml_version_1.0_____data__n_read_SECTOR_SIZE_IN_BYTES__i__num_partition_sectors__i__physical_partition_number__i__start_sector__i____n__data_
jmp 0x407e82
mov esi, dword [ebx + 0x22c]
mov eax, esi
cdq
push edx
push eax
push edi
push ecx
call fcn.0041d6e0
mov edi, dword [ebp + 0x14]
push eax
movzx eax, byte [ebp + 0x1c]
push eax
mov eax, edi
cdq
idiv esi
push eax
push esi
push str.__xml_version_1.0_____data__n_read_SECTOR_SIZE_IN_BYTES__i__num_partition_sectors__i__physical_partition_number__i__start_sector_NUM_DISK_SECTORS_i____n__data_
push 0x800
push dword [ebx + 0x264]
call fcn.0040c9d5
mov edx, dword [ebx + 0x264]
add esp, 0x1c
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407ea0
mov eax, dword [ebx + 0x238]
sub ecx, esi
push 0
lea esi, [ebp + 0x1c]
mov dword [ebp + 0x1c], ecx
push esi
push ecx
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x407ecc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebx + 0x264]
push ebx
call fcn.00409850
add esp, 8
nop dword [eax + eax]
mov ecx, ebx
call fcn.00407950
cmp eax, 0x15
je 0x407ee0
cmp eax, 0xd
je 0x407fb3
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov ecx, dword [ebx + 0x22c]
mov dword [ebp + 0x10], eax
mov eax, edi
mov dword [ebp - 4], edx
xor edx, edx
div ecx
mov esi, eax
mov dword [ebp + 0x1c], esi
test esi, esi
je 0x407f7a
mov edi, dword [ebx + 0x25c]
xor edx, edx
mov eax, edi
div ecx
cmp esi, eax
jae 0x407f2b
imul ecx, esi
mov edi, ecx
xor esi, esi
test edi, edi
je 0x407f4b
push 0
mov eax, edi
mov ecx, ebx
sub eax, esi
push eax
mov eax, dword [ebp + 8]
add eax, esi
push eax
call fcn.00407400
add esi, eax
cmp esi, edi
jb 0x407f31
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
add dword [ebp + 8], edi
push esi
add dword [eax], edi
push str.Sectors_remaining__i_r
call fcn.0040b76b
mov ecx, dword [ebx + 0x22c]
xor edx, edx
mov eax, edi
add esp, 8
div ecx
sub esi, eax
mov dword [ebp + 0x1c], esi
jne 0x407f16
mov edi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov esi, 1
mov ecx, 0
sub esi, dword [ebp + 0x10]
sbb ecx, dword [ebp - 4]
add eax, esi
adc edx, ecx
push edx
push eax
push 0
push edi
call fcn.0041d790
push eax
push str._nDownloaded_raw_image_at_speed__i_KB_s_n
call fcn.0040b76b
add esp, 8
mov ecx, ebx
call fcn.00407950
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, 0x57
pop ebx
mov esp, ebp
pop ebp
ret 0x18
Function at 0x407fd0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 0x14]
mov esi, ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.__xml_version_1.0_____data__n_createstoragedrives_DRIVE4_SIZE_IN_KB__i__DRIVE5_SIZE_IN_KB__i__DRIVE6_SIZE_IN_KB__i__DRIVE7_SIZE_IN_KB__i______data_
push 0x800
push dword [esi + 0x264]
call fcn.0040c9d5
mov edx, dword [esi + 0x264]
add esp, 0x1c
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408006
mov eax, dword [esi + 0x238]
sub ecx, edi
push 0
lea edi, [ebp + 0x14]
mov dword [ebp + 0x14], ecx
push edi
push ecx
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x408032
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esi + 0x264]
push esi
call fcn.00409850
add esp, 8
mov ecx, esi
call fcn.00407950
push 0
push dword [esi + 0x25c]
mov ecx, esi
mov edi, eax
push dword [esi + 0x24c]
call fcn.00407400
test eax, eax
jle 0x408072
push dword [esi + 0x24c]
push esi
call fcn.00409850
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
ret 0x10

Function at 0x408080
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
push str.__xml_version_1.0_____data__n_setbootablestoragedrive_value__i______data__n
push 0x800
push dword [esi + 0x264]
call fcn.0040c9d5
mov edx, dword [esi + 0x264]
add esp, 0x10
mov ecx, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4080b0
mov eax, dword [esi + 0x238]
sub ecx, edi
push 0
lea edi, [ebp + 8]
mov dword [ebp + 8], ecx
push edi
push ecx
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4080dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esi + 0x264]
push esi
call fcn.00409850
add esp, 8
mov ecx, esi
call fcn.00407950
push 0
push dword [esi + 0x25c]
mov ecx, esi
mov edi, eax
push dword [esi + 0x24c]
call fcn.00407400
test eax, eax
jle 0x40811c
push dword [esi + 0x24c]
push esi
call fcn.00409850
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
ret 4
Function at 0x408130
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov esi, ecx
push 0x800
push 0
push dword [esi + 0x264]
call fcn.00411960
push str.__xml_version_1.0_____data_
push 0x800
push dword [esi + 0x264]
call fcn.0040c9d5
mov edx, dword [esi + 0x264]
add esp, 0x18
mov ecx, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408170
push 0x800
push dword [ebp + 8]
sub ecx, edi
push 0x200
lea eax, [edx + ecx]
push eax
lea eax, [ebp - 4]
push eax
call fcn.0040cdc6
push str.___data__n
push 0x800
push dword [esi + 0x264]
call fcn.0040d1fe
mov edx, dword [esi + 0x264]
add esp, 0x20
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4081b6
mov eax, dword [esi + 0x238]
sub ecx, edi
push 0
lea edi, [ebp + 8]
mov dword [ebp + 8], ecx
push edi
push ecx
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4081e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esi + 0x264]
push str.Programming_RAW_command:__s_n
push esi
call fcn.00409850
add esp, 0xc
mov ecx, esi
call fcn.00407950
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x4086b0
Capabilities:
Hash data using crc32b

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
xor edi, edi
or ebx, 0xffffffff
cmp dword [ebp + 0xc], edi
jle 0x408761
mov edx, 0x80
push esi
nop dword [eax]
mov eax, dword [ebp + 8]
movzx ecx, byte [edi + eax]
xor eax, eax
test cl, 1
cmovne eax, edx
sar ecx, 1
test cl, 1
je 0x4086ea
bts eax, 6
sar ecx, 1
test cl, 1
je 0x4086f5
bts eax, 5
sar ecx, 1
test cl, 1
je 0x408700
bts eax, 4
sar ecx, 1
test cl, 1
je 0x40870b
bts eax, 3
sar ecx, 1
test cl, 1
je 0x408716
bts eax, 2
sar ecx, 1
test cl, 1
je 0x408721
bts eax, 1
test cl, 2
je 0x40872a
bts eax, 0
mov esi, 8
nop
mov edx, ebx
movzx ecx, al
sar edx, 0x1f
add ebx, ebx
and edx, 1
shr ecx, 7
xor ecx, edx
je 0x40874a
xor ebx, 0x4c11db7
add al, al
sub esi, 1
jne 0x408730
inc edi
mov edx, 0x80
cmp edi, dword [ebp + 0xc]
jl 0x4086d0
pop esi
xor eax, eax
lea ecx, [eax + 0x1f]
test bl, 1
je 0x40876e
bts eax, ecx
dec ecx
sar ebx, 1
cmp ecx, 0xffffffff
jg 0x408766
pop edi
not eax
pop ebx
pop ebp
ret 8
Function at 0x4094e0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
push 0
push 0
push 3
push 0
push 1
mov esi, ecx
push 0x80000000
push dword [ebp + 8]
mov dword [esi + 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40951e
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push ebx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 4], ebx
cmp ebx, 0xffffffff
jne 0x409544
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, ebx
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.0040b54a
lea ecx, [ebx*2 + 4]
mov dword [ebp + 8], eax
push ecx
call fcn.0040b54a
add esp, 8
mov dword [esi + 4], eax
mov dword [esi + 0xc], eax
lea ecx, [eax + ebx*2]
mov dword [esi + 8], ecx
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x409594
test eax, eax
je 0x409594
push 0
lea eax, [ebp - 4]
push eax
push ebx
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov ecx, 0x3ee
mov ebx, 0
cmove ebx, ecx
jmp 0x409599
mov ebx, 0xe
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x409646
mov eax, dword [ebp - 4]
push eax
push dword [ebp + 8]
add eax, 2
push eax
push dword [esi + 4]
lea eax, [ebp - 8]
push eax
call fcn.0040d56b
mov eax, dword [esi + 4]
add esp, 0x14
mov edx, dword [esi + 8]
mov dword [esi + 0xc], eax
cmp eax, edx
jae 0x4095f6
nop
mov eax, dword [esi + 0xc]
mov cx, word [eax]
add eax, 2
mov dword [esi + 0xc], eax
cmp cx, 0x3c
jne 0x4095f1
mov cx, word [eax]
add eax, 2
mov dword [esi + 0xc], eax
cmp cx, 0x3f
je 0x4095f6
cmp dword [esi + 0xc], edx
jb 0x4095d0
mov ecx, dword [esi + 0xc]
cmp ecx, edx
jae 0x409625
nop dword [eax]
mov ax, word [ecx]
lea edi, [ecx + 2]
mov dword [esi + 0xc], edi
cmp ax, 0x3f
jne 0x40961e
mov cx, word [edi]
lea eax, [edi + 2]
mov dword [esi + 0xc], eax
cmp cx, 0x3e
je 0x409625
mov ecx, dword [esi + 0xc]
cmp ecx, edx
jb 0x409600
cmp dword [esi + 0xc], edx
jae 0x409646
nop word [eax + eax]
mov eax, dword [esi + 0xc]
mov cx, word [eax]
add eax, 2
mov dword [esi + 0xc], eax
cmp cx, 0x3e
je 0x409646
cmp eax, edx
jb 0x409630
mov eax, dword [ebp + 8]
test eax, eax
je 0x409656
push eax
call fcn.0040b512
add esp, 4
mov eax, ebx
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x40a010
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
push 3
push 1
call fcn.0040a650
test eax, eax
jne 0x40a16f
mov eax, dword [esi]
lea ecx, [ebp - 0x120]
push 0
push ecx
push 0x10
lea ecx, [ebp - 0x11c]
mov dword [ebp - 0x120], 0x10
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a073
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40a15c
cmp dword [ebp - 0x120], 0
je 0x40a15c
mov eax, dword [ebp - 0x11c]
cmp eax, 0xb
je 0x40a09f
push eax
push str.Unexpected_response_for_command_mode__i_n
push esi
call fcn.00409eb0
add esp, 0xc
jmp 0x40a16a
push ecx
lea eax, [ebp - 0x10c]
mov ecx, esi
push eax
push 1
call fcn.00409ed0
test eax, eax
jle 0x40a0c3
cmp eax, 0x100
jae 0x40a0c3
mov eax, dword [ebp - 0x10c]
mov dword [edi], eax
push ecx
lea eax, [ebp - 0x10c]
mov ecx, esi
push eax
push 2
call fcn.00409ed0
test eax, eax
jle 0x40a0e8
cmp eax, 0x100
jae 0x40a0e8
mov eax, dword [ebp - 0x108]
mov dword [edi + 4], eax
push ecx
lea eax, [ebp - 0x10c]
mov ecx, esi
push eax
push 3
call fcn.00409ed0
test eax, eax
jle 0x40a11b
cmp eax, 0x100
jae 0x40a11b
push 0x20
lea eax, [ebp - 0x10c]
push eax
lea eax, [edi + 8]
push 0x20
push eax
call fcn.0040bb66
add esp, 0x10
push ecx
lea eax, [ebp - 0x10c]
mov ecx, esi
push eax
push 7
call fcn.00409ed0
test eax, eax
jle 0x40a140
cmp eax, 0x100
jae 0x40a140
mov eax, dword [ebp - 0x10c]
mov dword [edi + 0x28], eax
push ecx
mov ecx, esi
call fcn.0040a190
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 4
push str.No_response_from_device_after_switch_mode_command_n
push esi
call fcn.00409eb0
add esp, 8
mov eax, 0x57
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 4
Function at 0x40a650
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x50
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x4c], eax
push esi
push edi
push 0x2c
lea eax, [esp + 0x2c]
mov dword [esp + 0x28], 0
push 0
push eax
mov edi, ecx
call fcn.00411960
add esp, 0xc
mov dword [esp + 8], 0x30
cmp byte [ebp + 8], 0
je 0x40a76d
mov esi, dword [edi]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x1c], 0xa
mov dword [esp + 0x14], 0xffffffff
push dword [esi]
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x28], 0xa
mov dword [esp + 0x24], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
push 0
lea ecx, [esp + 0xc]
mov dword [esi + 8], 0xa
mov eax, dword [edi]
push ecx
push dword [esp + 0x10]
lea ecx, [esp + 0x30]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a6f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x24], 1
je 0x40a72d
mov ecx, edi
call fcn.0040a810
test eax, eax
je 0x40a72d
push str.Did_not_receive_Sahara_hello_packet_from_device_n
push edi
call fcn.00409e90
add esp, 8
mov eax, 6
pop edi
pop esi
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 8
mov esi, dword [edi]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x1c], 0x7d0
mov dword [esp + 0x14], 0xffffffff
push dword [esi]
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x28], 0x7d0
mov dword [esp + 0x24], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
mov dword [esi + 8], 0x7d0
jmp 0x40a774
mov ecx, dword [edi]
call fcn.0040aa60
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0xc]
push 0
push ecx
mov dword [esp + 0x40], eax
lea ecx, [esp + 0x2c]
mov eax, dword [edi]
push 0x30
push ecx
mov dword [esp + 0x34], 2
mov dword [esp + 0x38], 0x30
mov dword [esp + 0x3c], 2
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], 0
mov dword [esp + 0x1c], 0x30
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a7f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40a7f7
push str.Failed_to_write_hello_response_back_to_device_n
push edi
call fcn.00409e90
add esp, 8
mov eax, 6
pop edi
pop esi
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esp + 0x54]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 8
Function at 0x40a810
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 3
push 0
mov edi, ecx
call fcn.0040a650
test eax, eax
jne 0x40a8d3
mov esi, dword [edi]
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x2c], 0x10
mov dword [ebp - 0x10], 0xa
push dword [esi]
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 8], 0xa
mov dword [ebp - 0xc], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
push 0
lea ecx, [ebp - 0x2c]
mov dword [esi + 8], 0xa
mov eax, dword [edi]
push ecx
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x28]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a899
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40a8cb
cmp dword [ebp - 0x2c], 0
je 0x40a8cb
mov eax, dword [ebp - 0x28]
cmp eax, 0xb
je 0x40a8cb
push eax
push str.PblHack:_Error____i_n
push edi
call fcn.00409e90
add esp, 0xc
mov eax, 0xd
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret
push ecx
mov ecx, edi
call fcn.0040a190
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret

Function at 0x40ab60
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push edi
mov edi, ecx
mov dword [ebp - 4], 0
cmp dword [edi], 0xffffffff
jne 0x40ab81
mov eax, 6
pop edi
mov esp, ebp
pop ebp
ret 0x10
push ebx
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x20000
push eax
push dword [edi + 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040ac90
mov eax, dword [ebp - 8]
lea ecx, [ebp + 0xc]
push 0
push ecx
push eax
push dword [edi + 4]
mov dword [ebp + 0xc], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40abc3
call ebx
test eax, eax
jne 0x40ac25
push esi
xor esi, esi
mov eax, dword [edi + 4]
lea ecx, [ebp - 4]
push 0
push ecx
push 1
add eax, esi
mov dword [ebp - 4], 1
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40abed
call ebx
test eax, eax
jne 0x40ac24
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x40ac15
mov eax, dword [edi + 4]
cmp byte [esi + eax], 0x7e
jne 0x40ac04
cmp esi, 1
jg 0x40ac0f
xor esi, esi
inc esi
cmp esi, 0x20000
jl 0x40abc6
jmp 0x40ac15
lea ecx, [esi + 1]
mov dword [ebp - 4], ecx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ecx
push dword [edi + 4]
call fcn.0040ad40
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40ac90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
mov ecx, 0xffff
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, edx
push edi
test ebx, ebx
jle 0x40acd1
mov edi, ebx
nop dword [eax]
movzx eax, byte [esi]
lea esi, [esi + 1]
xor eax, ecx
shr cx, 8
and eax, 0xff
xor cx, word [eax*2 + 0x4235e0]
movzx ecx, cx
sub edi, 1
jne 0x40acb0
not ecx
lea edi, [ebx + 2]
movzx eax, cx
xor esi, esi
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0x10]
mov byte [eax], 0x7e
inc eax
test edi, edi
jle 0x40ad1f
nop dword [eax]
cmp esi, ebx
lea ecx, [ebp + 8]
cmovne ecx, edx
mov edx, ecx
mov cl, byte [edx]
cmp cl, 0x7e
je 0x40ad0b
cmp cl, 0x7d
je 0x40ad0b
mov byte [eax], cl
inc eax
jmp 0x40ad19
mov byte [eax], 0x7d
mov cl, byte [edx]
xor cl, 0x20
mov byte [eax + 1], cl
add eax, 2
inc esi
inc edx
cmp esi, edi
jl 0x40acf0
mov ecx, dword [ebp + 0x14]
mov byte [eax], 0x7e
sub eax, dword [ebp + 0x10]
pop edi
inc eax
pop esi
mov dword [ecx], eax
xor eax, eax
pop ebx
pop ebp
ret 0x10

Function at 0x40adb0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x1c], eax
cmp eax, 0xffffffff
jne 0x40ade4
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop esi
pop ebp
ret 4
push 0
lea ecx, [ebp + 8]
push ecx
push 0x1c
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ae1e
cmp dword [esi], 0xed26ff3a
je 0x40ae13
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xb
pop esi
pop ebp
ret 4
mov byte [esi + 0x20], 1
xor eax, eax
pop esi
pop ebp
ret 4
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x1e
pop esi
pop ebp
ret 4
Function at 0x40ae40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0x20], eax
push esi
xor esi, esi
push edi
cmp byte [ebx + 0x20], 0
jne 0x40ae79
lea eax, [esi + 2]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x1c], esi
cmp dword [ebx + 0x14], esi
jbe 0x40af9c
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x28]
push eax
push 0xc
lea eax, [ebp - 0x10]
push eax
push dword [ebx + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40af83
mov esi, dword [ebx + 0xc]
imul esi, dword [ebp - 0xc]
push esi
call fcn.0040b54a
mov edi, eax
add esp, 4
test edi, edi
je 0x40af6b
mov ax, word [ebp - 0x10]
mov ecx, 0xcac1
cmp ax, cx
jne 0x40af01
push 0
lea eax, [ebp - 0x28]
push eax
push esi
push edi
push dword [ebx + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40af21
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call fcn.0040b512
add esp, 4
jmp 0x40af8b
mov ecx, 0xcac2
cmp ax, cx
je 0x40af37
mov ecx, 0xcac3
cmp ax, cx
jne 0x40af5b
push esi
push 0
push edi
call fcn.00411960
add esp, 0xc
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x24]
push 0
push edx
push esi
push dword [ebp - 0x14]
mov eax, dword [ecx]
push dword [ebp - 0x18]
push edi
call dword [eax + 4]
add dword [ebp - 0x18], esi
push edi
adc dword [ebp - 0x14], 0
call fcn.0040b512
mov esi, dword [ebp - 0x1c]
add esp, 4
inc esi
mov dword [ebp - 0x1c], esi
cmp esi, dword [ebx + 0x14]
jb 0x40ae91
xor esi, esi
jmp 0x40af9c
push edi
mov esi, 0xd
call fcn.0040b512
add esp, 4
jmp 0x40af8b
mov eax, 0xe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40af9c
push dword [ebx + 0x1c]
mov byte [ebx + 0x20], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 0xc