joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43ebb0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, 1
jle 0x43ebce
push esi
lea ecx, [esp + 0x18]
dec edx
mov esi, dword [ecx]
add ecx, 0xc
xor eax, esi
dec edx
jne 0x43ebc3
pop esi
ret

Function at 0x43ed10
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
push edi
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x43eda2
mov eax, dword [esp + 0x10]
push ebx
mov ebx, 1
push ebp
cmp eax, ebx
push esi
mov dword [esp + 0x10], ebx
jle 0x43ed94
mov ebp, dword [sym.imp.KERNEL32.DLL_WriteFile]
lea esi, [esp + 0x2c]
mov eax, dword [esi]
lea edx, [esp + 0x14]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push edi
call ebp
test eax, eax
je 0x43ed8c
mov eax, dword [esp + 0x1c]
inc ebx
add esi, 0xc
cmp ebx, eax
jl 0x43ed55
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
mov dword [esp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret

Function at 0x401686
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x404474], eax
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov dword [0x4041cf], ebp
mov dword [0x404404], eax
mov dword [0x4041c7], eax
mov dword [0x4043f0], 0x30
mov dword [0x4043f4], 2
jmp 0x4016c6
mov dword [0x4043f8], 0x403051
mov dword [0x4043fc], 0
mov dword [0x404400], 0
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0x40440c], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadIconA]
mov dword [0x404408], eax
mov dword [0x40441c], eax
mov dword [0x404418], 0x40439a
mov dword [0x404410], 0xf
push 0x4043f0
call dword [sym.imp.user32.dll_RegisterClassExA]
push 0
push dword [0x4041c7]
push 0
push 0
push 0x1e0
push 0x1fe
push 0xfffff862
push 0xfffff8f8
push 0xcf0000
push 0x4043e7
push str.lunt
push 0
call dword [sym.imp.user32.dll_CreateWindowExA]
mov dword [0x404468], eax
push 5
push dword [0x404468]
call dword [sym.imp.user32.dll_ShowWindow]
push dword [0x404468]
call dword [sym.imp.user32.dll_UpdateWindow]
xor edi, edi
lea ebx, [0x404420]
jmp 0x40179a
push ebx
call dword [sym.imp.user32.dll_TranslateMessage]
push ebx
call dword [sym.imp.user32.dll_DispatchMessageA]
push edi
push edi
push edi
push ebx
call dword [sym.imp.user32.dll_GetMessageA]
test al, al
jne 0x40178c
mov eax, dword [0x404428]
jmp 0x4017b5
call 0x402a06
ret
Function at 0x414de0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section..text_1
lea edi, [esi - 0xe000]
push edi
jmp 0x414dfa
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x414e01
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x414df0
mov eax, 1
add ebx, ebx
jne 0x414e13
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x414e24
jne 0x414e43
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x414e43
dec eax
add ebx, ebx
jne 0x414e30
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x414e08
add ebx, ebx
jne 0x414e3f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x414e95
xor ecx, ecx
sub eax, 3
jb 0x414e5b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x414eca
sar eax, 1
mov ebp, eax
jmp 0x414e66
add ebx, ebx
jne 0x414e66
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x414e34
inc ecx
add ebx, ebx
jne 0x414e74
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x414e34
add ebx, ebx
jne 0x414e81
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x414e76
jne 0x414e92
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x414e76
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x414eb4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x414ea6
jmp 0x414df6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x414eb4
add edi, ecx
jmp 0x414df6
pop esi
mov edi, esi
mov ecx, 0xb800
jmp 0x414f05
mov al, byte [edi]
inc edi
cmp al, 0x80
jb 0x414ee5
cmp al, 0x8f
ja 0x414ee5
cmp byte [edi - 2], 0xf
je 0x414eeb
sub al, 0xe8
cmp al, 1
ja 0x414f0f
cmp ecx, 4
jb 0x414f14
mov eax, dword [edi]
sub al, 5
jne 0x414f0f
xchg ah, al
rol eax, 0x10
xchg ah, al
sub eax, edi
add eax, esi
sub ecx, 4
stosd dword es:[edi], eax
sub ecx, 1
jb 0x414f14
mov al, byte [edi]
inc edi
jmp 0x414ee5
sub ecx, 1
jae 0x414ed4
lea edi, [esi + 0x12000]
mov eax, dword [edi]
or eax, eax
je 0x414f5c
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x15000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x1506c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x414f1a
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x15074]
or eax, eax
je 0x414f56
mov dword [ebx], eax
add ebx, 4
jmp 0x414f37
call dword [esi + 0x15070]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x414f8d
cmp al, 0xef
ja 0x414f80
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x414f62
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x414f6f
mov ebp, dword [esi + 0x15078]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1f7]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x414fc1
sub esp, 0xffffff80
jmp 0x405dd2
Function at 0x42211b
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x42215a
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42215a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42215a
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x42215a
cmp dword [ecx + 0x74], 0xe
jbe 0x42215a
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x4347a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4347cd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4347cd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x401219
Capabilities:
Terminate process

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40501c
push 0x40109a
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push eax
fnstcw word [esp]
or word [esp], 0x300
fldcw word [esp]
add esp, 4
push 0
push 0
push 0x405028
push 0x405024
push 0x405020
call sub.CRTDLL.DLL___GetMainArgs
push dword [0x405028]
push dword [0x405024]
push dword [0x405020]
mov dword [0x405014], esp
call fcn.0040129c
add esp, 0x18
xor ecx, ecx
mov dword [ebp - 4], ecx
push eax
call sub.CRTDLL.DLL_exit
leave
ret
Function at 0x401f10
Capabilities:
Get disk information
Inspect load icon resource
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x148
push ebx
push esi
push edi
push 0x65
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [esp + 0xc]
call fcn.00401000
lea ecx, [esp + 0x50]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc]
push edx
call fcn.004012b0
test eax, eax
je 0x402021
lea eax, [esp + 0x50]
push 0x404030
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x402084
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x10]
call fcn.00401290
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
sub eax, 8
push 0
push eax
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x24]
push 8
push edx
call ebx
mov eax, dword [esp + 0x2c]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x48]
push 0x38
push ecx
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x50]
add esp, 0x3c
test eax, eax
mov eax, dword [esp + 0x10]
push edx
push eax
jne 0x401ffe
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401800
jmp 0x402084
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401a90
jmp 0x402084
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, eax
mov esi, 1
xor ebx, ebx
test edi, esi
je 0x40206a
mov dl, bl
lea ecx, [esp + 0x10]
add dl, 0x41
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x40412c
lea ecx, [esp + 0x14]
call fcn.004020e2
lea ecx, [esp + 0xc]
mov eax, dword [esp + 0x10]
push eax
push 0
call fcn.00401cf0
add esi, esi
inc ebx
cmp ebx, 0x1a
jl 0x402039
lea ecx, [esp + 0xc]
call fcn.00401040
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
call fcn.00401030
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x148
ret 0x10

Function at 0x4ca262
Capabilities:
Encode data using xor

Disassembly:
mov ebx, 0x4c9fca
mov eax, 0x51909a4d
sub ecx, 0x887ffc30
push ecx
pop ecx
call fcn.004ca2a9
sub eax, eax
or eax, eax
sub ecx, eax
xor dword [edi], ebx
and ecx, ecx
add ecx, 0x82cb1736
sub eax, 0xa6eeee2b
inc edi
and eax, ecx
sub ecx, ecx
cmp edi, esi
jne fcn.004ca262
push eax
pop ecx
dec eax
or ecx, eax
ret
Function at 0x407aab
Capabilities:
Hash data using sha256

Disassembly:
cmp dword [0x449804], 2
push esi
push edi
mov edi, edx
mov esi, ecx
jl 0x407abf
call fcn.0040673f
call fcn.004080aa
xor edx, edx
mov ecx, dword [esi + 0xf4]
mov eax, dword [edx + 0x441330]
mov dword [edx + ecx], eax
add edx, 4
cmp edx, 0x20
jl 0x407ac6
mov eax, dword [esi + 0xf4]
xor dword [eax], 0x2080020
mov eax, dword [esi + 0xf4]
xor dword [eax + 8], edi
mov ecx, dword [esi + 0xf4]
mov eax, dword [esp + 0xc]
or eax, 0x2000
shl eax, 0x10
xor dword [ecx + 0xc], eax
pop edi
pop esi
ret 4
Function at 0x408d49
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, edx
test esi, esi
je 0x408d6d
movzx edx, byte [edi]
movzx eax, cl
xor edx, eax
shr ecx, 8
xor ecx, dword [edx*4 + 0x44a430]
inc edi
sub esi, 1
jne 0x408d55
pop edi
mov eax, ecx
pop esi
ret 4
Function at 0x40905a
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x1e0
mov eax, dword [0x448020]
xor eax, esp
mov dword [esp + 0x1dc], eax
push ebx
mov eax, ecx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x1e8]
mov ebx, edx
mov edx, dword [esp + 0x1f8]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x1f0]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1fc]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x200]
mov dword [esp + 8], edx
mov dword [esp + 0x14], ecx
push ebp
push esi
push edi
mov edi, dword [esp + 0x200]
mov dword [esp + 0x24], edi
cmp ebx, 0x40
jbe 0x4090fa
lea ecx, [esp + 0x100]
call fcn.004159df
push ebx
mov edx, eax
call fcn.00415be0
lea edx, [esp + 0x1ac]
lea ecx, [esp + 0x100]
call fcn.00415c49
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1ac]
push 0x20
mov dword [esp + 0x20], eax
pop ebx
xor ebp, ebp
test edi, edi
je 0x409116
cmp byte [edx], 0
je 0x409116
mov esi, edi
lea edi, [esp + 0x30]
push 0x1a
pop ecx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x24]
jmp 0x40917a
mov edx, ebp
test ebx, ebx
je 0x40913c
mov esi, eax
lea eax, [esp + 0x168]
sub esi, eax
lea ecx, [esp + 0x168]
add ecx, edx
mov al, byte [esi + ecx]
xor al, 0x36
inc edx
mov byte [ecx], al
cmp edx, ebx
jb 0x409127
cmp ebx, 0x40
jae 0x40915b
push 0x40
pop eax
sub eax, ebx
lea ecx, [esp + 0x168]
push eax
add ecx, ebx
push 0x36
push ecx
call fcn.004245b0
add esp, 0xc
lea ecx, [esp + 0x30]
call fcn.004159df
push 0x40
lea edx, [esp + 0x16c]
call fcn.00415be0
test edi, edi
je 0x40918b
mov edx, dword [esp + 0x14]
cmp byte [edx], 0
jne 0x40918b
push 0x1a
pop ecx
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov byte [edx], 1
push dword [esp + 0x1f8]
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x34]
call fcn.00415be0
lea edx, [esp + 0x1cc]
lea ecx, [esp + 0x30]
call fcn.00415c49
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4091d4
mov eax, dword [esp + 0x20]
cmp byte [eax], 0
je 0x4091d4
mov esi, edi
lea edi, [esp + 0x98]
push 0x1a
pop ecx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x18]
jmp 0x40923b
test ebx, ebx
je 0x4091fa
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x168]
sub edx, eax
lea ecx, [esp + 0x168]
add ecx, ebp
mov al, byte [edx + ecx]
xor al, 0x5c
inc ebp
mov byte [ecx], al
cmp ebp, ebx
jb 0x4091e5
cmp ebx, 0x40
jae 0x409219
push 0x40
pop eax
sub eax, ebx
lea ecx, [esp + 0x168]
push eax
add ecx, ebx
push 0x5c
push ecx
call fcn.004245b0
add esp, 0xc
lea ecx, [esp + 0x98]
call fcn.004159df
push 0x40
lea edx, [esp + 0x16c]
call fcn.00415be0
test edi, edi
je 0x40924f
mov eax, dword [esp + 0x20]
cmp byte [eax], 0
jne 0x40924f
push 0x1a
pop ecx
lea esi, [esp + 0x98]
rep movsd dword es:[edi], dword [esi]
mov byte [eax], 1
push 0x20
lea edx, [esp + 0x1d0]
lea ecx, [esp + 0x9c]
call fcn.00415be0
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x98]
call fcn.00415c49
mov ecx, dword [esp + 0x1ec]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00422945
add esp, 0x1e0
ret 0x1c
Function at 0x40928f
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1ac
mov eax, dword [0x448020]
xor eax, esp
mov dword [esp + 0x1a8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
push 0x10
push eax
lea eax, [esp + 0x150]
mov dword [esp + 0x1c], edx
push eax
mov dword [esp + 0x24], ecx
call fcn.00424030
mov edx, dword [esp + 0x20]
add esp, 0xc
mov ecx, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x158], 0x1000000
push eax
push eax
push eax
push eax
lea eax, [esp + 0x118]
push eax
push 0x14
lea eax, [esp + 0x160]
push eax
call fcn.0040905a
push 0x20
lea eax, [esp + 0x10c]
push eax
lea eax, [esp + 0x130]
push eax
call fcn.00424030
mov eax, dword [ebp + 0x1c]
add esp, 0xc
dec eax
mov dword [esp + 0xfc], esi
mov dword [esp + 0xf0], eax
xor esi, esi
mov dword [esp + 0x104], ebx
push 0x10
pop eax
push 0x20
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], eax
mov dword [esp + 0x104], edi
mov byte [esp + 0x17], 0
mov byte [esp + 0x16], 0
mov dword [esp + 0x20], esi
pop ebx
mov edi, dword [esp + esi + 0xf0]
test edi, edi
je 0x4093da
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x12]
push eax
lea eax, [esp + 0x24]
mov edx, esi
push eax
lea eax, [esp + 0x1b]
push eax
lea eax, [esp + 0x94]
push eax
lea eax, [esp + 0x1a4]
push eax
push ebx
lea eax, [esp + 0x120]
push eax
call fcn.0040905a
push ebx
lea eax, [esp + 0x198]
push eax
lea eax, [esp + 0x110]
push eax
call fcn.00424030
add esp, 0xc
xor ecx, ecx
mov al, byte [esp + ecx + 0x108]
xor byte [esp + ecx + 0x128], al
inc ecx
cmp ecx, ebx
jb 0x4093be
sub edi, 1
jne 0x409370
mov esi, dword [esp + 0x1c]
push ebx
lea eax, [esp + 0x12c]
push eax
push dword [esp + esi + 0x104]
call fcn.00424030
add esi, 4
add esp, 0xc
mov dword [esp + 0x1c], esi
cmp esi, 0xc
jb 0x409361
push 0x44
pop edx
lea ecx, [esp + 0x148]
call fcn.00414ca7
mov edx, ebx
lea ecx, [esp + 0x128]
call fcn.00414ca7
mov edx, ebx
lea ecx, [esp + 0x108]
call fcn.00414ca7
mov edx, ebx
lea ecx, [esp + 0x194]
call fcn.00414ca7
mov ecx, dword [esp + 0x1b4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00422945
mov esp, ebp
pop ebp
ret 0x18
Function at 0x4096f5
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x448020]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
xor eax, eax
mov dword [esp + 0x10], ebx
cmp dword [edi], 2
lea esi, [edi + 4]
jne 0x40976c
mov ecx, dword [esi]
lea edx, [esp + 0xc]
call fcn.004080a7
push eax
push eax
push eax
push eax
lea eax, [esp + 0x24]
mov ecx, ebx
push eax
push 4
mov eax, edx
push eax
push 0x20
pop edx
call fcn.0040905a
xor edx, edx
and dword [esp + 0xc], edx
mov ebx, dword [esp + 0xc]
movzx eax, byte [esp + edx + 0x14]
mov ecx, edx
and ecx, 3
shl ecx, 3
shl eax, cl
xor eax, ebx
inc edx
mov ebx, eax
cmp edx, 0x20
jb 0x40974b
mov ebx, dword [esp + 0x10]
mov dword [esi], eax
xor eax, eax
cmp dword [edi], 3
jne 0x409797
push eax
push eax
push eax
push eax
lea eax, [esp + 0x24]
mov ecx, ebx
push eax
push 0x20
push esi
push 0x20
pop edx
call fcn.0040905a
push 0x20
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00424030
add esp, 0xc
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00422945
mov esp, ebp
pop ebp
ret
Function at 0x40e4b0
Capabilities:
Check if file exists

Disassembly:
push 0x8c
mov eax, 0x439606
call fcn.00438386
mov edi, ecx
and dword [edi + 0x4c], 0
cmp byte [edi + 0x30], 0
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x90], eax
jne 0x40e4e0
test bl, 4
jne 0x40e4e0
xor cl, cl
jmp 0x40e4e2
mov cl, 1
mov esi, ebx
shr esi, 1
not esi
and esi, 1
inc esi
shl esi, 0x1e
test bl, 1
je 0x40e4fa
or esi, 0x40000000
shr ebx, 3
not ebx
and ebx, 1
test cl, cl
je 0x40e509
or ebx, 2
lea ecx, [ebp - 0x88]
call fcn.0040a742
xor eax, eax
mov dword [ebp - 4], eax
cmp byte [edi + 0x24], al
je 0x40e524
or esi, 0x100
mov ecx, dword [ebp - 0x90]
push eax
push 0x8000000
push 3
push eax
push ebx
push esi
call fcn.0040126f
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x8c], eax
cmp eax, 0xffffffff
jne 0x40e5c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x94], eax
call fcn.004021e6
mov ecx, dword [ebp - 0x90]
lea edx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00411580
test al, al
je 0x40e5a7
push 0
push 0x8000000
push 3
push 0
push ebx
push esi
lea ecx, [ebp - 0x28]
call fcn.0040126f
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x8c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40e5a7
push eax
pop ebx
jmp 0x40e5ad
mov ebx, dword [ebp - 0x94]
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.00401e5c
mov eax, dword [ebp - 0x8c]
jmp 0x40e5c7
mov ebx, dword [ebp - 0x94]
cmp eax, 0xffffffff
jne 0x40e5d8
cmp ebx, 2
jne 0x40e5d8
mov dword [edi + 0x4c], 1
cmp byte [edi + 0x24], 0
je 0x40e609
cmp eax, 0xffffffff
je 0x40e609
or dword [ebp - 0x98], 0xffffffff
lea ecx, [ebp - 0x98]
or dword [ebp - 0x94], 0xffffffff
push 0
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp - 0x8c]
xor ecx, ecx
cmp eax, 0xffffffff
mov byte [edi + 0x1c], cl
mov dword [edi + 0x10], ecx
setne bl
mov byte [edi + 0x15], cl
je 0x40e631
push dword [ebp - 0x90]
lea ecx, [edi + 0x34]
mov dword [edi + 8], eax
call fcn.0040335d
mov byte [edi + 0x25], 0
lea ecx, [ebp - 0x88]
call fcn.0040a766
mov al, bl
call fcn.00438335
ret 8
Function at 0x40e80f
Capabilities:
Write file on windows

