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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406b18
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x40a008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x30], ebx
cmp dword [ebx + 0x38], 0
je 0x404a51
cmp byte [ebx + 0x3d], 0
je 0x404a51
mov eax, dword [ebx]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
sete al
test al, al
je 0x4048fc
xor al, al
jmp 0x404a53
sub esp, 8
lea ecx, [ebp - 0x28]
call fcn.00402ee0
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
jmp 0x404923
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
nop dword [eax]
mov ebx, dword [ebp - 0x30]
cmp esi, 0x10
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x28]
cmovae edx, edi
lea ecx, [ebp - 0x28]
cmovae ecx, edi
add eax, edx
push eax
push ecx
mov ecx, dword [ebx + 0x38]
lea eax, [ebx + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x40496e
sub eax, 1
je 0x404972
sub eax, 2
je 0x404a43
lea ecx, [ebp - 0x28]
xor bl, bl
call fcn.00402db0
mov al, bl
jmp 0x404a53
mov byte [ebx + 0x3d], 0
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
cmp esi, 0x10
mov ebx, dword [ebp - 0x2c]
cmovae eax, edi
sub ebx, eax
je 0x4049ae
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x28]
cmp esi, 0x10
cmovae eax, edi
push dword [ecx + 0x4c]
push ebx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp ebx, eax
jne 0x40495d
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x3d], 0
je 0x404a43
test ebx, ebx
mov ebx, eax
jne 0x404923
mov ecx, dword [ebp - 0x18]
or eax, 0xffffffff
sub eax, ecx
cmp eax, 8
jbe 0x404a38
lea ebx, [ecx + 8]
cmp ebx, 0xfffffffe
ja 0x404a38
cmp esi, ebx
jae 0x404a21
push ecx
push ebx
lea ecx, [ebp - 0x28]
call fcn.00404da0
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
test ebx, ebx
je 0x404920
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
cmp esi, 0x10
xorps xmm0, xmm0
cmovae ecx, edi
movq qword [ecx + eax], xmm0
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x18], ebx
cmovae eax, dword [ebp - 0x28]
mov byte [eax + ebx], 0
jmp 0x404916
test ebx, ebx
jne 0x4049f6
cmp esi, 0x10
mov dword [ebp - 0x18], ebx
lea eax, [ebp - 0x28]
cmovae eax, edi
mov byte [eax], bl
jmp 0x404916
push str.string_too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
lea ecx, [ebp - 0x28]
mov bl, 1
call fcn.00402db0
mov al, bl
jmp 0x404a53
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00405aa6
mov esp, ebp
pop ebp
ret
Function at 0x1001970
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov edx, dword [ebp + 0x10]
mov cl, 0x20
jmp 0x100197e
inc edx
cmp byte [edx], cl
je 0x100197d
mov al, byte [edx]
push ebx
xor ebx, ebx
cmp al, 0x2d
je 0x10019e2
cmp al, 0x2f
je 0x10019e2
xor eax, eax
cmp byte [edx], bl
je 0x1001a30
push edi
push 0x11
pop ecx
lea edi, [ebp - 0x54]
rep stosd dword es:[edi], eax
mov ax, word [ebp + 0x14]
mov word [ebp - 0x24], ax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edx
push ebx
mov dword [ebp - 0x54], 0x44
mov dword [ebp - 0x28], 0x41
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
pop edi
jne 0x10019f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1001a30
cmp al, cl
je 0x10019e9
inc edx
mov al, byte [edx]
cmp al, bl
jne 0x10019db
jmp 0x10019e9
inc edx
mov al, byte [edx]
cmp al, cl
je 0x10019e8
jmp 0x1001987
push esi
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push 0xffffffffffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x1001a1e
lea eax, [ebp + 0x10]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x1001a27
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x10], eax
push dword [ebp - 0x10]
call esi
mov eax, dword [ebp + 0x10]
pop esi
pop ebx
leave
ret 0x10
Function at 0x1001a5a
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x1001100
call fcn.010027b4
mov edi, 0x94
mov eax, edi
call fcn.01002800
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 [0x1005278], ecx
mov eax, dword [esi + 4]
mov dword [0x1005284], eax
mov edx, dword [esi + 8]
mov dword [0x1005288], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x100527c], esi
cmp ecx, 2
je 0x1001aba
or esi, 0x8000
mov dword [0x100527c], esi
shl eax, 8
add eax, edx
mov dword [0x1005280], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x1001af5
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1001af5
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x1001b0d
cmp eax, 0x20b
je 0x1001afa
mov dword [ebp - 0x1c], esi
jmp 0x1001b21
cmp dword [ecx + 0x84], 0xe
jbe 0x1001af5
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x1001b1b
cmp dword [ecx + 0x74], 0xe
jbe 0x1001af5
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.01002762
pop ecx
test eax, eax
jne 0x1001b4d
cmp dword [0x1005268], 1
jne 0x1001b3a
call fcn.01001f76
push 0x1c
call fcn.01001dad
push 0xff
call fcn.01001c2e
pop ecx
pop ecx
mov dword [ebp - 4], esi
call fcn.0100259d
test eax, eax
jge 0x1001b61
push 0x1b
call fcn.01001a35
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1005794], eax
call fcn.01002477
mov dword [0x1005260], eax
call fcn.010023d5
test eax, eax
jge 0x1001b87
push 8
call fcn.01001a35
pop ecx
call fcn.01002189
test eax, eax
jge 0x1001b98
push 9
call fcn.01001a35
pop ecx
call fcn.01001c5e
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x1001bab
push eax
call fcn.01001a35
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.01002120
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x1001bcc
movzx eax, word [ebp - 0x34]
jmp 0x1001bcf
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.01001970
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x1001bed
push edi
call fcn.01001d6d
call fcn.01001d8f
jmp 0x1001c1f
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.010027ed
ret
Function at 0x1001dad
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
xor eax, eax
cmp edx, dword [eax*8 + 0x1005008]
je 0x1001dcd
inc eax
cmp eax, 0x12
jb 0x1001dbe
shl eax, 3
cmp edx, dword [eax + 0x1005008]
mov dword [ebp + 8], eax
jne 0x1001f6b
mov ecx, dword [0x1005268]
cmp ecx, 1
je 0x1001f40
test ecx, ecx
jne 0x1001dff
cmp dword [0x1005004], 1
je 0x1001f40
cmp edx, 0xfc
je 0x1001f6b
and byte [ebp - 8], 0
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1001e3a
push 5
pop ecx
mov esi, 0x1001474
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x10c]
lea ebx, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001e49
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x1001e81
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001e61
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x1001470
push ebx
call fcn.01002940
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001e86
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x100500c]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001e9d
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.01002800
mov edx, esp
push 6
pop ecx
mov esi, 0x1001454
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001ec9
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001ed5
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1001eee
mov eax, dword [ebp + 8]
mov esi, 0x1001450
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x100500c]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001f09
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001f15
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x1001428
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.0100283d
add esp, 0xc
jmp 0x1001f6b
mov ecx, dword [eax + 0x100500c]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001f4b
push 0
lea edx, [ebp - 4]
push edx
sub eax, esi
push eax
push ecx
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100283d
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x10053d4], ebx
push esi
push edi
jne 0x10028bd
push 0x10014f0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x10028f8
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10014e4
push edi
call esi
test eax, eax
mov dword [0x10053d4], eax
je 0x10028f8
push 0x10014d4
push edi
call esi
push 0x10014c0
push edi
mov dword [0x10053d8], eax
call esi
cmp dword [0x1005278], 2
mov dword [0x10053dc], eax
jne 0x10028bd
push 0x10014a4
push edi
call esi
test eax, eax
mov dword [0x10053e4], eax
je 0x10028bd
push 0x100148c
push edi
call esi
mov dword [0x10053e0], eax
mov eax, dword [0x10053e0]
test eax, eax
je 0x1002902
call eax
test eax, eax
je 0x10028e9
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x10053e4]
test eax, eax
je 0x10028e9
test byte [ebp - 8], 1
jne 0x1002902
cmp dword [0x1005284], 4
jb 0x10028fc
or byte [ebp + 0x12], 0x20
jmp 0x1002921
xor eax, eax
jmp 0x1002931
or byte [ebp + 0x12], 4
jmp 0x1002921
mov eax, dword [0x10053d8]
test eax, eax
je 0x1002921
call eax
mov ebx, eax
test ebx, ebx
je 0x1002921
mov eax, dword [0x10053dc]
test eax, eax
je 0x1002921
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x10053d4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1004404
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.01002800
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1004499
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x1005278]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x1004499
cmp eax, 1
je 0x10044b1
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1004499
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x100446e
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x1004495
xor eax, eax
inc eax
jmp 0x10044cd
cmp esi, ebx
jae 0x100449d
xor eax, eax
jmp 0x10044cd
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x1005278]
jmp 0x10044b3
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406c4d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
cmp dword [0x420b14], esi
jne 0x406c85
push esi
push 0x8000080
push 4
push esi
push esi
push 0x40000000
push 0x422f68
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 2
push esi
push eax
mov dword [0x420b14], eax
call dword [sym.imp.KERNEL32.dll__llseek]
cmp dword [ebp + 8], esi
je 0x406ca8
lea eax, [ebp - 4]
push esi
push eax
push dword [ebp + 8]
call fcn.00409540
pop ecx
push eax
push dword [ebp + 8]
push dword [0x420b14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x407b90
Capabilities:
Get common file path
Terminate process

Disassembly:
push ebx
push ebp
push esi
push edi
xor ebx, ebx
xor ebp, ebp
mov edi, 0x420eee
xor esi, esi
cmp byte [edi + esi], bl
je 0x407bb3
push ebx
push ebx
push esi
push ebp
mov byte [edi + esi], bl
call fcn.004062c2
add esp, 0x10
inc esi
cmp esi, 0xf
jl 0x407b9f
add edi, 0x10
inc ebp
cmp edi, 0x420fde
jl 0x407b9d
mov esi, 0x422f68
push esi
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.QP_carpet_test.txt
push esi
call fcn.00409ab0
mov al, byte [0x420eed]
mov dword [0x420e4c], ebx
push eax
push dword [0x420b10]
call fcn.00406eff
add esp, 0x10
push ebx
call fcn.004099c2
pop edi
pop esi
pop ebp
pop ebx

Function at 0x407c05
Capabilities:
Get common file path
Terminate process

Disassembly:
push ebx
push ebp
push esi
push edi
xor ebx, ebx
xor ebp, ebp
mov edi, 0x420eee
xor esi, esi
cmp byte [edi + esi], bl
je 0x407c28
push ebx
push ebx
push esi
push ebp
mov byte [edi + esi], bl
call fcn.004062c2
add esp, 0x10
inc esi
cmp esi, 0xf
jl 0x407c14
add edi, 0x10
inc ebp
cmp edi, 0x420fde
jl 0x407c12
mov esi, 0x422f68
mov dword [0x420e4c], ebx
push esi
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.QP_carpet_examine.txt
push esi
call fcn.00409ab0
mov al, byte [0x420eed]
push eax
push dword [0x420b10]
call fcn.00407242
add esp, 0x10
push ebx
call fcn.004099c2
pop edi
pop esi
pop ebp
pop ebx

Function at 0x407c7a
Capabilities:
Get common file path
Terminate process

Disassembly:
push ebx
push ebp
push esi
push edi
xor ebx, ebx
xor ebp, ebp
mov edi, 0x420eee
xor esi, esi
cmp byte [edi + esi], bl
je 0x407c9d
push ebx
push ebx
push esi
push ebp
mov byte [edi + esi], bl
call fcn.004062c2
add esp, 0x10
inc esi
cmp esi, 0xf
jl 0x407c89
add edi, 0x10
inc ebp
cmp edi, 0x420fde
jl 0x407c87
mov esi, 0x422f68
mov dword [0x420e4c], ebx
push esi
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.QP_carpet_pn_resolve.txt
push esi
call fcn.00409ab0
mov al, byte [0x420eed]
push ebx
push eax
push dword [0x420b10]
call fcn.004073f7
add esp, 0x14
push ebx
call fcn.004099c2
pop edi
pop esi
pop ebp
pop ebx
Function at 0x407cf0
Capabilities:
Get common file path

Disassembly:
push esi
mov esi, 0x422f68
push esi
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.QP_carpet_pn_resolve.txt
push esi
call fcn.00409ab0
mov eax, dword [0x420e78]
dec dword [0x420e4c]
pop ecx
pop ecx
mov ecx, dword [0x420e7c]
shl eax, 4
and byte [eax + ecx + 0x420eee], 0
call fcn.00406786
test eax, eax
pop esi
jne 0x407d44
push str.QP_carpet_pn_resolve_current_left__rFINDNULL
push 4
call fcn.00409409
pop ecx
pop ecx
ret
mov cl, byte [0x420eed]
push 0
push ecx
push eax
call fcn.004076ff
add esp, 0xc
ret

Function at 0x407ecc
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf0
push ebx
lea eax, [ebp - 0xf0]
push edi
push eax
push 0xc8
mov byte [ebp - 1], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0xf0]
push str.5_common_output.txt
push eax
call fcn.00409ab0
pop ecx
xor ebx, ebx
pop ecx
lea eax, [ebp - 0xf0]
push ebx
push 0x8000080
push 4
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 2
mov edi, eax
push ebx
push ebx
push edi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp + 8], 1
jne 0x407fe8
push esi
lea eax, [ebp - 0xc]
push ebx
mov esi, 0x41fee0
push eax
push esi
call fcn.00409540
pop ecx
push eax
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
call edi
push 1
pop eax
lea esi, [eax + eax*2]
push eax
shl esi, 2
mov al, byte [esi + 0x4213d9]
push eax
call fcn.00406b69
movsx eax, al
pop ecx
push eax
mov al, byte [esi + 0x4213d8]
push eax
call fcn.00406ad8
movsx eax, al
pop ecx
push eax
lea eax, [ebp - 0x28]
push str.__c_c__d_
push eax
call fcn.0040947f
add esp, 0x14
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00409540
pop ecx
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 8]
call edi
inc byte [ebp - 1]
mov ecx, dword [0x420e4c]
movsx eax, byte [ebp - 1]
add ecx, 2
cmp eax, ecx
jl 0x407f58
lea eax, [ebp - 0xc]
push ebx
mov esi, str._____r_n
push eax
push esi
call fcn.00409540
pop ecx
push eax
push esi
push dword [ebp - 8]
call edi
push str.output_the_chess_manual_in_5_common_output.txt_OK_
push 1
call fcn.00409409
pop ecx
pop ecx
pop esi
jmp 0x40801b
cmp dword [ebp + 8], ebx
jne 0x40800d
cmp dword [ebp + 0xc], ebx
je 0x40801b
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp + 0xc]
call fcn.00409540
pop ecx
push eax
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40801b
push str.__output___cause_out_of_range
push 1
call fcn.00409409
pop ecx
pop ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
leave
ret
Function at 0x40932a
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
cmp byte [ebp + 8], 0x43
jne 0x40933f
mov dword [ebp + 8], 0x420224
jmp 0x40934c
cmp byte [ebp + 8], 0x44
jne 0x40934c
mov dword [ebp + 8], 0x420220
lea eax, [ebp - 0x14]
push 0xa
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x20]
push 0xc
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov eax, dword [ebp + 8]
leave
ret

