joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41d4d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
xor ebx, ebx
cmp edi, ebx
jne 0x41d4ee
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 8
ret
cmp dword [edi + 0x18], ebx
jne 0x41d500
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 8
ret
cmp dword [edi + 0x7c], ebx
je 0x41d50e
push edi
call fcn.0041d940
add esp, 4
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
push edi
call fcn.0041d2d0
add esp, 0x10
test eax, eax
je 0x41d537
pop edi
pop esi
pop ebp
mov eax, 0xffffff99
pop ebx
add esp, 8
ret
mov ebp, dword [sym.imp.MSVCRT.dll_malloc]
push 0x84
call ebp
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x41d55a
pop edi
pop esi
pop ebp
mov eax, 0xffffff98
pop ebx
add esp, 8
ret
push 0x4000
call ebp
mov dword [esi], eax
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x44], ecx
mov edx, dword [esp + 0x14]
add esp, 4
cmp eax, ebx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ebx
jne 0x41d592
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, 0xffffff98
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov dword [esi + 0x40], ebx
mov edx, dword [edi + 0x34]
mov ecx, dword [edi + 0x3c]
xor eax, eax
cmp edx, ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x50], ebx
mov edx, dword [edi + 0x34]
mov dword [esi + 0x64], edx
mov ecx, dword [edi]
sete al
mov dword [esi + 0x60], ecx
mov edx, dword [edi + 0xc]
cmp eax, ebx
mov dword [esi + 0x68], edx
mov dword [esi + 0x18], ebx
jne 0x41d5e0
lea eax, [esi + 4]
mov dword [esi + 0x24], ebx
push eax
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.0041c1f0
add esp, 4
test eax, eax
jne 0x41d5e0
mov dword [esi + 0x40], 1
mov ecx, dword [edi + 0x40]
mov dword [esi + 0x58], ecx
mov edx, dword [edi + 0x44]
mov dword [esi + 0x5c], edx
mov al, byte [edi + 0x30]
and al, 1
mov byte [esi + 0x6c], al
mov ecx, dword [edi + 0x30]
shr ecx, 3
test cl, 1
je 0x41d60d
mov edx, dword [edi + 0x38]
shr edx, 8
mov byte [esi + 0x80], dl
jmp 0x41d619
mov eax, dword [edi + 0x3c]
shr eax, 0x18
mov byte [esi + 0x80], al
mov cl, byte [esi + 0x6c]
mov ebp, dword [esp + 0x20]
neg cl
sbb ecx, ecx
lea ebx, [esi + 0x70]
and ecx, 0xc
mov dword [esi + 0x74], 0x23456789
test ebp, ebp
mov dword [esi + 0x7c], ecx
mov dword [ebx], 0x12345678
mov dword [esi + 0x78], 0x34567890
je 0x41d659
mov al, byte [ebp]
test al, al
je 0x41d659
push eax
push ebx
call fcn.0041bf40
add esp, 8
inc ebp
jne 0x41d645
mov edx, dword [edi + 0x78]
mov eax, dword [esp + 0x14]
mov dword [esi + 8], 0
lea ecx, [edx + eax + 0x1e]
xor eax, eax
mov dword [esi + 0x3c], ecx
mov dword [edi + 0x7c], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x41da90
Capabilities:
Get common file path

Disassembly:
push ecx
push ebp
mov ebp, ecx
push esi
push edi
cmp dword [ebp], 0
jne 0x41db72
cmp dword [ebp + 4], 0xffffffff
jne 0x41db72
push ebx
lea ebx, [ebp + 0x140]
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov cl, byte [ecx + ebp + 0x13f]
cmp cl, 0x5c
je 0x41db02
cmp cl, 0x2f
je 0x41db02
mov edi, 0x42c0d8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
cmp edi, 1
pop ebx
jne 0x41db2e
push 1
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41db2e
pop edi
pop esi
mov eax, 0x2000000
pop ebp
pop ecx
ret 0xc
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xc]
push eax
push edi
push ecx
push esi
call fcn.0041c710
add esp, 0x10
test eax, eax
jne 0x41db51
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebp
pop ecx
ret 0xc
push eax
call fcn.0041cc30
add esp, 4
mov dword [ebp], eax
neg eax
sbb eax, eax
pop edi
and eax, 0xfffffe00
pop esi
add eax, 0x200
pop ebp
pop ecx
ret 0xc
pop edi
pop esi
mov eax, 0x1000000
pop ebp
pop ecx
ret 0xc
Function at 0x41e0d0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
test ebx, ebx
push ebp
je 0x41e0f8
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41e0f8
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, dword [esp + 0x218]
mov cl, byte [ebp]
test cl, cl
je 0x41e1d2
mov eax, ebp
mov edx, ebp
cmp cl, 0x2f
je 0x41e118
cmp cl, 0x5c
jne 0x41e11a
mov eax, edx
mov cl, byte [edx + 1]
inc edx
test cl, cl
jne 0x41e10e
push esi
cmp eax, ebp
push edi
je 0x41e15c
sub eax, ebp
mov esi, ebp
mov ecx, eax
lea edi, [esp + 0x114]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x114], 0
lea eax, [esp + 0x114]
push eax
push ebx
call fcn.0041e0d0
add esp, 8
test ebx, ebx
mov byte [esp + 0x10], 0
je 0x41e188
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
pop edi
cmp eax, 0xffffffff
pop esi
jne 0x41e1d2
lea ecx, [esp + 8]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop ebp
pop ebx
add esp, 0x208
ret
Function at 0x401059
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401070
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x4010a5
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x4010a1
cmp edi, eax
jae 0x4010a5
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x401093
cmp edi, eax
jb 0x4010a9
xor eax, eax
jmp 0x4010b3
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret

Function at 0x4010b6
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push edi
push 0x44
pop esi
push esi
xor edi, edi
lea eax, [ebp - 0x54]
push edi
push eax
call fcn.00401690
push 0x10
lea eax, [ebp - 0x10]
push edi
push eax
mov dword [ebp - 0x54], esi
call fcn.00401690
add esp, 0x18
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
push edi
lea esi, [ebp + 8]
call fcn.0040130d
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xc]
call esi
lea eax, [ebp + 8]
call fcn.0040139e
pop edi
pop esi
leave
ret

Function at 0x40111b
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x410bb4]
push ebx
push esi
push edi
mov ecx, 0x410bb4
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 4], eax
mov eax, 0x400
push eax
lea esi, [ebp - 4]
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], eax
call fcn.0040130d
push dword [ebp - 8]
xor edi, edi
push edi
push edi
call fcn.0040130d
push eax
call fcn.00401690
add esp, 0xc
lea eax, [ebp - 8]
push eax
push edi
call fcn.0040130d
mov edi, dword [sym.imp.SHLWAPI.dll_SHGetValueW]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x40db04
mov ebx, str.Software_baidu_baiduwp
push ebx
push 0x80000001
call edi
test eax, eax
je 0x4011ad
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
call fcn.0040130d
push eax
lea eax, [ebp - 0xc]
push eax
push 0x40db04
push ebx
push 0x80000002
call edi
mov esi, dword [ebp - 4]
test esi, esi
jne 0x4011b8
xor eax, eax
jmp 0x4011bf
push esi
call fcn.004017e0
pop ecx
lea edx, [ebp - 4]
call fcn.004013bb
cmp dword [esi - 0xc], 0
je 0x401211
push str.baiduwallpaper.exe
push 0x40db68
lea ecx, [ebp - 4]
call fcn.00401621
pop ecx
pop ecx
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401211
push str._autorun
push 0x40db84
lea ecx, [ebp - 4]
call fcn.00401621
pop ecx
lea eax, [ebp - 4]
mov ebx, esp
call fcn.004012a9
call fcn.004010b6
pop ecx
lea eax, [ebp - 4]
call fcn.0040139e
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40121e
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, eax
test edi, edi
je 0x4012a2
cmp dword [ebp - 4], 1
jne 0x4012a2
mov eax, dword [0x410bb4]
push esi
mov esi, dword [edi]
mov ecx, 0x410bb4
call dword [eax + 0xc]
add eax, 0x10
test esi, esi
mov dword [ebp + 0x10], eax
je 0x401271
test esi, 0xffff0000
jne 0x401271
movzx eax, si
push eax
lea eax, [ebp + 0x10]
push eax
call fcn.004013dc
jmp 0x40127a
push esi
lea eax, [ebp + 0x10]
call fcn.00401333
push 0x40db8c
push dword [ebp + 0x10]
call fcn.00401987
test eax, eax
pop ecx
pop ecx
pop esi
jne 0x40129a
call fcn.0040111b
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp + 0x10]
call fcn.0040139e
xor eax, eax
pop edi
leave
ret 0x10

Function at 0x401679
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40f008]
jne 0x401683
repz ret
jmp fcn.00401ef9
Function at 0x4051bf
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x40f7b8]
je 0x4051da
inc edi
cmp edi, 0x17
jb 0x4051cb
cmp edi, 0x17
jae 0x40535a
push ebp
push 3
call fcn.00409591
cmp eax, 1
pop ecx
je 0x405326
push 3
call fcn.00409591
test eax, eax
pop ecx
jne 0x40520e
cmp dword [0x40f004], 1
je 0x405326
cmp ebx, 0xfc
je 0x405359
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x410358
push ebp
call fcn.00407959
add esp, 0xc
test eax, eax
je 0x405244
push esi
push esi
push esi
push esi
push esi
call fcn.0040246f
add esp, 0x14
push 0x104
mov esi, 0x410371
push esi
push 0
mov byte [0x410475], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405288
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00407959
add esp, 0xc
test eax, eax
je 0x405288
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040246f
add esp, 0x14
push esi
call fcn.004079c0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4052cd
push esi
call fcn.004079c0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x41066c
push 0x40c85c
sub ecx, eax
push ecx
push eax
call fcn.004078a6
add esp, 0x14
test eax, eax
je 0x4052cd
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0040246f
add esp, 0x14
jmp 0x4052cf
xor esi, esi
push 0x40c858
push ebx
push ebp
call fcn.004077e3
add esp, 0xc
test eax, eax
je 0x4052ef
push esi
push esi
push esi
push esi
push esi
call fcn.0040246f
add esp, 0x14
push dword [edi*8 + 0x40f7bc]
push ebx
push ebp
call fcn.004077e3
add esp, 0xc
test eax, eax
je 0x405311
push esi
push esi
push esi
push esi
push esi
call fcn.0040246f
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004093d4
add esp, 0xc
jmp 0x405359
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x405359
cmp ebp, 0xffffffff
je 0x405359
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x40f7bc]
push dword [esi]
call fcn.004079c0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4093d4
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00403412
xor ebx, ebx
cmp dword [0x410a64], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4094aa
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40958a
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x40958a
push eax
call fcn.004033a4
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x410a64], eax
call esi
push eax
call fcn.004033a4
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x410a68], eax
call esi
push eax
call fcn.004033a4
mov dword [0x410a6c], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00404f4c
test eax, eax
pop ecx
pop ecx
je 0x409478
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040246f
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4094aa
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004033a4
cmp eax, ebx
pop ecx
mov dword [0x410a74], eax
je 0x4094aa
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004033a4
pop ecx
mov dword [0x410a70], eax
mov eax, dword [0x410a70]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x40952f
cmp dword [0x410a74], ecx
je 0x40952f
push eax
call fcn.0040341b
push dword [0x410a74]
mov esi, eax
call fcn.0040341b
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x40952f
cmp edi, ebx
je 0x40952f
call esi
cmp eax, ebx
je 0x4094fc
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4094fc
test byte [ebp - 0x18], 1
jne 0x40952f
lea eax, [ebp - 0x10]
push eax
call fcn.00404f83
test eax, eax
pop ecx
je 0x409517
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040246f
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x409526
or dword [ebp + 0x10], 0x200000
jmp 0x40956a
or dword [ebp + 0x10], 0x40000
jmp 0x40956a
mov eax, dword [0x410a68]
cmp eax, dword [ebp - 8]
je 0x40956a
push eax
call fcn.0040341b
cmp eax, ebx
pop ecx
je 0x40956a
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40956a
mov eax, dword [0x410a6c]
cmp eax, dword [ebp - 8]
je 0x40956a
push eax
call fcn.0040341b
cmp eax, ebx
pop ecx
je 0x40956a
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x410a64]
call fcn.0040341b
cmp eax, ebx
pop ecx
je 0x40958a
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40958c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b46d
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x40f008]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0040b3ac
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00401690
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x40b4bc
cmp dword [ebp - 0x1c], 5
jb 0x40b4d4
jmp 0x40b4d0
cmp dword [ebp - 0x10], 1
jne 0x40b4d4
cmp dword [ebp - 0x1c], 4
ja 0x40b4d0
jne 0x40b4d4
cmp dword [ebp - 0x18], 0
jbe 0x40b4d4
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x40dac8
call fcn.0040b242
test eax, eax
jge 0x40b4f5
mov byte [0x410bd4], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00401679
add ebp, 0x78
leave
ret

Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x407ef8
nop
nop
mov ecx, 0x6f1a380e
nop
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x42e04e
xor dword [eax], ecx
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x42e024
nop
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42cd70
mov ecx, 0x422c0e8b
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
je 0x42e084
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x42e06c
nop
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x40a40f
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
mov edi, dword [ebp + 0xc]
push edi
call fcn.0040a5e2
mov ebx, dword [ebp + 8]
pop ecx
mov ecx, eax
mov dword [ebp - 8], ecx
test ebx, ebx
je 0x40a518
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40a518
cmp ecx, dword [ebp + 0x14]
ja 0x40a518
push esi
xor esi, esi
mov edx, esi
test edi, edi
je 0x40a4eb
mov dword [ebp + 8], eax
cmp edx, edi
jae 0x40a45f
movzx ecx, byte [edx + ebx]
inc edx
jmp 0x40a461
mov ecx, esi
cmp edx, edi
jae 0x40a46f
movzx eax, byte [edx + ebx]
mov dword [ebp - 4], eax
inc edx
jmp 0x40a472
mov dword [ebp - 4], esi
cmp edx, edi
jae 0x40a47d
movzx eax, byte [edx + ebx]
inc edx
jmp 0x40a47f
mov eax, esi
mov edi, dword [ebp + 8]
shl ecx, 8
add ecx, dword [ebp - 4]
shl ecx, 8
add ecx, eax
mov eax, ecx
shr eax, 0x12
and eax, 0x3f
inc dword [ebp + 8]
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edi], al
mov edi, dword [ebp + 8]
mov eax, ecx
shr eax, 0xc
and eax, 0x3f
inc dword [ebp + 8]
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edi], al
mov edi, dword [ebp + 8]
mov eax, ecx
shr eax, 6
and eax, 0x3f
and ecx, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edi], al
mov cl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov eax, edi
mov edi, dword [ebp + 0xc]
mov byte [eax + 1], cl
add eax, 2
mov dword [ebp + 8], eax
cmp edx, edi
jb 0x40a458
mov ecx, dword [ebp - 8]
mov eax, edi
xor edx, edx
push 3
pop edi
div edi
lea edx, [edx*4 + 0x4afee4]
cmp dword [edx], esi
jle 0x40a50e
mov eax, dword [ebp + 0x10]
dec eax
add eax, ecx
mov byte [eax], 0x3d
inc esi
dec eax
cmp esi, dword [edx]
jl 0x40a505
mov eax, dword [ebp + 0x18]
pop esi
mov dword [eax], ecx
mov al, 1
jmp 0x40a51a
xor al, al
pop edi
pop ebx
leave
ret
Function at 0x40eda9
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40edc5
test al, 0x10
je 0x40edc5
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x40ee64
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push ebx
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40ee8f
xor eax, eax
jmp 0x40eea9
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x40ef9e
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
push esi
push esi
push 3
push esi
push esi
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40f007
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x40f000
cmp eax, dword [ebp + 0x10]
ja 0x40f000
push esi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40f007
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 4]
mov dword [ecx], eax
xor eax, eax
inc eax
jmp 0x40f009
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x40f2d2
Capabilities:
Write file on windows

