joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402b84
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ecx, esp
mov dword [ecx], eax
mov dword [ecx + 0x18], 0
mov dword [ecx + 0x14], 0x80
mov dword [ecx + 0x10], 3
mov dword [ecx + 0xc], 0
mov dword [ecx + 8], 1
mov dword [ecx + 4], 0x80000000
call sub.KERNEL32.DLL_CreateFileA
sub esp, 0x1c
mov ecx, 0xffffffff
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], ecx
jne 0x402c00
lea eax, str.Could_not_open__s_n
mov ecx, dword [ebp - 0xc]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040b83c
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], eax
jmp 0x402ce0
mov eax, dword [ebp - 0x10]
mov ecx, esp
mov dword [ecx], eax
mov dword [ecx + 4], 0
call sub.KERNEL32.DLL_GetFileSize
sub esp, 8
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov ecx, esp
mov dword [ecx], eax
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 8], 2
mov dword [ecx + 4], 0
call sub.KERNEL32.DLL_CreateFileMappingA
sub esp, 0x18
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov ecx, esp
mov dword [ecx], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov ecx, dword [ebp - 0x14]
mov edx, esp
mov dword [edx], ecx
mov dword [edx + 0x10], 0
mov dword [edx + 0xc], 0
mov dword [edx + 8], 0
mov dword [edx + 4], 4
mov dword [ebp - 0x20], eax
call sub.KERNEL32.DLL_MapViewOfFile
sub esp, 0x14
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov edx, dword [ebp - 8]
mov edx, dword [edx]
add edx, dword [ebp - 0x18]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.00402804
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0x24], eax
call sub.KERNEL32.DLL_UnmapViewOfFile
sub esp, 4
mov ecx, dword [ebp - 0x14]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0x28], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [ebp - 4], 1
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
add esp, 0x48
pop ebp
ret
Function at 0x402e88
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
jmp 0x402e9a
call fcn.00410c30
mov eax, dword [0x415693]
shl eax, 2
mov dword [0x415697], eax
push edx
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov edx, eax
mov dword [0x41569b], edx
call fcn.0040a0c4
pop edx
call fcn.00407f38
call fcn.0040a0c8
push 0x41563c
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [0x41569b], eax
push 0
jmp 0x412158
push ebx
push edi
push esi
sub esp, 0x5c
mov esi, dword [esp + 0x6c]
mov eax, dword [esi + 0x10]
and eax, 1
mov dword [0x417b44], eax
call fcn.0040e34c
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040e760
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call fcn.0040b0e4
mov eax, dword [esi + 0x44]
mov dword [esp], eax
call fcn.0040b0f4
mov dword [0x41fd94], 1
mov dword [0x41fd98], esi
lea eax, [esp + 0x10]
mov dword [0x41fd60], eax
call fcn.00412a64
call sub.KERNEL32.DLL_GetEnvironmentStrings
mov dword [0x41fd64], eax
call sub.KERNEL32.DLL_GetCommandLineA
mov dword [0x41fd6c], eax
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.004110e8
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x38]
mov edx, dword [esi + 0x3c]
mov edi, dword [esi + 0x40]
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00411138
mov dword [esp + 4], 0
mov dword [esp], 0x41fd94
call fcn.00411fa0
test byte [esi + 0x10], 1
je 0x412243
mov eax, dword [0x41fd6c]
nop word cs:[eax + eax]
inc eax
mov cl, byte [eax - 1]
cmp cl, 9
je 0x412228
cmp cl, 0x22
je 0x412267
cmp cl, 0x20
je 0x412228
dec eax
mov edx, 0x20
jmp 0x41227c
mov eax, dword [0x41fd78]
mov ecx, dword [0x41fd7c]
mov edx, dword [0x41fd80]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [esi + 0x18]
jmp 0x4122ff
mov cl, byte [eax]
mov edx, 0x22
jmp 0x41227c
mov cl, byte [eax + 1]
inc eax
xor ch, ch
test cl, cl
je 0x412290
cmp cl, 9
je 0x41228e
movsx edi, cl
cmp edi, edx
jne 0x412278
mov ch, cl
lea edi, [eax + 1]
cmp ch, 0x22
cmovne edi, eax
jmp 0x4122a9
inc edi
mov al, byte [edi]
cmp al, 9
je 0x4122a8
cmp al, 0x20
je 0x4122a8
mov ebx, dword [esi + 0x18]
mov dword [esp], 0
call sub.KERNEL32.DLL_GetModuleHandleA
sub esp, 4
mov esi, eax
lea eax, [esp + 0x18]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetStartupInfoA
sub esp, 4
mov eax, 0xa
test byte [esp + 0x44], 1
je 0x4122e7
movzx eax, word [esp + 0x48]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], 0
call ebx
sub esp, 0x10
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00410f04
add esp, 0x5c
pop esi
pop edi
pop ebx
ret
Function at 0x40691c
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x28c
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
lea edi, [ebp - 0x260]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0040a4b8
lea ecx, [0x415b38]
lea edx, [ebp - 0x260]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [ebp - 0x268], eax
call fcn.00405b8c
lea ecx, [ebp - 0x15c]
lea edx, [ebp - 0x260]
mov esi, esp
mov dword [esi + 8], ecx
mov dword [esi], edx
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0xc], 1
mov dword [esi + 4], 0
mov dword [ebp - 0x26c], eax
call sub.KERNEL32.DLL_FindFirstFileExA
sub esp, 0x18
mov ecx, 0xffffffff
mov dword [ebp - 0x160], eax
cmp dword [ebp - 0x160], ecx
jne 0x4069ce
mov dword [ebp - 0xc], 0
jmp 0x406b4f
mov dword [ebp - 0x264], 0
mov eax, dword [ebp - 0x15c]
and eax, 0x10
cmp eax, 0
je 0x406b05
lea eax, [0x415b3a]
lea ecx, [ebp - 0x15c]
add ecx, 0x2c
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040a468
cmp eax, 0
je 0x406b03
lea eax, [0x415b3c]
lea ecx, [ebp - 0x15c]
add ecx, 0x2c
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040a468
cmp eax, 0
je 0x406b03
lea eax, [ebp - 0x260]
mov ecx, dword [ebp - 0x10]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040a4b8
lea ecx, [ebp - 0x15c]
lea edx, [ebp - 0x260]
add ecx, 0x2c
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [ebp - 0x270], eax
call fcn.00405b8c
lea ecx, [ebp - 0x15c]
lea edx, [ebp - 0x260]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [ebp - 0x274], eax
call esi
cmp eax, 0
jne 0x406aaa
jmp 0x406b2e
mov eax, dword [ebp - 0x264]
add eax, 1
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x14], 0
je 0x406b01
mov eax, 1
lea ecx, [ebp - 0x260]
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
mov dword [esp], ecx
mov dword [esp + 4], 1
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
mov dword [ebp - 0x278], eax
call fcn.0040691c
mov ecx, dword [ebp - 0x264]
add ecx, eax
mov dword [ebp - 0x264], ecx
jmp 0x406b03
jmp 0x406b05
mov eax, dword [ebp - 0x160]
lea ecx, [ebp - 0x15c]
mov edx, esp
mov dword [edx + 4], ecx
mov dword [edx], eax
call sub.KERNEL32.DLL_FindNextFileA
sub esp, 8
cmp eax, 0
jne 0x406b29
jmp 0x406b2e
jmp 0x4069d8
mov eax, dword [ebp - 0x160]
mov ecx, esp
mov dword [ecx], eax
call sub.KERNEL32.DLL_FindClose
sub esp, 4
mov ecx, dword [ebp - 0x264]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x27c], eax
mov eax, dword [ebp - 0xc]
add esp, 0x28c
pop esi
pop edi
pop ebp
ret
Function at 0x406b5c
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x13c
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x14], eax
mov eax, esp
mov dword [eax + 4], ecx
mov dword [eax + 8], 0x100
mov dword [eax], 0
call sub.KERNEL32.DLL_GetModuleFileNameA
sub esp, 0xc
lea ecx, [ebp - 0x118]
mov edx, dword [ebp - 0x14]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [ebp - 0x12c], eax
call fcn.00405fcc
lea eax, [ebp - 0x118]
lea ecx, [ebp - 0x120]
mov edx, esp
mov dword [edx + 4], ecx
mov dword [edx], eax
call sub.VERSION.DLL_GetFileVersionInfoSizeA
sub esp, 8
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
ja 0x406be2
mov dword [ebp - 0x10], 0
jmp 0x406d24
mov eax, dword [ebp - 0x120]
mov dword [esp], eax
call fcn.00407ce0
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x120]
mov edx, dword [ebp - 0x18]
mov esi, esp
mov dword [esi + 0xc], edx
mov dword [esi + 8], eax
mov dword [esi], ecx
mov dword [esi + 4], 0
call sub.VERSION.DLL_GetFileVersionInfoA
sub esp, 0x10
lea ecx, [ebp - 0x11c]
mov edx, dword [ebp - 0x18]
lea esi, [ebp - 0x120]
mov edi, esp
mov dword [edi + 0xc], esi
mov dword [edi + 8], ecx
mov dword [edi], edx
mov dword [edi + 4], 0x415b40
mov dword [ebp - 0x130], eax
call sub.VERSION.DLL_VerQueryValueA
sub esp, 0x10
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x128], 0
je 0x406c87
cmp dword [ebp - 0x120], 4
jne 0x406c87
mov eax, dword [ebp - 0x11c]
movzx eax, word [eax]
shl eax, 0x10
mov ecx, dword [ebp - 0x11c]
movzx ecx, word [ecx + 2]
or eax, ecx
mov dword [ebp - 0x124], eax
jmp 0x406c91
mov dword [ebp - 0x124], 0x40904e4
lea eax, [0x415b59]
lea ecx, [ebp - 0x118]
mov edx, dword [ebp - 0x124]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.0040bbe4
lea ecx, [ebp - 0x11c]
lea edx, [ebp - 0x118]
mov esi, dword [ebp - 0x18]
lea edi, [ebp - 0x120]
mov ebx, esp
mov dword [ebx + 0xc], edi
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [ebx], esi
mov dword [ebp - 0x134], eax
call sub.VERSION.DLL_VerQueryValueA
sub esp, 0x10
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x128], 0
je 0x406d10
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x11c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040a4b8
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.00407cf0
mov eax, dword [ebp - 0x128]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
add esp, 0x13c
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x408d50
Capabilities:
Read file via mapping