Function at 0x40c33d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x420358
cmp edx, dword [eax]
je 0x40c35f
add eax, 8
inc ecx
cmp eax, 0x4203e8
jl 0x40c350
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x420358]
jne 0x40c48d
mov eax, dword [0x420b6c]
cmp eax, 1
je 0x40c467
test eax, eax
jne 0x40c390
cmp dword [0x420294], 1
je 0x40c467
cmp edx, 0xfc
je 0x40c48d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40c3c7
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00409aa0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00409540
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40c40a
lea eax, [ebp - 0x1a4]
push eax
call fcn.00409540
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40f4f4
push edi
call fcn.0040d460
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00409aa0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00409ab0
lea eax, [ebp - 0xa0]
push 0x40f4d4
push eax
call fcn.00409ab0
push dword [esi + 0x42035c]
lea eax, [ebp - 0xa0]
push eax
call fcn.00409ab0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040d3c8
add esp, 0x2c
pop edi
jmp 0x40c48d
lea eax, [ebp + 8]
lea esi, [esi + 0x42035c]
push 0
push eax
push dword [esi]
call fcn.00409540
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]
pop esi
leave
ret
Function at 0x405dcd
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x422a2c], 0
push esi
jne 0x405e04
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405dde
mov dword [ecx*4 + 0x422a28], eax
inc ecx
cmp ecx, 0x100
jl 0x405dd9
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405e35
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x422a28]
xor eax, esi
inc ecx
dec edx
jne 0x405e17
pop edi
not eax
pop esi
ret 0xc