Disassembly:
push 0
mov eax, 0x4a493d
call fcn.00483f50
mov eax, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
push dword [eax]
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40f350
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], ebx
mov esi, dword [eax - 0xc]
push ebx
lea ecx, [ebp + 0xc]
call fcn.00404c60
mov ecx, eax
push ebx
lea eax, [ebp + 8]
push eax
lea eax, [esi + esi]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 1
sete bl
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.00404d08
mov al, bl
call fcn.00483f1e
ret

Function at 0x40f552
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2010
call fcn.00484da0
mov eax, dword [0x4f1e38]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
xor ebx, ebx
push ebx
push 0x80
push 4
push ebx
push 2
push 0x40000000
push dword [eax]
mov dword [ebp - 0x200c], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x2008], esi
cmp esi, 0xffffffff
je 0x40f6ae
push edi
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call fcn.0040f457
test al, al
jne 0x40f5eb
push 0x28
call fcn.00482751
pop ecx
mov esi, eax
mov edi, ebx
call fcn.0048440b
add eax, dword [0x4f3280]
mov dword [esi + edi*4], eax
inc edi
cmp edi, 0xa
jl 0x40f5c2
mov eax, dword [esi + 0x24]
push esi
mov dword [0x4f3280], eax
call fcn.0048453a
mov esi, dword [ebp - 0x2008]
pop ecx
mov eax, dword [ebp - 0x200c]
push ebx
mov eax, dword [eax]
lea ecx, [ebp - 0x2010]
push ecx
mov dword [ebp - 0x2010], ebx
push dword [eax - 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f6a6
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
call fcn.0040f435
test al, al
jne 0x40f69d
xor eax, eax
push 0x1ffe
mov word [ebp - 0x2004], ax
lea eax, [ebp - 0x2002]
push ebx
push eax
call fcn.004845c0
mov eax, ebx
add esp, 0xc
mov dword [ebp - 0x2008], eax
mov edi, ebx
mov edx, ebx
test eax, eax
je 0x40f67c
test edx, edx
je 0x40f67c
lea eax, [edi + edx]
lea ecx, [edi + edx]
mov ax, word [ebp + eax*2 - 0x2084]
inc ax
add ax, word [ebp + ecx*2 - 0x2006]
mov word [ebp + ecx*2 - 0x2004], ax
mov eax, dword [ebp - 0x2008]
inc edx
cmp edx, 0x40
jl 0x40f64e
inc eax
add edi, 0x40
mov dword [ebp - 0x2008], eax
cmp edi, 0x1000
jl 0x40f64c
movsx eax, word [ebp - 6]
mov dword [0x4f3280], eax
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov ecx, dword [ebp - 4]
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00483eb4
leave
ret