joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402ec8
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push esi
push ebx
xor ebx, ebx
mov esi, 0x411008
mov edi, 0x411010
lea esi, [esi]
add esp, 0xfffffff8
push 0x402d8f
push dword [esi + ebx*4]
call sub.msvcrt.dll_printf
add esp, 0xfffffff4
push 0xa
call sub.msvcrt.dll_putchar
add esp, 0x20
inc ebx
cmp ebx, 1
jbe 0x402ee0
xor ebx, ebx
lea esi, [esi]
push 0x402d93
push 0x402da6
push 0x402e4c
push dword [edi + ebx*4]
call sub.msvcrt.dll_printf
add esp, 0xfffffff4
push 0xa
call sub.msvcrt.dll_putchar
add esp, 0x20
inc ebx
cmp ebx, 6
jbe 0x402f08
call fcn.0040e0c0
add esp, 0xfffffff4
push 0x402e6c
call sub.msvcrt.dll_puts
xor ebx, ebx
add esp, 0x10
lea esi, [esi]
add esp, 0xfffffff8
push dword [ebx*4 + 0x411148]
push 0x402e8d
call sub.msvcrt.dll_printf
add esp, 0x10
inc ebx
cmp ebx, 3
jle 0x402f4c
test ebx, ebx
jne 0x402f7d
add esp, 0xfffffff4
push 0x402e92
call sub.msvcrt.dll_puts
add esp, 0x10
add esp, 0xfffffff4
push 0x402e9a
call sub.msvcrt.dll_puts
xor ebx, ebx
add esp, 0x10
mov esi, 0x41115c
add esp, 0xfffffff4
push dword [esi]
call sub.msvcrt.dll_getenv
add esp, 0xfffffffc
add esp, 0x10
mov edx, 0x402eb4
test eax, eax
je 0x402fb4
cmp byte [eax], 0
je 0x402fb4
mov edx, eax
push edx
push dword [esi]
push 0x402ebb
call sub.msvcrt.dll_printf
add esp, 0x10
add esi, 4
inc ebx
cmp ebx, 1
jbe 0x402f94
lea esp, [ebp - 0x18]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x4085a4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x1c]
add esp, 0xfffffff8
push edi
push 0x50
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
push 0x4b
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
push 5
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
push 6
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
push 0
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
push 0
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
push 0
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
push 0
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
mov al, bl
movsx esi, al
push esi
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
sar ebx, 8
movsx ebx, bl
push ebx
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
push esi
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
push ebx
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
movsx eax, byte [ebp + 0xc]
push eax
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
mov eax, dword [ebp + 0xc]
shl eax, 0x10
sar eax, 0x18
push eax
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
mov eax, dword [ebp + 0xc]
shr eax, 0x10
movsx eax, al
push eax
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
sar dword [ebp + 0xc], 0x18
mov eax, dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
movsx eax, byte [ebp + 0x10]
push eax
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
mov eax, dword [ebp + 0x10]
shl eax, 0x10
sar eax, 0x18
push eax
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
mov eax, dword [ebp + 0x10]
shr eax, 0x10
movsx eax, al
push eax
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
sar dword [ebp + 0x10], 0x18
mov eax, dword [ebp + 0x10]
push eax
call sub.msvcrt.dll_putc
add esp, 0x20
add esp, 0xfffffff8
push edi
movsx eax, byte [ebp + 0x14]
push eax
call sub.msvcrt.dll_putc
add esp, 0xfffffff8
push edi
mov eax, dword [ebp + 0x14]
shr eax, 8
movsx eax, al
push eax
call sub.msvcrt.dll_putc
add esp, 0x20
cmp dword [ebp + 0x14], 0
je 0x40872c
push edi
mov eax, dword [ebp + 0x14]
push eax
push 1
push dword [ebp + 0x18]
call sub.msvcrt.dll_fwrite
cmp eax, dword [ebp + 0x14]
je 0x40872c
mov eax, 0xa
jmp 0x40872e
xor eax, eax
lea esp, [ebp - 0x18]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x409800
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push esi
push ebx
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x4111dc]
test eax, eax
jne 0x409844
add esp, 0xfffffffc
push edx
push esi
push dword [0x412030]
call sub.msvcrt.dll__read
mov ebx, eax
add esp, 0x10
cmp ebx, 0xffffffff
je 0x409919
test ebx, ebx
jne 0x4098fe
jmp 0x409919
cmp eax, 1
jne 0x409894
shr edx, 1
lea edi, [edx + esi]
add esp, 0xfffffffc
push edx
push edi
push dword [0x412030]
call sub.msvcrt.dll__read
mov ebx, eax
mov edx, ebx
add esp, 0x10
cmp ebx, 0xffffffff
je 0x409919
test ebx, ebx
je 0x409919
mov esi, esi
mov al, byte [edi]
mov byte [esi], al
inc edi
inc esi
cmp al, 0xa
jne 0x40988b
mov byte [esi - 1], 0xd
mov byte [esi], 0xa
inc esi
inc ebx
dec edx
jne 0x409878
sub esi, ebx
jmp 0x4098fe
mov edi, esi
add esp, 0xfffffffc
lea eax, [edx - 1]
push eax
push esi
push dword [0x412030]
call sub.msvcrt.dll__read
mov ebx, eax
mov edx, ebx
add esp, 0x10
cmp ebx, 0xffffffff
je 0x409919
test ebx, ebx
je 0x409919
mov byte [ebx + esi], 0xa
lea esi, [esi]
mov al, byte [edi]
mov byte [esi], al
inc edi
inc esi
cmp al, 0xd
jne 0x4098d1
cmp byte [edi], 0xa
jne 0x4098d1
dec esi
dec ebx
dec edx
jne 0x4098c0
test ebx, ebx
jne 0x4098f4
add esp, 0xfffffffc
push 1
push esi
push dword [0x412030]
call sub.msvcrt.dll__read
mov ebx, 1
add esp, 0x10
jmp 0x4098fe
sub esi, ebx
cmp byte [esi + ebx - 1], 0x1a
jne 0x4098fe
dec ebx
add esp, 0xfffffffc
push ebx
push esi
push dword [0x412020]
call fcn.0040d648
mov dword [0x412020], eax
add dword [0x412480], ebx
mov eax, ebx
lea esp, [ebp - 0x18]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x4099b8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0xc]
cmp dword [0x412040], 0
jne 0x4099db
add esp, 0xfffffff4
push 0x40996c
call fcn.004025d8
add esp, 0x10
mov eax, dword [ebx]
test eax, eax
je 0x409a16
push dword [0x412040]
push eax
push 1
push dword [ebp + 8]
call sub.msvcrt.dll_fwrite
add esp, 0xfffffff4
push dword [0x412040]
call sub.msvcrt.dll_ferror
add esp, 0x20
test eax, eax
je 0x409a16
add esp, 0xfffffff8
push 0x40999e
push 0xe
call fcn.004023bc
mov dword [ebx], 0
mov ebx, dword [ebp - 0x18]
leave
ret
Function at 0x409d0c
Capabilities:
Parse credit card information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov esi, dword [ebp + 8]
mov edi, esi
mov dword [ebp - 4], 0
jmp 0x409e6f
cmp ebx, 0x20
je 0x409e6f
cmp ebx, 0x3a
je 0x409e6f
cmp ebx, 0x22
je 0x409e6f
cmp ebx, 0x2a
je 0x409e6f
cmp ebx, 0x2b
je 0x409e6f
cmp ebx, 0x2c
je 0x409e6f
cmp ebx, 0x3b
je 0x409e6f
cmp ebx, 0x3c
je 0x409e6f
cmp ebx, 0x3d
je 0x409e6f
cmp ebx, 0x3e
je 0x409e6f
cmp ebx, 0x3f
je 0x409e6f
cmp ebx, 0x5b
je 0x409e6f
cmp ebx, 0x5d
je 0x409e6f
cmp ebx, 0x7c
je 0x409e6f
cmp ebx, 0x2f
jne 0x409dd8
mov dword [0x42d660], esi
add esp, 0xfffffff8
call sub.msvcrt.dll___p___mb_cur_max
push dword [eax]
push esi
call sub.msvcrt.dll_mblen
add esi, eax
mov eax, dword [0x42d660]
mov byte [eax], 0x2f
mov dword [ebp - 4], 0
jmp 0x409e6c
cmp ebx, 0x2e
jne 0x409e24
cmp dword [ebp - 4], 0
je 0x409e6f
cmp dword [ebp - 4], 8
jg 0x409e18
mov dword [0x42d660], esi
add esp, 0xfffffff8
call sub.msvcrt.dll___p___mb_cur_max
push dword [eax]
push esi
call sub.msvcrt.dll_mblen
add esi, eax
mov eax, dword [0x42d660]
mov byte [eax], 0x2e
mov dword [ebp - 4], 9
jmp 0x409e6c
mov dword [ebp - 4], 0xc
jmp 0x409e6f
cmp dword [ebp - 4], 0xb
jg 0x409e6f
cmp dword [ebp - 4], 8
je 0x409e6f
add esp, 0xfffffff8
call sub.msvcrt.dll___p___mb_cur_max
push dword [eax]
push edi
call sub.msvcrt.dll_mblen
add dword [ebp - 4], eax
add esp, 0x10
mov dword [0x42d660], esi
add esp, 0xfffffff8
call sub.msvcrt.dll___p___mb_cur_max
push dword [eax]
push esi
call sub.msvcrt.dll_mblen
add esi, eax
mov edx, dword [0x42d660]
mov al, byte [ebx + 0x42d670]
mov byte [edx], al
add esp, 0x10
mov dword [0x42d660], edi
add esp, 0xfffffff8
call sub.msvcrt.dll___p___mb_cur_max
push dword [eax]
push edi
call sub.msvcrt.dll_mblen
add edi, eax
mov eax, dword [0x42d660]
movzx ebx, byte [eax]
add esp, 0x10
test ebx, ebx
jne 0x409d28
mov byte [esi], 0
mov eax, dword [ebp + 8]
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x40a7cc
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push edi
push esi
push ebx
xor ebx, ebx
add esp, 0xfffffff8
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.0040dda0
add esp, 0x10
test eax, eax
jne 0x40a80c
cmp word [ebp - 0x28], 1
jg 0x40a83e
add esp, 0xfffffff4
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll__unlink
add esp, 0x10
test eax, eax
jne 0x40a89f
test ebx, ebx
jne 0x40a83e
add esp, 0xfffffff8
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_rename
add esp, 0x10
test eax, eax
je 0x40a836
mov ebx, 1
call sub.msvcrt.dll__errno
cmp dword [eax], 0x12
jne 0x40a89f
test ebx, ebx
je 0x40a908
add esp, 0xfffffff8
push 0x40a7ab
mov eax, dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_fopen
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x40a87c
add esp, 0xfffffffc
mov eax, dword [ebp + 0xc]
push eax
push 0x40a7ae
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call sub.msvcrt.dll_fprintf
mov eax, 0xa
jmp 0x40a90a
add esp, 0xfffffff8
push 0x40a7c7
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fopen
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x40a8a8
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll_fclose
mov eax, 0xf
jmp 0x40a90a
add esp, 0xfffffffc
push 0xffffffffffffffff
push ebx
push esi
call fcn.0040aa14
mov edi, eax
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll_fclose
add esp, 0x20
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll_fclose
add esp, 0x10
test eax, eax
jne 0x40a8d6
test edi, edi
je 0x40a8fc
add esp, 0xfffffff4
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll__unlink
test edi, edi
je 0x40a8f4
mov eax, 0xe
cmp edi, 0xa
je 0x40a90a
mov eax, edi
jmp 0x40a90a
mov eax, 0xe
jmp 0x40a90a
add esp, 0xfffffff4
mov eax, dword [ebp + 0xc]
push eax
call sub.msvcrt.dll__unlink
xor eax, eax
lea esp, [ebp - 0x48]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x40aa14
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push esi
push ebx
add esp, 0xfffffff4
push 0x4000
call sub.msvcrt.dll_malloc
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x40aa6c
mov eax, 4
jmp 0x40aaf0
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll_free
add esp, 0xfffffff8
push 0x40a9ff
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call sub.msvcrt.dll_fprintf
mov eax, 0xa
jmp 0x40aaf0
xor edi, edi
jmp 0x40aada
mov eax, dword [ebp + 8]
push eax
cmp dword [ebp + 0x10], 0xffffffff
je 0x40aa86
mov eax, dword [ebp + 0x10]
sub eax, edi
cmp eax, 0x4000
jbe 0x40aa8b
mov eax, 0x4000
push eax
push 1
push esi
call sub.msvcrt.dll_fread
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x40aac0
add esp, 0xfffffff4
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_ferror
add esp, 0x10
test eax, eax
je 0x40aae5
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll_free
mov eax, 0xb
jmp 0x40aaf0
mov eax, dword [ebp + 0xc]
push eax
push ebx
push 1
push esi
call sub.msvcrt.dll_fwrite
add esp, 0x10
cmp eax, ebx
jne 0x40aa40
add edi, ebx
cmp dword [ebp + 0x10], 0xffffffff
je 0x40aa70
cmp edi, dword [ebp + 0x10]
jb 0x40aa70
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll_free
xor eax, eax
lea esp, [ebp - 0x18]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x40b91c
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
lea eax, [ebx - 1]
cmp eax, 8
jbe 0x40b943
add esp, 0xfffffff4
push 0x40b90c
call fcn.004025d8
add esp, 0x10
mov dword [0x4124c0], 0
cmp dword [0x44dcc0], 0
jne 0x40b96a
mov dword [0x4124c0], 1
mov dword [0x44dcc0], 0x10000
mov word [0x44dcae], 0
mov edi, 0x43dcb0
xor eax, eax
cld
mov ecx, 0x3fff
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [ebx*8]
movzx eax, word [edx + 0x411232]
mov dword [0x412500], eax
movzx eax, word [edx + 0x411230]
mov dword [0x43dca0], eax
movzx eax, word [edx + 0x411234]
mov dword [0x44dcd0], eax
movzx eax, word [edx + 0x411236]
mov dword [0x42dc90], eax
cmp ebx, 2
jg 0x40b9c8
or byte [esi], 4
jmp 0x40b9d0
cmp ebx, 7
jle 0x40b9d0
or byte [esi], 2
mov dword [0x42dc70], 0
mov dword [0x44dcb0], 0
call fcn.0040d584
add esp, 0xfffffff8
push 0x10000
push 0x42dca0
mov eax, dword [fcn.00409800]
call eax
mov dword [0x4124f0], eax
add esp, 0x10
test eax, eax
je 0x40ba0e
cmp eax, 0xffffffff
jne 0x40ba24
mov dword [0x4124e0], 1
mov dword [0x4124f0], 0
jmp 0x40ba6b
mov dword [0x4124e0], 0
cmp eax, 0x105
ja 0x40ba3a
call fcn.0040ba7c
mov dword [0x4124d0], 0
xor ecx, ecx
mov edi, 0x42dca0
xor edx, edx
lea esi, [esi]
shl edx, 5
movzx eax, byte [ecx + edi]
xor edx, eax
and edx, 0x7fff
inc ecx
cmp ecx, 1
jbe 0x40ba50
mov dword [0x4124d0], edx
lea esp, [ebp - 0x18]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x40bbf4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov dword [ebp - 4], 0
xor esi, esi
mov dword [0x42dc60], 2
cmp dword [0x4124f0], 0
je 0x40be0c
mov edi, 0x42dca0
cmp dword [0x4124f0], 2
jbe 0x40bc78
mov edx, dword [0x4124d0]
shl edx, 5
mov ecx, dword [0x42dc70]
movzx eax, byte [ecx + 0x42dca2]
xor edx, eax
and edx, 0x7fff
mov dword [0x4124d0], edx
and ecx, 0x7fff
add edx, edx
mov ebx, 0x43dcb0
movzx eax, word [edx + ebx]
mov dword [ebp - 4], eax
mov word [ecx*2 + 0x44dce0], ax
movzx eax, word [0x42dc70]
mov word [edx + ebx], ax
mov esi, esi
cmp dword [ebp - 4], 0
je 0x40bcbb
mov eax, dword [0x42dc70]
sub eax, dword [ebp - 4]
cmp eax, 0x7efa
ja 0x40bcbb
mov eax, dword [0x4124f0]
cmp dword [0x44dcd0], eax
jbe 0x40bc9f
mov dword [0x44dcd0], eax
add esp, 0xfffffff4
mov edx, dword [ebp - 4]
push edx
call fcn.0040d588
mov esi, eax
mov eax, dword [0x4124f0]
add esp, 0x10
cmp esi, eax
jbe 0x40bcbb
mov esi, eax
cmp esi, 2
jbe 0x40bd94
add esp, 0xfffffff8
lea eax, [esi - 3]
push eax
mov eax, dword [0x42dc80]
mov edx, dword [0x42dc70]
sub edx, eax
mov eax, edx
push eax
call fcn.0040cef4
mov dword [ebp - 8], eax
mov eax, dword [0x4124f0]
sub eax, esi
mov dword [0x4124f0], eax
add esp, 0x10
cmp esi, dword [0x412500]
ja 0x40bd68
cmp eax, 2
jbe 0x40bd68
dec esi
mov edi, 0x43dcb0
lea esi, [esi]
mov ebx, dword [0x42dc70]
lea eax, [ebx + 1]
mov dword [0x42dc70], eax
mov edx, dword [0x4124d0]
shl edx, 5
mov ecx, eax
movzx eax, byte [ebx + 0x42dca3]
xor edx, eax
and edx, 0x7fff
mov dword [0x4124d0], edx
and ecx, 0x7fff
add edx, edx
movzx eax, word [edx + edi]
mov dword [ebp - 4], eax
mov word [ecx*2 + 0x44dce0], ax
movzx eax, word [0x42dc70]
mov word [edx + edi], ax
dec esi
jne 0x40bd08
add ebx, 2
mov dword [0x42dc70], ebx
jmp 0x40bdba
mov eax, dword [0x42dc70]
add eax, esi
mov dword [0x42dc70], eax
xor esi, esi
movzx edx, byte [eax + edi]
mov dword [0x4124d0], edx
shl edx, 5
movzx eax, byte [edi + eax + 1]
xor edx, eax
mov dword [0x4124d0], edx
jmp 0x40bdba
add esp, 0xfffffff8
mov eax, dword [0x42dc70]
movzx eax, byte [eax + edi]
push eax
push 0
call fcn.0040cef4
mov dword [ebp - 8], eax
dec dword [0x4124f0]
inc dword [0x42dc70]
add esp, 0x10
cmp dword [ebp - 8], 0
je 0x40bdf2
add esp, 0xfffffffc
push 0
mov edx, dword [0x44dcb0]
mov eax, dword [0x42dc70]
sub eax, edx
push eax
xor eax, eax
test edx, edx
jl 0x40bddf
lea eax, [edx + 0x42dca0]
push eax
call fcn.0040ccd8
mov eax, dword [0x42dc70]
mov dword [0x44dcb0], eax
add esp, 0x10
cmp dword [0x4124f0], 0x105
ja 0x40bc10
call fcn.0040ba7c
jmp 0x40bc10
add esp, 0xfffffffc
push 1
mov edx, dword [0x44dcb0]
mov eax, dword [0x42dc70]
sub eax, edx
push eax
xor eax, eax
test edx, edx
jl 0x40be2b
lea eax, [edx + 0x42dca0]
push eax
call fcn.0040ccd8
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x40d648
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push edx
push ecx
mov esi, dword [ebp + 0xc]
sub eax, eax
test esi, esi
je 0x40d6f8
call fcn.0040b72c
mov edi, eax
mov eax, dword [ebp + 8]
sub ebx, ebx
mov ecx, dword [ebp + 0x10]
not eax
test ecx, ecx
je 0x40d6f6
test esi, 3
je 0x40d68c
xor al, byte [esi]
inc esi
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x40d676
mov edx, ecx
shr ecx, 3
je 0x40d6e1
nop
xor eax, dword [esi]
add esi, 4
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
xor eax, dword [esi]
add esi, 4
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x40d694
mov ecx, edx
and ecx, 7
je 0x40d6f6
xor al, byte [esi]
inc esi
mov bl, al
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x40d6e8
not eax
pop ecx
pop edx
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40d730
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push esi
push ebx
mov esi, dword [ebp + 8]
add esp, 0xfffffffc
push 3
push esi
lea ebx, [ebp - 0x104]
push ebx
call sub.msvcrt.dll_strncpy
add esp, 0xfffffff4
movzx eax, byte [ebp - 0x104]
push eax
call sub.msvcrt.dll_isalpha
add esp, 0x20
mov edx, ebx
test eax, eax
je 0x40d78c
mov al, byte [edx + 1]
cmp al, 0x3a
jne 0x40d78c
movzx eax, byte [esi]
mov al, byte [eax + 0x42d670]
mov byte [ebp - 0x104], al
mov byte [edx + 2], 0x5c
mov byte [edx + 3], 0
jmp 0x40d797
mov byte [ebp - 0x104], 0x5c
mov byte [edx + 1], 0
push pe_nt_image_headers32
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x110]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x80]
push eax
push edx
call sub.KERNEL32.dll_GetVolumeInformationA
test eax, eax
je 0x40d7dc
cmp dword [ebp - 0x10c], 0xc
setbe al
and eax, 0xff
jmp 0x40d7f1
add esp, 0xfffffff8
push 0x40d700
push dword [0x42dc10]
call sub.msvcrt.dll_fprintf
xor eax, eax
lea esp, [ebp - 0x128]
pop ebx
pop esi
leave
ret

Function at 0x40d82c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
add esp, 0xfffffff4
push dword [ebp + 8]
call sub.KERNEL32.dll_GetFileAttributesA
mov ecx, eax
add esp, 0xc
cmp ecx, 0xffffffff
jne 0x40d864
add esp, 0xfffffff8
push 0x40d800
push dword [0x42dc10]
call sub.msvcrt.dll_fprintf
mov eax, 0x20
jmp 0x40d88a
mov eax, ecx
and eax, 1
test cl, 2
je 0x40d870
or al, 2
mov edx, eax
test cl, 4
je 0x40d87a
or edx, 4
mov eax, edx
test cl, 0x10
je 0x40d883
or al, 0x10
test cl, 0x20
je 0x40d88a
or al, 0x20
leave
ret
Function at 0x40d89c
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
push edi
push esi
push ebx
mov esi, dword [ebp + 8]
add esp, 0xfffffff4
movzx eax, byte [esi]
push eax
call sub.msvcrt.dll_isalpha
add esp, 0x10
test eax, eax
je 0x40d8d4
cmp byte [esi + 1], 0x3a
jne 0x40d8d4
mov dword [ebp - 0x224], esi
lea edi, [ebp - 0x110]
jmp 0x40d8f5
lea eax, [ebp - 0x224]
push eax
lea ebx, [ebp - 0x110]
push ebx
push 0x104
push esi
call sub.KERNEL32.dll_GetFullPathNameA
mov dword [ebp - 0x224], ebx
mov edi, ebx
add esp, 0xfffffffc
push 3
push dword [ebp - 0x224]
lea ebx, [ebp - 0x228]
push ebx
call sub.msvcrt.dll_strncpy
mov byte [ebx + 3], 0
push 0x104
lea esi, [ebp - 0x220]
push esi
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x234]
push eax
push 0x104
push edi
push ebx
call sub.KERNEL32.dll_GetVolumeInformationA
xor ebx, ebx
add esp, 0xfffffffc
push 3
push 0x40d88c
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll__strupr
add esp, 0x10
push eax
call sub.msvcrt.dll_strncmp
add esp, 0x20
test eax, eax
je 0x40d98d
add esp, 0xfffffffc
push 4
push 0x40d890
push esi
call sub.msvcrt.dll_strncmp
add esp, 0x10
test eax, eax
je 0x40d98d
add esp, 0xfffffffc
push 4
push 0x40d895
push esi
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x40d992
mov ebx, 1
mov eax, ebx
lea esp, [ebp - 0x258]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x40dcac
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov dword [eax], 0x28
add esp, 0xfffffff8
push 0
push 0
push 0
push 1
push 1
push 0x7bc
call fcn.0040a658
mov dword [ebx], eax
add esp, 0x20
add esp, 0xfffffff4
push eax
call fcn.0040a71c
mov dword [esi], eax
mov eax, dword [0x40dca8]
mov dword [ebp - 0xc], eax
mov eax, edi
mov byte [ebp - 0xc], al
push 0
push 0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0xd
push 0x42d540
xor eax, eax
test edi, edi
je 0x40dd19
lea eax, [ebp - 0xc]
push eax
call sub.KERNEL32.dll_GetVolumeInformationA
test eax, eax
jne 0x40dd28
xor eax, eax
jmp 0x40dd2d
mov eax, 0x42d540
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x40dda0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
add esp, 0xfffffff8
push esi
push ebx
call sub.msvcrt.dll__stat
add esp, 0x10
test eax, eax
jne 0x40dee8
add esp, 0xfffffff4
push ebx
call fcn.0040d89c
mov dword [ebp - 0x1c], eax
add esp, 0xfffffffc
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x80000000
push ebx
call sub.KERNEL32.dll_CreateFileA
mov edi, eax
add esp, 0x14
cmp edi, 0xffffffff
je 0x40df36
lea eax, [ebp - 8]
mov dword [ebp - 0x24], eax
push eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x28], ecx
push ecx
lea ebx, [ebp - 0x18]
push ebx
push edi
call sub.KERNEL32.dll_GetFileTime
mov dword [ebp - 0x20], eax
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
mov edx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
cmp dword [ebp - 0x20], 0
je 0x40df36
cmp dword [ebp - 0x1c], 0
jne 0x40de88
add esp, 0xfffffff8
lea eax, [esi + 0x1c]
push eax
push edx
call fcn.0040d9a8
add esp, 0x10
cmp dword [ebp - 0x10], 0
jne 0x40de52
cmp dword [edi + 4], 0
je 0x40de64
add esp, 0xfffffff8
lea eax, [esi + 0x18]
push eax
push edi
call fcn.0040d9a8
add esp, 0x10
jmp 0x40de6a
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40de76
cmp dword [ebx + 4], 0
je 0x40dee0
add esp, 0xfffffff8
lea eax, [esi + 0x20]
push eax
push ebx
call fcn.0040d9a8
jmp 0x40df36
add esp, 0xfffffff8
lea eax, [esi + 0x1c]
push eax
mov eax, dword [ebp - 0x24]
push eax
call fcn.0040da24
add esp, 0x10
cmp dword [ebp - 0x10], 0
jne 0x40dea7
cmp dword [edi + 4], 0
je 0x40debc
add esp, 0xfffffff8
lea eax, [esi + 0x18]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.0040da24
add esp, 0x10
jmp 0x40dec2
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40dece
cmp dword [ebx + 4], 0
je 0x40dee0
add esp, 0xfffffff8
lea eax, [esi + 0x20]
push eax
push ebx
call fcn.0040da24
jmp 0x40df36
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x20], eax
jmp 0x40df36
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_GetFileAttributesA
mov ebx, eax
add esp, 0xc
cmp ebx, 0xffffffff
je 0x40df3c
test bl, 0x10
je 0x40df3c
mov edi, esi
xor eax, eax
cld
mov ecx, 9
rep stosd dword es:[edi], eax
add esp, 0xfffffff4
push 0x210000
call fcn.0040a71c
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x18], eax
test bl, 1
jne 0x40df30
mov word [esi + 6], 0x4180
jmp 0x40df36
mov word [esi + 6], 0x4100
xor eax, eax
jmp 0x40df41
mov eax, 0xffffffff
lea esp, [ebp - 0x48]
pop ebx
pop esi
pop edi
leave
ret