Function at 0x40100b
Capabilities:
Query or enumerate registry value

Disassembly:
call 0x40100b
push eax
call sub.KERNEL32.dll_ExitProcess
push ebp
mov ebp, esp
add esp, 0xfffffef0
jmp 0x40109c
lea eax, [ebp - 0x104]
push eax
call fcn.004011ec
push 0x401019
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
jne 0x401165
lea eax, [ebp - 0x10c]
push eax
push 0x20019
push 0
push 0x401038
push 0x80000001
call sub.ADVAPI32.dll_RegOpenKeyExA
cmp eax, 0
jne 0x4011a5
mov dword [ebp - 0x110], 0x103
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x104]
push eax
push 0
push 0
push 0x401052
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegQueryValueExA
push eax
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegCloseKey
pop eax
cmp eax, 0
jne 0x4011a5
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrlenA
lea ebx, [ebp - 0x104]
add ebx, eax
dec ebx
cmp byte [ebx], 0x5c
je 0x40114a
mov word [ebx], 0x5c
push 0x401023
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
je 0x4011a5
mov dword [ebp - 0x108], eax
push 0x40102d
push eax
call sub.KERNEL32.dll_GetProcAddress
test eax, eax
je 0x40119a
push 0x3e8
call eax
test eax, eax
je 0x40119a
call 0x40118a
add dword [esp], 0x1e76
call eax
push 0
call sub.KERNEL32.dll_ExitProcess
push dword [ebp - 0x108]
call sub.KERNEL32.dll_FreeLibrary
push 0x10
push 0x401096
push 0x401057
push 0
call sub.USER32.dll_MessageBoxA
mov eax, 0xffffffff
leave
ret