joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100366f6
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov edx, dword [ebx + 0x24]
push esi
mov dword [ebp - 8], edx
push edi
mov ecx, dword [ebx + 0x64]
mov eax, dword [ebx + 0x34]
mov esi, dword [ebx + 0x6c]
sub eax, ecx
sub eax, esi
mov dword [ebp - 4], eax
jne 0x10036722
test ecx, ecx
jne 0x1003672c
test esi, esi
jne 0x1003672c
mov eax, edx
jmp 0x1003679d
cmp eax, 0xffffffff
jne 0x1003672c
push 0xfffffffffffffffe
pop eax
jmp 0x1003679d
mov esi, dword [ebx + 0x24]
lea esi, [edx + esi - 0x106]
cmp ecx, esi
jb 0x1003679d
mov edi, dword [ebx + 0x30]
mov ecx, edx
mov eax, ecx
shr ecx, 2
lea esi, [edi + edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x44]
mov eax, dword [ebx + 0x3c]
sub dword [ebx + 0x68], edx
sub dword [ebx + 0x64], edx
sub dword [ebx + 0x54], edx
lea eax, [eax + ecx*2]
dec eax
dec eax
movzx esi, word [eax]
mov edi, esi
sub edi, edx
cmp esi, edx
sbb esi, esi
not esi
and esi, edi
dec ecx
mov word [eax], si
jne 0x10036762
mov eax, dword [ebx + 0x38]
mov esi, edx
lea eax, [eax + edx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edi, ecx
sub edi, edx
cmp ecx, edx
sbb ecx, ecx
not ecx
and ecx, edi
dec esi
mov word [eax], cx
jne 0x10036781
mov eax, dword [ebp - 4]
add eax, edx
mov esi, dword [ebx]
cmp dword [esi + 4], 0
mov dword [ebp - 0xc], esi
je 0x1003684a
mov edi, dword [ebx + 0x6c]
add edi, dword [ebx + 0x64]
mov ecx, dword [esi + 4]
add edi, dword [ebx + 0x30]
cmp ecx, eax
mov dword [ebp - 4], ecx
jbe 0x100367c2
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x100367cc
xor ecx, ecx
jmp 0x1003680b
sub ecx, dword [ebp - 4]
mov eax, dword [esi + 0x1c]
mov dword [esi + 4], ecx
cmp dword [eax + 0x18], 0
jne 0x100367ee
push dword [ebp - 4]
push dword [esi]
push dword [esi + 0x30]
call fcn.10036f87
mov edx, dword [ebp - 8]
mov dword [esi + 0x30], eax
mov ecx, dword [ebp - 4]
mov esi, dword [esi]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov eax, dword [ebp - 0xc]
add dword [eax], ecx
add dword [eax + 8], ecx
add dword [ebx + 0x6c], ecx
mov edi, dword [ebx + 0x6c]
cmp edi, 3
jb 0x10036836
mov eax, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x30]
lea esi, [eax + ecx]
movzx eax, byte [esi]
mov ecx, dword [ebx + 0x50]
mov dword [ebx + 0x40], eax
shl eax, cl
movzx ecx, byte [esi + 1]
xor eax, ecx
and eax, dword [ebx + 0x4c]
mov dword [ebx + 0x40], eax
cmp edi, 0x106
jae 0x1003684a
mov eax, dword [ebx]
cmp dword [eax + 4], 0
jne 0x10036704
pop edi
pop esi
leave
ret
Function at 0x41319e
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6a0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push dword [ebp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_WideCharToMultiByte]
push 0
push 0
push eax
lea edx, [ebp - 0x698]
push edx
push 0xffffffffffffffff
push dword [ebp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_WideCharToMultiByte]
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
cmp eax, 0xffffffff
jne 0x41324b
push 0xa0d
push 0x7325203a
push 0x24454c49
push 0x465f474e
push 0x494e4550
push 0x4f5f524f
push 0x52524524
mov dword [ebp - 8], esp
lea edx, [ebp - 0x698]
push edx
push dword [ebp - 8]
lea edx, [ebp - 0x594]
push edx
call dword [sym.imp.USER32.DLL_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x594]
push edx
call dword [ebx + 0x30]
add esp, 0x1c
jmp 0x4132fc
mov dword [ebp - 0x6a0], eax
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [esi + 0x58], eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov dword [esi + 0x54], eax
push 0
lea edx, [ebp - 0x69c]
push edx
push dword [esi + 0x58]
push eax
push dword [ebp - 0x6a0]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push dword [ebp - 0x6a0]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0xa
push 0xd732520
push 0x3a244445
push 0x5443454c
push 0x45535f45
push 0x4c494624
mov dword [ebp - 4], esp
lea edx, [ebp - 0x698]
push edx
push dword [ebp - 4]
lea edx, [ebp - 0x594]
push edx
call dword [sym.imp.USER32.DLL_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x594]
push edx
call dword [ebx + 0x30]
add esp, 0x18
push 1
call dword [ebx + 0x44]
call dword [ebx + 0x3c]
cmp eax, 1
jne 0x4132f7
mov eax, dword [esi + 0x58]
sub eax, 0x80
mov dword [esi + 0x14], eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov dword [esi + 0x20], eax
push 0
call dword [ebx + 0x44]
leave
ret 4

Function at 0x4135b5
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov byte [ebp - 1], 0
jmp 0x4135c8
mov al, byte [ebp - 1]
add al, 1
mov byte [ebp - 1], al
movzx ecx, byte [ebp - 1]
cmp ecx, 4
jge 0x413635
mov byte [ebp - 2], 0
jmp 0x4135e0
mov dl, byte [ebp - 2]
add dl, 1
mov byte [ebp - 2], dl
movzx eax, byte [ebp - 2]
cmp eax, 4
jge 0x413633
movzx ecx, byte [ebp - 1]
mov edx, dword [0x4177a9]
lea eax, [edx + ecx*4]
movzx ecx, byte [ebp - 2]
movzx edx, byte [ebp + 8]
shl edx, 2
movzx esi, byte [ebp - 1]
shl esi, 2
lea edx, [esi + edx*4]
movzx esi, byte [ebp - 2]
movzx edx, byte [edx + esi + 0x4176f8]
movzx eax, byte [eax + ecx]
xor eax, edx
movzx ecx, byte [ebp - 2]
movzx edx, byte [ebp - 1]
mov esi, dword [0x4177a9]
lea edx, [esi + edx*4]
mov byte [edx + ecx], al
jmp 0x4135d7
jmp 0x4135c0
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x413f38
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
mov byte [ebp - 1], 0
jmp 0x413f4a
mov al, byte [ebp - 1]
add al, 1
mov byte [ebp - 1], al
movzx ecx, byte [ebp - 1]
cmp ecx, 0x10
jge 0x413f7a
movzx edx, byte [ebp - 1]
movzx eax, byte [ebp - 1]
mov ecx, dword [0x4176f0]
movzx eax, byte [ecx + eax]
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + edx]
xor edx, eax
movzx eax, byte [ebp - 1]
mov ecx, dword [ebp + 8]
mov byte [ecx + eax], dl
jmp 0x413f42
mov esp, ebp
pop ebp
ret 4
Function at 0x402470
Capabilities:
Query environment variable
Set environment variable

Disassembly:
sub esp, 0x21c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 8]
call fcn.00408b40
push 0x41549e
lea ecx, [esp + 0x10]
call fcn.004095e0
mov eax, dword [esi + 0x34]
test eax, eax
mov byte [esp + 0x1c], 0
je 0x4024e7
push 0x200
lea eax, [esp + 0x20]
push eax
push str.CLASSPATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x18]
call fcn.004095e0
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x10]
call fcn.00408da0
lea ecx, [esp + 0x14]
call fcn.00408640
lea eax, [esp + 0xc]
push 0
push eax
call fcn.004022c0
add esp, 8
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
call dword [edx + 4]
push eax
lea ecx, [esp + 8]
call fcn.00408d00
lea eax, [esp + 4]
push 0
push eax
call fcn.004022c0
add esp, 8
lea ecx, [esp + 0xc]
call fcn.00408af0
push eax
lea ecx, [esp + 8]
call fcn.00408af0
push eax
push str._1__2
lea ecx, [esi + 0x24]
call fcn.004089d0
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x41549e
push str.CLASSPATH
call esi
push 0x41549e
push 0x415480
call esi
lea ecx, [esp + 0xc]
call fcn.00408640
lea ecx, [esp + 4]
call fcn.00408640
mov ax, 1
pop esi
add esp, 0x21c
ret

Function at 0x402650
Capabilities:
Query environment variable
Set environment variable

Disassembly:
sub esp, 0x14
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 0x20]
mov eax, dword [ecx]
lea esi, [edi + 0x2c]
push esi
mov dword [esp + 0xc], edi
call dword [eax]
test eax, eax
je 0x40279e
mov ecx, esi
call fcn.004089f0
test eax, eax
je 0x402686
push esi
call fcn.004020e0
add esp, 4
test eax, eax
jne 0x4026b6
push esi
mov ecx, edi
call fcn.00402570
test eax, eax
je 0x40279e
mov ecx, esi
call fcn.004089f0
test eax, eax
je 0x40279e
push esi
call fcn.004020e0
add esp, 4
test eax, eax
je 0x40279e
mov al, byte [0x41c9f0]
test al, al
jne 0x402791
push ebx
push ebp
push 0
lea ecx, [esp + 0x18]
mov byte [0x41c9f0], 1
call fcn.00408b40
push 0x4154e8
lea ecx, [esp + 0x20]
push esi
push ecx
call fcn.00408db0
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
call fcn.00408da0
lea ecx, [esp + 0x1c]
call fcn.00408640
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0
push 0
push str.PATH
call ebp
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.004089f0
lea ebx, [esi + eax + 1]
push ebx
call fcn.004095a0
add esp, 4
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.00408af0
mov edx, esi
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x402733
mov edi, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402740
mov dx, word [0x4152a4]
mov eax, esi
mov word [edi], dx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402757
sub eax, edx
sub ebx, eax
push ebx
add eax, esi
push eax
push str.PATH
call ebp
push esi
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push esi
call fcn.00407730
add esp, 4
lea ecx, [esp + 0x14]
call fcn.00408640
mov edi, dword [esp + 0x10]
pop ebp
pop ebx
mov ecx, edi
call fcn.00402470
pop edi
pop esi
add esp, 0x14
ret
pop edi
or ax, 0xffff
pop esi
add esp, 0x14
ret
Function at 0x407430
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xd0
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
mov ebx, 0x41b5b4
jmp 0x407450
mov ecx, 0xa
mov esi, str.SoftwareSybaseAdaptive_Server_Anywhere
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x407466
mov ax, word [0x4156c4]
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407480
lea edi, [esp + 0x18]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x407490
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebx]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x24]
push edx
push eax
call ebp
test eax, eax
jne 0x40750a
mov edx, dword [esp + 0xec]
lea ecx, [esp + 0xf0]
push ecx
mov ecx, dword [esp + 0xec]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x40750a
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x14], ecx
je 0x407526
add ebx, 4
cmp ebx, 0x41b5bc
jl 0x407450
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd0
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd0
ret

Function at 0x407560
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x40757e
mov eax, esi
pop esi
ret
mov byte [esi], 0
xor eax, eax
pop esi
ret

Function at 0x4085f0
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
mov eax, str.Unknown_error
je 0x408600
mov eax, esi
push 0
push str.SQLAnywhere_Fatal_Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
test esi, esi
je 0x40861d
push esi
call fcn.0040c3cf
add esp, 4
push 1
call fcn.0040c38f
pop esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x409380
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x210
mov eax, dword [ecx + 4]
test eax, eax
mov dword [esp + 8], ecx
jne 0x40939d
or eax, 0xffffffff
add esp, 0x210
ret 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x230]
test edi, edi
mov ecx, 0xff
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ecx
jne 0x4093bd
lea edi, [esp + 0x1c]
mov ebp, dword [esp + 0x224]
push edi
lea ecx, [esp + 0x124]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov esi, eax
cmp esi, 0xea
jne 0x40943e
mov eax, dword [edi]
inc eax
push eax
call fcn.004095a0
add esp, 4
push edi
mov ebx, eax
push ebx
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x24]
push 0
lea edx, [esp + 0x20]
push edx
mov edx, dword [ecx + 4]
lea eax, [esp + 0x34]
push eax
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov esi, eax
test esi, esi
jne 0x409467
mov ecx, dword [esp + 0x22c]
push ebx
call fcn.00408d00
push ebx
call fcn.00407730
add esp, 4
jmp 0x409456
test esi, esi
jne 0x409456
mov ecx, dword [esp + 0x22c]
lea eax, [esp + 0x120]
push eax
call fcn.00408d00
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x22c]
call fcn.00408d00
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret 0x10

Function at 0x409480
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x414d2f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
push edi
mov edi, ecx
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0xc], 0
call fcn.00408b40
push 0
lea ecx, [esp + 0x10]
mov dword [esp + 0x30], 1
call fcn.00408b40
push 0
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], 2
call fcn.00408b40
xor esi, esi
push esi
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push esi
mov ecx, edi
mov byte [esp + 0x3c], 3
call fcn.00409380
test eax, eax
jne 0x40952c
push ebp
mov ebp, dword [esp + 0x3c]
push ebp
lea ecx, [esp + 0x1c]
call fcn.00408b00
test eax, eax
jne 0x40951d
push eax
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x20]
push eax
inc esi
push esi
mov ecx, edi
call fcn.00409380
test eax, eax
je 0x4094f5
jmp 0x40952b
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x24]
call fcn.00408da0
pop ebp
mov esi, dword [esp + 0x34]
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call fcn.00408b80
lea ecx, [esp + 0x1c]
mov dword [esp + 8], 1
mov byte [esp + 0x2c], 2
call fcn.00408640
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 1
call fcn.00408640
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 0
call fcn.00408640
mov ecx, dword [esp + 0x24]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret 8
Function at 0x409c09
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x417a20
call fcn.0040d91c
mov edi, 0x94
mov eax, edi
call fcn.0040ae10
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 [0x41ce4c], ecx
mov eax, dword [esi + 4]
mov dword [0x41ce58], eax
mov edx, dword [esi + 8]
mov dword [0x41ce5c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41ce50], esi
cmp ecx, 2
je 0x409c69
or esi, 0x8000
mov dword [0x41ce50], esi
shl eax, 8
add eax, edx
mov dword [0x41ce54], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x409ca4
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x409ca4
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x409cbc
cmp eax, 0x20b
je 0x409ca9
mov dword [ebp - 0x1c], esi
jmp 0x409cd0
cmp dword [ecx + 0x84], 0xe
jbe 0x409ca4
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x409cca
cmp dword [ecx + 0x74], 0xe
jbe 0x409ca4
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040d8c9
pop ecx
test eax, eax
jne 0x409ce4
push 0x1c
call fcn.00409be5
pop ecx
call fcn.0040d840
test eax, eax
jne 0x409cf5
push 0x10
call fcn.00409be5
pop ecx
call fcn.0040d729
mov dword [ebp - 4], esi
call fcn.0040d52b
test eax, eax
jge 0x409d0e
push 0x1b
call fcn.00409bc0
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41e650], eax
call fcn.0040d409
mov dword [0x41ce34], eax
call fcn.0040d367
test eax, eax
jge 0x409d34
push 8
call fcn.00409bc0
pop ecx
call fcn.0040d134
test eax, eax
jge 0x409d45
push 9
call fcn.00409bc0
pop ecx
call fcn.0040c257
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x409d58
push eax
call fcn.00409bc0
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040d0cb
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x409d79
movzx eax, word [ebp - 0x34]
jmp 0x409d7c
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.00401970
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x409d9a
push edi
call fcn.0040c38f
call fcn.0040c3b1
jmp 0x409dcc
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040d957
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40ae6d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040bc7b
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x40ae90
test byte [esp + 8], 2
je 0x40ae90
call fcn.0040bc69
mov dword [eax], 0xd
call fcn.0040bc72
mov dword [eax], 5
jmp 0x40ae69
xor eax, eax
ret
Function at 0x40b7a1
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 0x40b967
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x41e540]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40b967
test cl, 0x48
je 0x40b807
mov al, byte [eax + 5]
cmp al, 0xa
je 0x40b807
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 0x40b859
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40b841
call fcn.0040bc69
mov dword [eax], 9
call fcn.0040bc72
mov dword [eax], esi
jmp 0x40b851
cmp eax, 0x6d
je 0x40b967
push eax
call fcn.0040bc7b
pop ecx
or eax, 0xffffffff
jmp 0x40b969
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 0x40b962
test edx, edx
je 0x40b87c
cmp byte [ebx], 0xa
jne 0x40b87c
or al, 4
jmp 0x40b87e
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 0x40b95c
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40b94c
cmp al, 0xd
je 0x40b8b2
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40b93e
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40b8cc
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40b8c7
add dword [ebp + 0x10], 2
jmp 0x40b920
mov dword [ebp + 0x10], eax
jmp 0x40b93a
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 0x40b8f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40b93a
cmp dword [ebp - 0xc], 0
je 0x40b93a
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40b915
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40b920
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40b93d
cmp ebx, dword [ebp + 0xc]
jne 0x40b925
cmp byte [ebp - 1], 0xa
jne 0x40b925
mov byte [ebx], 0xa
jmp 0x40b93d
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041099d
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40b93e
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40b896
jmp 0x40b95c
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x40b95c
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40b969
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ba19
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x41bce0]
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 0x40ba42
xor eax, eax
jmp 0x40bbb0
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 + 0x41e540]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40ba75
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0040afb1
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40bb47
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x40bb82
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 0x40bad0
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40bac1
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 0x40baa4
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 0x40bb10
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x40bb19
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40ba95
jmp 0x40bb1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x40bbab
cmp dword [ebp - 8], edi
je 0x40bb82
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x40bb74
call fcn.0040bc69
mov dword [eax], 9
call fcn.0040bc72
mov dword [eax], esi
jmp 0x40bb7d
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 0x40bb69
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x40bb1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x40bb1b
push dword [ebp - 8]
call fcn.0040bc7b
pop ecx
or eax, 0xffffffff
jmp 0x40bbae
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40bb97
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x40bb97
xor eax, eax
jmp 0x40bbae
call fcn.0040bc69
mov dword [eax], 0x1c
call fcn.0040bc72
mov dword [eax], edi
jmp 0x40bb7d
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.0040f8d9
leave
ret