Disassembly:
push 0x2c
mov eax, 0x439520
call fcn.00438386
mov ebx, ecx
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
test esi, esi
jne 0x40e831
mov al, 1
jmp 0x40e962
cmp dword [ebx + 0x10], 1
lea ecx, [ebx + 8]
mov dword [ebp - 0x34], ecx
jne 0x40e84f
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [ebx + 8]
mov dword [ecx], eax
jmp 0x40e930
mov dword [ebp - 0x34], ecx
and dword [ebp - 0x30], 0
xor dl, dl
cmp dword [ebx + 0x10], 0
mov byte [ebp - 0x29], dl
je 0x40e8a6
xor edi, edi
test esi, esi
je 0x40e8c6
mov eax, esi
mov edx, 0x4000
sub eax, edi
cmp eax, edx
jb 0x40e876
mov eax, edx
push 0
lea edx, [ebp - 0x30]
push edx
push eax
mov eax, dword [ebp - 0x38]
add eax, edi
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
setne dl
mov byte [ebp - 0x29], dl
test eax, eax
je 0x40e8be
mov ecx, dword [ebp - 0x34]
add edi, 0x4000
cmp edi, esi
jb 0x40e867
jmp 0x40e8be
push 0
lea edx, [ebp - 0x30]
push edx
push esi
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
setne dl
mov byte [ebp - 0x29], dl
test dl, dl
jne 0x40e95b
cmp byte [ebx + 0x1e], 0
je 0x40e95b
cmp dword [ebx + 0x10], 0
jne 0x40e95b
push ecx
lea edi, [ebx + 0x34]
push edi
call fcn.00409ed2
test al, al
je 0x40e938
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 0x30], esi
jae 0x40e852
cmp dword [ebp - 0x30], 0
jbe 0x40e852
mov edi, dword [ebx]
mov esi, dword [edi + 0x14]
mov ecx, esi
call dword [0x43b26c]
mov ecx, ebx
call esi
sub eax, dword [ebp - 0x30]
mov ecx, dword [edi + 0x10]
push 0
sbb edx, 0
push edx
push eax
call dword [0x43b26c]
mov ecx, ebx
call dword [edi + 0x10]
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
jmp 0x40e852
push 0x4412dc
lea ecx, [ebp - 0x28]
call fcn.00401d16
and dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push edi
push eax
call fcn.00409eb4
lea ecx, [ebp - 0x28]
call fcn.00401e5c
mov al, byte [ebp - 0x29]
mov byte [ebx + 0xc], 1
call fcn.00438335
ret 8

Function at 0x40f014
Capabilities:
Create directory

Disassembly:
push 0x20
mov eax, 0x438fe3
call fcn.00438386
mov bl, dl
mov esi, ecx
call fcn.004109ea
movzx eax, ax
cmp eax, 0x2e
je 0x40f04e
cmp eax, 0x20
je 0x40f04e
push 0
mov ecx, esi
call fcn.0040126f
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, eax
test edi, edi
jne 0x40f098
jmp 0x40f050
xor edi, edi
mov ecx, esi
call fcn.0040f324
test al, al
jne 0x40f0aa
lea ecx, [ebp - 0x2c]
call fcn.004021e6
and dword [ebp - 4], 0
lea edx, [ebp - 0x2c]
mov ecx, esi
call fcn.00411580
test al, al
je 0x40f088
push 0
lea ecx, [ebp - 0x2c]
call fcn.0040126f
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00401e5c
test edi, edi
je 0x40f0aa
test bl, bl
je 0x40f0a6
mov edx, dword [ebp + 8]
mov ecx, esi
call fcn.0040f3ae
xor eax, eax
jmp 0x40f0c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
push 2
pop eax
cmp ecx, eax
je 0x40f0c2
xor eax, eax
cmp ecx, 3
sete al
inc eax
call fcn.00438335
ret 4
Function at 0x40f352
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0x1c
mov eax, 0x438b77
call fcn.00438386
mov edi, ecx
call fcn.0040126f
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40f3a6
lea ecx, [ebp - 0x28]
call fcn.004021e6
and dword [ebp - 4], 0
lea edx, [ebp - 0x28]
mov ecx, edi
call fcn.00411580
test al, al
je 0x40f39e
lea ecx, [ebp - 0x28]
call fcn.0040126f
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
lea ecx, [ebp - 0x28]
call fcn.00401e5c
mov eax, esi
call fcn.00438335
ret

Function at 0x40f3ae
Capabilities:
Set file attributes

Disassembly:
push 0x1c
mov eax, 0x438b77
call fcn.00438386
mov esi, edx
mov edi, ecx
push esi
call fcn.0040126f
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
test eax, eax
jne 0x40f40b
lea ecx, [ebp - 0x28]
call fcn.004021e6
and dword [ebp - 4], 0
lea edx, [ebp - 0x28]
mov ecx, edi
call fcn.00411580
test al, al
je 0x40f403
push esi
lea ecx, [ebp - 0x28]
call fcn.0040126f
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
lea ecx, [ebp - 0x28]
call fcn.00401e5c
mov al, bl
call fcn.00438335
ret