Disassembly:
push edi
push esi
sub esp, 0x14
call sub.KERNEL32.DLL_GetCurrentProcessId
mov ecx, eax
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF_]
mov byte [0x416476], cl
mov ecx, eax
shr ecx, 4
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF_]
mov byte [0x416475], cl
mov ecx, eax
shr ecx, 8
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF_]
mov byte [0x416474], cl
mov ecx, eax
shr ecx, 0xc
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF_]
mov byte [0x416473], cl
mov ecx, eax
shr ecx, 0x10
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF_]
mov byte [0x416472], cl
mov ecx, eax
shr ecx, 0x14
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF_]
mov byte [0x416471], cl
mov ecx, eax
shr ecx, 0x18
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF_]
mov byte [0x416470], cl
shr eax, 0x1c
mov al, byte [eax + str.0123456789ABCDEF_]
mov byte [0x41646f], al
mov dword [esp + 8], str.LocalFastMM_PID________
mov dword [esp + 4], 0
mov dword [esp], 4
call sub.KERNEL32.DLL_OpenFileMappingA
sub esp, 0xc
mov esi, eax
test esi, esi
je 0x408e5b
mov dword [esp], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 4
call sub.KERNEL32.DLL_MapViewOfFile
sub esp, 0x14
mov edi, dword [eax]
mov dword [esp], eax
call sub.KERNEL32.DLL_UnmapViewOfFile
sub esp, 4
mov dword [esp], esi
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
jmp 0x408e5d
xor edi, edi
mov eax, edi
add esp, 0x14
pop esi
pop edi
ret

Function at 0x408e70
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0x18
xor eax, eax
mov ecx, fcn.0040973a
cmp dword [0x415d0c], ecx
jne 0x408f75
mov ecx, fcn.00409abe
cmp dword [0x415d10], ecx
jne 0x408f75
mov ecx, fcn.00409cb6
cmp dword [0x415d14], ecx
jne 0x408f75
mov ecx, fcn.00409fd0
cmp dword [0x415d18], ecx
jne 0x408f75
mov ecx, 0x408070
cmp dword [0x415d1c], ecx
jne 0x408f75
xor eax, eax
mov ecx, 0x408080
cmp dword [0x415d20], ecx
jne 0x408f75
mov ecx, dword [0x419754]
test ecx, ecx
jne 0x408f75
call fcn.00408d50
mov ecx, eax
xor eax, eax
test ecx, ecx
jne 0x408f75
mov dword [esp + 0x14], str.LocalFastMM_PID________
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov dword [esp + 4], 0
mov dword [esp], 0xffffffff
call sub.KERNEL32.DLL_CreateFileMappingA
sub esp, 0x18
mov dword [0x419754], eax
mov dword [esp], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 2
call sub.KERNEL32.DLL_MapViewOfFile
sub esp, 0x14
mov dword [eax], fcn.0040973a
mov dword [esp], eax
call sub.KERNEL32.DLL_UnmapViewOfFile
sub esp, 4
mov eax, 1
add esp, 0x18
ret
Function at 0x40ae3c
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov esi, dword [esp + 0x3c]
cmp dword [0x416970], esi
jbe 0x40aa3c
mov edx, dword [esp + 0x44]
lea ecx, [edx + 1]
xor eax, eax
cmp ecx, 2
jb 0x40aa48
mov eax, dword [esi*4 + 0x416974]
test ah, 0x40
je 0x40aa50
xor edi, edi
test ah, 2
je 0x40aa5c
xor eax, eax
jmp 0x40aa48
mov dword [esp], 0xfffffffa
call fcn.0040b650
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
jmp 0x40ae3c
test edx, edx
jne 0x40aa64
xor eax, eax
jmp 0x40aa48
mov ebx, dword [esp + 0x40]
sub edx, edi
mov dword [esp + 0x10], edx
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], esi
call 0x40ae3c
mov ebp, eax
test ebp, ebp
je 0x40abbd
mov dword [esp + 0x18], edi
mov eax, 0xffffffff
cmp ebp, 0xffffffff
je 0x40aa48
mov dword [esp + 8], ebp
mov dword [esp], ebx
mov dword [esp + 4], 0x1a
call fcn.0040a1cc
test eax, eax
je 0x40aac0
or byte [esi*4 + 0x416975], 2
mov ebp, eax
sub ebp, ebx
je 0x40abb9
mov dword [esp + 0x1c], eax
lea edi, [ebp + ebx - 1]
cmp byte [ebp + ebx - 1], 0xd
jne 0x40aaf3
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 8], 1
call 0x40ae3c
mov ecx, eax
mov eax, 0xffffffff
cmp ecx, 0xffffffff
je 0x40aa48
mov dword [esp + 0x24], edi
lea eax, [ebx + ebp]
mov dword [esp + 0x20], eax
mov dword [esp + 0xc], ebp
mov edi, ebx
mov esi, ebx
mov dword [esp + 0x14], ebx
jmp 0x40ab19
add edi, ebp
inc ebx
mov esi, ebx
mov ebp, dword [esp + 0x20]
mov eax, ebp
sub eax, esi
mov dword [esp + 8], eax
mov dword [esp], esi
mov dword [esp + 4], 0xd
call fcn.0040a1cc
mov ebx, eax
test ebx, ebx
cmove ebx, ebp
mov ebp, ebx
sub ebp, esi
cmp esi, edi
je 0x40ab54
mov dword [esp + 8], ebp
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0040a224
mov eax, dword [esp + 0x24]
cmp ebx, eax
jb 0x40ab14
mov ebx, dword [esp + 0x14]
sub edi, ebx
add ebp, edi
mov edi, dword [esp + 0x18]
add edi, ebp
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x10]
jae 0x40ab95
cmp dword [esp + 0x1c], 0
sete al
mov esi, dword [esp + 0x3c]
test byte [esi*4 + 0x416975], 0x20
sete cl
test ebp, ebp
jne 0x40abbd
and cl, al
jne 0x40aba9
jmp 0x40abbd
cmp dword [esp + 0x1c], 0
sete al
test ebp, ebp
mov esi, dword [esp + 0x3c]
jne 0x40abbd
test al, al
je 0x40abbd
add ebx, ebp
mov edx, dword [esp + 0x44]
cmp edi, edx
jb 0x40aa68
jmp 0x40abbd
mov edi, dword [esp + 0x18]
mov eax, edi
jmp 0x40aa48
push esi
sub esp, 0x18
mov eax, dword [esp + 0x20]
cmp dword [0x416970], eax
jbe 0x40ae89
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov eax, dword [eax*4 + 0x41b9f8]
lea esi, [esp + 0x14]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 0x10], 0
call sub.KERNEL32.DLL_ReadFile
sub esp, 0x14
cmp eax, 1
jne 0x40ae97
mov eax, dword [esp + 0x14]
jmp 0x40aead
mov dword [esp], 6
call fcn.0040b650
jmp 0x40aead
call sub.KERNEL32.DLL_GetLastError
mov ecx, eax
xor eax, eax
cmp ecx, 0x6d
je 0x40aead
mov dword [esp], ecx
call fcn.0040b650
add esp, 0x18
pop esi
ret
jmp 0x40aa04
Function at 0x40aec4
Capabilities:
Write file on windows

Disassembly:
push esi
sub esp, 0x18
mov eax, dword [esp + 0x20]
cmp dword [0x416970], eax
jbe 0x40af11
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov eax, dword [eax*4 + 0x41b9f8]
lea esi, [esp + 0x14]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 0x10], 0
call sub.KERNEL32.DLL_WriteFile
sub esp, 0x14
cmp eax, 1
jne 0x40af1f
mov eax, dword [esp + 0x14]
jmp 0x40af24
mov dword [esp], 6
call fcn.0040b650
jmp 0x40af24
call fcn.0040b6d0
add esp, 0x18
pop esi
ret
Function at 0x40cfd0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov eax, dword [esp + 0x48]
test ah, 0xc0
je 0x40a7f0
mov ebx, eax
jmp 0x40a7ff
mov ecx, dword [0x416a40]
mov ebx, 0xc000
and ebx, dword [ecx]
or ebx, eax
mov edi, ebx
shr edi, 1
and edi, 0x4000
xor edi, 0x4000
or edi, ebx
mov eax, ebx
and eax, 0x700
cmp eax, 0x1ff
ja 0x40a82d
cmp eax, 0x100
jne 0x40a873
mov ebp, 4
jmp 0x40a878
cmp eax, 0x2ff
ja 0x40a83d
cmp eax, 0x200
jne 0x40a873
jmp 0x40a865
cmp eax, 0x4ff
ja 0x40a852
cmp eax, 0x300
jne 0x40a873
mov ebp, 2
jmp 0x40a878
mov ebp, 1
cmp eax, 0x500
je 0x40a878
cmp eax, 0x600
jne 0x40a86c
mov ebp, 5
jmp 0x40a878
cmp eax, 0x700
je 0x40a878
mov ebp, 3
mov eax, ebx
and eax, 0x100
mov dword [esp + 0x1c], eax
je 0x40a8b0
lea eax, [esp + 0x4c]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x4c]
and eax, dword [0x4164bc]
mov edx, 1
mov ecx, 0x80
test al, 0x80
cmove ecx, edx
jmp 0x40a8c7
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetFileAttributesA
sub esp, 4
xor ecx, ecx
cmp eax, 0xffffffff
cmovne ecx, eax
mov eax, 0x80000000
mov edx, ebx
and edx, 3
je 0x40a8e9
cmp edx, 2
jne 0x40a8df
mov eax, 0xc0000000
jmp 0x40a8e9
cmp edx, 1
jne 0x40a90f
mov eax, 0x40000000
mov edx, ebx
mov esi, edx
and ebx, 0x70
xor edx, edx
cmp ebx, 0x10
je 0x40a925
cmp ebx, 0x30
jne 0x40a903
mov edx, 2
jmp 0x40a925
cmp ebx, 0x20
jne 0x40a920
mov edx, 1
jmp 0x40a925
mov dword [esp], 1
call fcn.0040b650
jmp 0x40a9fb
mov edx, 3
mov ebx, esi
test bl, 4
je 0x40a937
cmp eax, 0x80000000
sete dl
movzx edx, dl
mov dword [esp + 0x24], 0xc
mov dword [esp + 0x28], 0
shr ebx, 7
and ebx, 1
xor ebx, 1
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebp
lea ecx, [esp + 0x24]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
mov dword [esp + 0x18], 0
call sub.KERNEL32.DLL_CreateFileA
sub esp, 0x1c
mov esi, eax
cmp esi, 0xffffffff
je 0x40a9d4
mov dword [esp], esi
call fcn.0040a74c
mov dword [esp], esi
mov ecx, edi
or ecx, 0x2000
test eax, eax
cmove ecx, edi
and ecx, 0xfffff8ff
mov dword [esp + 4], ecx
call fcn.0040b290
cmp eax, 0xffffffff
jne 0x40a9fb
mov dword [esp], 4
call fcn.0040b650
mov dword [esp], esi
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov eax, 0xffffffff
jmp 0x40a9fb
call sub.KERNEL32.DLL_GetLastError
movzx eax, ax
cmp eax, 0x6e
jne 0x40a9f3
mov ecx, 0x50
mov eax, 2
cmp dword [esp + 0x1c], 0
cmovne eax, ecx
mov dword [esp], eax
call fcn.0040b650
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
jmp 0x40a7dc
Function at 0x40cfe0
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov esi, dword [esp + 0x3c]
cmp dword [0x416970], esi
jbe 0x40aa3c
mov edx, dword [esp + 0x44]
lea ecx, [edx + 1]
xor eax, eax
cmp ecx, 2
jb 0x40aa48
mov eax, dword [esi*4 + 0x416974]
test ah, 0x40
je 0x40aa50
xor edi, edi
test ah, 2
je 0x40aa5c
xor eax, eax
jmp 0x40aa48
mov dword [esp], 0xfffffffa
call fcn.0040b650
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
jmp 0x40ae3c
test edx, edx
jne 0x40aa64
xor eax, eax
jmp 0x40aa48
mov ebx, dword [esp + 0x40]
sub edx, edi
mov dword [esp + 0x10], edx
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], esi
call 0x40ae3c
mov ebp, eax
test ebp, ebp
je 0x40abbd
mov dword [esp + 0x18], edi
mov eax, 0xffffffff
cmp ebp, 0xffffffff
je 0x40aa48
mov dword [esp + 8], ebp
mov dword [esp], ebx
mov dword [esp + 4], 0x1a
call fcn.0040a1cc
test eax, eax
je 0x40aac0
or byte [esi*4 + 0x416975], 2
mov ebp, eax
sub ebp, ebx
je 0x40abb9
mov dword [esp + 0x1c], eax
lea edi, [ebp + ebx - 1]
cmp byte [ebp + ebx - 1], 0xd
jne 0x40aaf3
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 8], 1
call 0x40ae3c
mov ecx, eax
mov eax, 0xffffffff
cmp ecx, 0xffffffff
je 0x40aa48
mov dword [esp + 0x24], edi
lea eax, [ebx + ebp]
mov dword [esp + 0x20], eax
mov dword [esp + 0xc], ebp
mov edi, ebx
mov esi, ebx
mov dword [esp + 0x14], ebx
jmp 0x40ab19
add edi, ebp
inc ebx
mov esi, ebx
mov ebp, dword [esp + 0x20]
mov eax, ebp
sub eax, esi
mov dword [esp + 8], eax
mov dword [esp], esi
mov dword [esp + 4], 0xd
call fcn.0040a1cc
mov ebx, eax
test ebx, ebx
cmove ebx, ebp
mov ebp, ebx
sub ebp, esi
cmp esi, edi
je 0x40ab54
mov dword [esp + 8], ebp
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0040a224
mov eax, dword [esp + 0x24]
cmp ebx, eax
jb 0x40ab14
mov ebx, dword [esp + 0x14]
sub edi, ebx
add ebp, edi
mov edi, dword [esp + 0x18]
add edi, ebp
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x10]
jae 0x40ab95
cmp dword [esp + 0x1c], 0
sete al
mov esi, dword [esp + 0x3c]
test byte [esi*4 + 0x416975], 0x20
sete cl
test ebp, ebp
jne 0x40abbd
and cl, al
jne 0x40aba9
jmp 0x40abbd
cmp dword [esp + 0x1c], 0
sete al
test ebp, ebp
mov esi, dword [esp + 0x3c]
jne 0x40abbd
test al, al
je 0x40abbd
add ebx, ebp
mov edx, dword [esp + 0x44]
cmp edi, edx
jb 0x40aa68
jmp 0x40abbd
mov edi, dword [esp + 0x18]
mov eax, edi
jmp 0x40aa48
push esi
sub esp, 0x18
mov eax, dword [esp + 0x20]
cmp dword [0x416970], eax
jbe 0x40ae89
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov eax, dword [eax*4 + 0x41b9f8]
lea esi, [esp + 0x14]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 0x10], 0
call sub.KERNEL32.DLL_ReadFile
sub esp, 0x14
cmp eax, 1
jne 0x40ae97
mov eax, dword [esp + 0x14]
jmp 0x40aead
mov dword [esp], 6
call fcn.0040b650
jmp 0x40aead
call sub.KERNEL32.DLL_GetLastError
mov ecx, eax
xor eax, eax
cmp ecx, 0x6d
je 0x40aead
mov dword [esp], ecx
call fcn.0040b650
add esp, 0x18
pop esi
ret
jmp 0x40aa04
Function at 0x4108ec
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x3c
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
call sub.KERNEL32.DLL_CreateFileA
sub esp, 0x1c
mov esi, eax
test esi, esi
je 0x410a0f
lea eax, [esp + 0x2c]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetLocalTime
sub esp, 4
movzx eax, word [esp + 0x2e]
mov dword [esp + 0x24], eax
movzx ecx, word [esp + 0x32]
movzx edx, word [esp + 0x2c]
movzx ebx, word [esp + 0x34]
movzx ebp, word [esp + 0x36]
movzx edi, word [esp + 0x38]
movzx eax, word [esp + 0x3a]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x24]
mov dword [esp + 8], eax
mov dword [esp + 4], str._02d__02d__04d__02d:_02d:_02d._03d
mov dword [esp], 0x41bcd4
call sub.USER32.DLL_wsprintfA
mov dword [esp], 0x41bcd4
call fcn.0040a504
lea ebx, [esp + 0x28]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp], esi
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0x41bcd4
call sub.KERNEL32.DLL_WriteFile
sub esp, 0x14
mov edi, dword [esp + 0x54]
mov dword [esp], edi
call fcn.0040a504
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 0x10], 0
call sub.KERNEL32.DLL_WriteFile
sub esp, 0x14
mov dword [esp], esi
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret