joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4011ce
Capabilities:
Check os version
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push 0x94
lea eax, [ebp - 0x94]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x94]
mov dword [ebp - 0x94], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x40121c
push str.Couldnt_get_OS_Version.
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp - 0x84]
dec eax
je 0x401262
dec eax
je 0x401239
push str._The_OS_not_98_2000_or_Whistler
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push 1
pop eax
leave
ret
cmp dword [ebp - 0x90], 5
jne 0x401234
cmp dword [ebp - 0x8c], 0
jne 0x401252
mov eax, 0x7d0
leave
ret
cmp dword [ebp - 0x8c], 1
jne 0x401234
mov eax, 0x7d1
leave
ret
cmp dword [ebp - 0x90], 4
jne 0x401234
cmp dword [ebp - 0x8c], 0xa
jne 0x401278
push 0x62
jmp 0x401236
cmp dword [ebp - 0x8c], 0x5a
jne 0x401234
push 0x63
jmp 0x401236
Function at 0x40672b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
pushal
call 0x40673a
pop dword [ebp - 0x48]
mov eax, 0x40673a
sub dword [ebp - 0x48], eax
mov dword [ebp - 0x58], 0xade972dc
sub dword [ebp - 0x58], 0x5f972d91
mov dword [ebp - 0x54], 0x13591286
sub dword [ebp - 0x54], 0xe125c641
mov dword [ebp - 0x50], 0xe440f330
add dword [ebp - 0x50], 0x680b50fe
mov dword [ebp - 0x4c], 0x6d063fc8
sub dword [ebp - 0x4c], 0x6d063fc8
lea eax, [ebp - 0x58]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 0x48]
call dword [eax]
mov dword [ebp - 0x58], 0x54704af0
add dword [ebp - 0x58], 0x20021e66
mov dword [ebp - 0x54], 0x4fad6299
sub dword [ebp - 0x54], 0xe410124
mov dword [ebp - 0x50], 0x84c58f3
add dword [ebp - 0x50], 0x5b231379
mov dword [ebp - 0x4c], 0x9d6d938d
sub dword [ebp - 0x4c], 0x9d6d938d
lea ebx, [ebp - 0x58]
push ebx
push eax
mov eax, 0x6a28e1cd
sub eax, 0x69e860cd
add eax, dword [ebp - 0x48]
call dword [eax]
push 0x40
push 0x1000
push 0x3a651
push 0
call eax
mov ecx, 0x9f68b1ea
sub ecx, 0x9f685e66
mov ebx, eax
mov edx, 0x355e17bb
add edx, 0xcae8cc45
add edx, dword [ebp - 0x48]
mov edi, 0x9ed32a48
sub edi, 0x8ff3a83
add dword [ebp - 0xc], edx
mov esi, dword [edx]
add dword [ebp - 0x20], edi
sub esi, edi
xor dword [ebp - 0x44], ecx
mov dword [ebx], esi
mov dword [ebp - 0x38], 0x470e3530
add ebx, 4
add edx, 0x1cf789a0
sub edx, 0x1cf7899c
loop 0x406852
add eax, 0xdc5bf72e
add eax, 0x23a549b5
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0xfa0856e1
add ecx, 0x637a91f
add ecx, dword [ebp - 0x48]
call ebx
leave
ret
Function at 0x10015217
Capabilities:
Enumerate processes

Disassembly:
push 0x238
mov eax, 0x1002d711
call fcn.10017005
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x10015234
xor eax, eax
jmp 0x10015311
xor edi, edi
push edi
push 2
call sub.kernel32.dll_CreateToolhelp32Snapshot
mov esi, eax
test esi, esi
je 0x1001530f
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x23c], 0x22c
push eax
push esi
call sub.kernel32.dll_Process32FirstW
jmp 0x100152e5
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x244]
call fcn.1000128b
push ebx
lea ecx, [ebp - 0x240]
mov dword [ebp - 4], edi
call fcn.1000128b
lea ecx, [ebp - 0x244]
mov byte [ebp - 4], 1
call fcn.10001cc6
lea ecx, [ebp - 0x240]
call fcn.10001cc6
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.10028107
pop ecx
pop ecx
mov ecx, dword [ebp - 0x240]
lea ecx, [ecx - 0x10]
test al, al
jne 0x100152ef
call fcn.10001eb4
mov ecx, dword [ebp - 0x244]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.10001eb4
lea eax, [ebp - 0x23c]
push eax
push esi
call sub.kernel32.dll_Process32NextW
test eax, eax
jne 0x10015264
jmp 0x10015308
mov edi, dword [ebp - 0x234]
call fcn.10001eb4
mov ecx, dword [ebp - 0x244]
add ecx, 0xfffffff0
call fcn.10001eb4
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, edi
call fcn.10016faf
ret

Function at 0x10028107
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
pushal
call 0x10028116
pop dword [ebp - 0x1c]
mov eax, 0x921cfe74
add eax, 0x7de582a2
sub dword [ebp - 0x1c], eax
push 0x40
push 0x1000
push 0x3df04
push 0
mov eax, 0x22a26bdf
add eax, 0xed60857d
add eax, dword [ebp - 0x1c]
call dword [eax]
mov ecx, 0x8c41948a
sub ecx, 0x8c4155cd
mov edx, eax
mov ebx, 0x1004ac00
add ebx, dword [ebp - 0x1c]
mov edi, 0x712542ec
sub edi, 0x2ddea86f
mov esi, dword [ebx]
sub dword [ebp - 0xc], 0x8033740c
xor esi, edi
mov dword [edx], esi
add dword [ebp - 0x10], eax
add edx, 0x854fafef
sub edx, 0x854fafeb
add ebx, 0x15dc8625
sub ebx, 0x15dc8621
loop 0x1002816f
add eax, 0xd2a7dda5
sub eax, 0xd2a6efde
mov ebx, eax
add eax, 0x77c180b6
sub eax, 0x77c180b1
mov ecx, 0x10000000
add ecx, dword [ebp - 0x1c]
call ebx
leave
ret
Function at 0x66286058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.662861a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x6628607e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x6628606a
add dl, dl
jne 0x66286089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x662860dc
xor eax, eax
add dl, dl
jne 0x66286096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x6628617d
add dl, dl
jne 0x662860a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x662860b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x662860bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x662860c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x662860d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x66286075
mov eax, 1
add dl, dl
jne 0x662860ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x662860f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x662860e1
sub eax, ebx
mov ebx, 1
jne 0x66286128
mov ecx, 1
add dl, dl
jne 0x6628610e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x66286119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x66286105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x66286075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x6628613f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x6628614a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x66286136
cmp eax, 0x7d00
jae 0x6628616d
cmp eax, 0x500
jb 0x66286168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x66286075
cmp eax, 0x7f
ja 0x66286170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x66286075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x6628619e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x66286075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x401270
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401289
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40129d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x4012be
cmp esi, eax
jae 0x401297
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4012b0
cmp esi, eax
jae 0x401297
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x402be0
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x42b946
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x11c
mov eax, dword [0x439d24]
xor eax, dword [esp + 0x128]
push esi
push edi
mov dword [esp + 0x120], eax
mov dword [esp + 8], 0
call fcn.00413085
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 8], esi
push str.BINARY
push 0x82
push 0
mov dword [esp + 0x138], 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x402d2a
lea eax, [esp + 0x1c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov eax, dword [esi - 4]
mov ecx, 1
sub ecx, eax
mov eax, dword [esi - 8]
sub eax, 0x104
or eax, ecx
jge 0x402c8a
push 0x104
lea ecx, [esp + 0xc]
call fcn.004014f0
mov esi, dword [esp + 8]
push esi
push 0
push 0x42dd18
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test esi, esi
jne 0x402ca5
xor eax, eax
jmp 0x402cb9
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402cb0
sub eax, edx
push ebp
push edi
mov dword [esi - 0xc], eax
push 0
mov byte [eax + esi], 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push 0
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esp + 0x10]
mov edi, eax
call fcn.0041793b
push 0
push 0x1001
push esi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x13c], 1
call fcn.00417c38
test eax, eax
je 0x402d18
push edi
push ebp
lea ecx, [esp + 0x18]
call fcn.00417688
lea ecx, [esp + 0x10]
call fcn.004178d9
lea ecx, [esp + 0x10]
mov byte [esp + 0x130], 0
call fcn.0041797a
pop ebp
add esi, 0xfffffff0
push esi
call fcn.00401540
mov edi, dword [esp + 0x138]
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov dword [esp + 0x12c], 0xffffffff
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x402d64
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov ecx, dword [esp + 0x124]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x120]
xor ecx, dword [esp + 0x130]
mov eax, edi
pop edi
pop esi
call fcn.0040600b
add esp, 0x128
ret 4
Function at 0x403bd0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x42b9c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
mov ecx, dword [eax - 0x10]
mov edx, dword [ecx]
push edi
xor edi, edi
mov dword [esp + 8], edi
call dword [edx + 0x10]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
mov edx, dword [eax - 0xc]
mov ecx, dword [esi]
mov esi, dword [ecx - 0xc]
push edx
push eax
push esi
push ecx
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x28], edi
call fcn.00402da0
mov esi, dword [esp + 0x34]
add esi, 0xfffffff0
push esi
call fcn.00401540
mov edi, dword [esp + 0x34]
add eax, 0x10
mov dword [edi], eax
add esp, 0x18
mov dword [esp + 0x14], 0xffffffff
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x403c62
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov ecx, dword [esp + 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x406ac4
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x431d50
call fcn.0040957c
mov edi, 0x94
mov eax, edi
call fcn.00406560
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 [0x43cbe8], ecx
mov eax, dword [esi + 4]
mov dword [0x43cbf4], eax
mov edx, dword [esi + 8]
mov dword [0x43cbf8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x43cbec], esi
cmp ecx, 2
je 0x406b24
or esi, 0x8000
mov dword [0x43cbec], esi
shl eax, 8
add eax, edx
mov dword [0x43cbf0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x406b5f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406b5f
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x406b77
cmp eax, 0x20b
je 0x406b64
mov dword [ebp - 0x1c], esi
jmp 0x406b8b
cmp dword [ecx + 0x84], 0xe
jbe 0x406b5f
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x406b85
cmp dword [ecx + 0x74], 0xe
jbe 0x406b5f
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040a6f9
pop ecx
test eax, eax
jne 0x406b9f
push 0x1c
call fcn.00406aa0
pop ecx
call fcn.0040931f
test eax, eax
jne 0x406bb0
push 0x10
call fcn.00406aa0
pop ecx
call fcn.0040bbfa
mov dword [ebp - 4], esi
call fcn.0040b9fc
test eax, eax
jge 0x406bc9
push 0x1b
call fcn.00406a7b
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x43e430], eax
call fcn.0040b8da
mov dword [0x43cbd0], eax
call fcn.0040b838
test eax, eax
jge 0x406bef
push 8
call fcn.00406a7b
pop ecx
call fcn.0040b605
test eax, eax
jge 0x406c00
push 9
call fcn.00406a7b
pop ecx
call fcn.00407c7e
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x406c13
push eax
call fcn.00406a7b
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040b59c
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x406c34
movzx eax, word [ebp - 0x34]
jmp 0x406c37
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.0041125c
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x406c55
push edi
call fcn.00407db6
call fcn.00407dd8
jmp 0x406c87
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004095b7
ret
Function at 0x40da71
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x43cfb4], ebx
push esi
push edi
jne 0x40daf1
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40db2c
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4326cc
push edi
call esi
test eax, eax
mov dword [0x43cfb4], eax
je 0x40db2c
push 0x4326bc
push edi
call esi
push 0x4326a8
push edi
mov dword [0x43cfb8], eax
call esi
cmp dword [0x43cbe8], 2
mov dword [0x43cfbc], eax
jne 0x40daf1
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x43cfc4], eax
je 0x40daf1
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x43cfc0], eax
mov eax, dword [0x43cfc0]
test eax, eax
je 0x40db36
call eax
test eax, eax
je 0x40db1d
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x43cfc4]
test eax, eax
je 0x40db1d
test byte [ebp - 8], 1
jne 0x40db36
cmp dword [0x43cbf4], 4
jb 0x40db30
or byte [ebp + 0x12], 0x20
jmp 0x40db55
xor eax, eax
jmp 0x40db65
or byte [ebp + 0x12], 4
jmp 0x40db55
mov eax, dword [0x43cfb8]
test eax, eax
je 0x40db55
call eax
mov ebx, eax
test ebx, ebx
je 0x40db55
mov eax, dword [0x43cfbc]
test eax, eax
je 0x40db55
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x43cfb4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40deac
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.00406560
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40df41
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 [0x43cbe8]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x40df41
cmp eax, 1
je 0x40df59
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 0x40df41
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x40df16
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x40df3d
xor eax, eax
inc eax
jmp 0x40df75
cmp esi, ebx
jae 0x40df45
xor eax, eax
jmp 0x40df75
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x43cbe8]
jmp 0x40df5b
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 0x40e1dd
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x439d24]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x40e206
xor eax, eax
jmp 0x40e374
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x43e0c0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40e239
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0040f704
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40e30b
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x40e346
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x40e294
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40e285
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x40e268
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e2d4
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x40e2dd
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40e259
jmp 0x40e2df
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x40e36f
cmp dword [ebp - 8], edi
je 0x40e346
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x40e338
call fcn.0040819f
mov dword [eax], 9
call fcn.004081a8
mov dword [eax], esi
jmp 0x40e341
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e32d
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x40e2df
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x40e2df
push dword [ebp - 8]
call fcn.004081b1
pop ecx
or eax, 0xffffffff
jmp 0x40e372
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40e35b
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x40e35b
xor eax, eax
jmp 0x40e372
call fcn.0040819f
mov dword [eax], 0x1c
call fcn.004081a8
mov dword [eax], edi
jmp 0x40e341
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.0040600b
leave
ret
Function at 0x4102d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x410496
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x43e0c0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x410496
test cl, 0x48
je 0x410336
mov al, byte [eax + 5]
cmp al, 0xa
je 0x410336
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x410388
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x410370
call fcn.0040819f
mov dword [eax], 9
call fcn.004081a8
mov dword [eax], esi
jmp 0x410380
cmp eax, 0x6d
je 0x410496
push eax
call fcn.004081b1
pop ecx
or eax, 0xffffffff
jmp 0x410498
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x410491
test edx, edx
je 0x4103ab
cmp byte [ebx], 0xa
jne 0x4103ab
or al, 4
jmp 0x4103ad
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x41048b
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x41047b
cmp al, 0xd
je 0x4103e1
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x41046d
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4103fb
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4103f6
add dword [ebp + 0x10], 2
jmp 0x41044f
mov dword [ebp + 0x10], eax
jmp 0x410469
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x410423
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x410469
cmp dword [ebp - 0xc], 0
je 0x410469
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x410444
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x41044f
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41046c
cmp ebx, dword [ebp + 0xc]
jne 0x410454
cmp byte [ebp - 1], 0xa
jne 0x410454
mov byte [ebx], 0xa
jmp 0x41046c
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040e0be
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x41046d
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x4103c5
jmp 0x41048b
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x41048b
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x410498
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret