joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401617
Capabilities:
Create directory
Query environment variable
Set current directory

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
cmp ebx, 0x14
push ebp
mov ebp, dword [esp + 0x10]
jl 0x40162d
xor eax, eax
jmp 0x401758
cmp ebx, 6
push esi
push edi
mov byte [ebp], 0
jge 0x401667
mov eax, dword [0x403014]
xor ecx, ecx
cmp eax, ecx
mov edi, 0x40112c
je 0x401656
push ebp
push ecx
push ecx
push 0x26
push ecx
call eax
cmp byte [ebp], 0
jne 0x401663
push 0x800
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0xf
jmp 0x401699
cmp ebx, 0xd
jge 0x4016af
mov eax, dword [0x403014]
xor ecx, ecx
cmp eax, ecx
mov edi, 0x401118
je 0x40168a
push ebp
push ecx
push ecx
push 0x1a
push ecx
call eax
cmp byte [ebp], 0
jne 0x401697
push 0x800
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0xe
mov esi, ebp
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4016bc
push 0x401128
push ebp
call fcn.00402520
jmp 0x4016ba
push 0x401128
push ebp
call fcn.00402530
pop ecx
pop ecx
mov esi, 0x401114
push esi
push ebp
call fcn.00402530
push dword [esp + 0x1c]
push ebp
call fcn.00402530
add esp, 0x10
mov eax, ebx
push 6
cdq
pop ecx
idiv ecx
test edx, edx
je 0x40171b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
add ebx, dword [esp + 0x1c]
push esi
push ebp
call fcn.00402530
pop ecx
mov eax, ebp
pop ecx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4016fb
sub eax, esi
lea ecx, [eax + ebp]
jmp 0x401715
mov al, bl
and al, 7
add al, 0x30
shr ebx, 4
mov byte [ecx], al
inc ecx
test ebx, ebx
jne 0x401709
mov byte [ecx], bl
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebp
call esi
test eax, eax
jne 0x40174f
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40173e
pop edi
pop esi
pop ebp
pop ebx
jmp dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
call esi
test eax, eax
jne 0x40174f
pop edi
pop esi
pop ebp
pop ebx
jmp dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
call fcn.004015af
pop ecx
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x401784
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, eax
mov eax, dword [esi]
push edi
mov edi, dword [ebp + 8]
mov cl, byte [edi]
mov dword [ebp - 4], eax
xor ebx, ebx
add esi, 4
xor eax, eax
cmp cl, bl
je 0x4017b6
mov edx, 0x403020
sub edx, edi
mov byte [edx + edi], cl
inc eax
inc edi
mov cl, byte [edi]
cmp cl, bl
jne 0x4017ab
mov edi, dword [ebp - 4]
mov byte [eax + 0x403020], 0x5c
inc eax
cmp edi, ebx
je 0x4017d2
mov cl, byte [esi]
mov byte [eax + 0x403020], cl
inc eax
inc esi
dec edi
jne 0x4017c5
mov byte [eax + 0x403020], bl
mov edi, dword [esi]
mov eax, dword [0x403018]
add esi, 4
cmp eax, ebx
mov dword [ebp - 0xc], edi
jne 0x40188a
push ebx
push 0x8000080
push 2
push ebx
push ebx
push 0xc0000000
push 0x403020
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x401852
push ebx
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push edi
push ebx
push 4
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x401852
push edi
push ebx
push ebx
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x401861
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 8]
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
xor eax, eax
jmp 0x40189d
push edi
push esi
push eax
call fcn.00402620
add esp, 0xc
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp + 8]
call edi
mov edi, dword [ebp - 0xc]
jmp 0x40189a
cmp eax, 1
jne 0x40189a
push 0x403020
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [edi + esi]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401a36
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push edi
call fcn.0040175b
mov ebx, eax
push 0x104
lea eax, [ebp - 0x110]
push eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push edi
push edi
push 3
push edi
push 1
push 0x80000000
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
jne 0x401a89
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401b13
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp ebx, esi
jne 0x401a9d
push 2
pop esi
jmp 0x401b07
push edi
push edi
push edi
push 2
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x401abd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x401af9
push edi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [ebp - 0xc], eax
jne 0x401ad8
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401ae9
sub esi, ebx
push esi
add eax, ebx
push eax
push dword [ebp + 8]
call fcn.004018a2
add esp, 0xc
cmp dword [ebp - 0xc], edi
mov esi, eax
je 0x401af9
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 4], edi
je 0x401b07
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
pop ebx
leave
ret
Function at 0x401ddc
Capabilities:
Accept command line arguments
Delete directory
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10898
call fcn.00402a70
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x94], 4
jae 0x401e38
push 0x800
lea eax, [ebp - 0x898]
push eax
push 1
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x10
push 0
lea eax, [ebp - 0x898]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x401f6f
push ebx
push esi
push edi
push 0x4010ec
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0x4010d8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x403014], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
cmp byte [eax], 0x22
mov edi, dword [sym.imp.USER32.dll_CharNextA]
sete bl
push eax
lea ebx, [ebx + ebx + 0x20]
jmp 0x401e75
cmp al, bl
je 0x401e7f
push esi
call edi
mov esi, eax
mov al, byte [esi]
test al, al
jne 0x401e70
cmp byte [esi], 0x22
jne 0x401e85
inc esi
cmp byte [esi], 0
je 0x401e8b
inc esi
push 0x12
push esi
push 0x4010c4
call fcn.00402a30
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
add esp, 0xc
test eax, eax
je 0x401eb9
push 0xc
push esi
push 0x4010b4
call fcn.00402a30
add esp, 0xc
test eax, eax
jne 0x401ec8
push 0x40
xor esi, esi
push esi
push 0x4010a4
push esi
call edi
jmp 0x401eca
xor esi, esi
lea eax, [ebp - 0x10898]
push eax
mov eax, dword [ebp + 8]
call fcn.00401a36
cmp eax, esi
pop ecx
jne 0x401ef4
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10898]
push eax
call fcn.00401b17
cmp eax, esi
pop ecx
pop ecx
je 0x401f22
push esi
push 0x800
lea ecx, [ebp - 0x898]
push ecx
push esi
push eax
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
je 0x401f3c
push 0x10
push esi
lea eax, [ebp - 0x898]
push eax
push esi
call edi
jmp 0x401f3c
lea eax, [ebp - 0x10898]
push eax
mov eax, dword [ebp + 8]
mov dword [0x403018], 1
call fcn.00401a36
pop ecx
mov eax, dword [0x403004]
cmp eax, 0xffffffff
pop edi
pop esi
pop ebx
je 0x401f57
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x403004], 0xffffffff
push 0x4010a0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x10898]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
or eax, 0xffffffff
leave
ret 4
Function at 0x403e80
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov ebx, ecx
push edi
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea edi, [eax + 1]
test edi, edi
js 0x403efd
mov esi, dword [ebp + 8]
mov ecx, 1
mov edx, dword [esi]
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, edi
or ecx, eax
jge 0x403eb7
push edi
mov ecx, esi
call fcn.00403e20
mov edx, dword [esi]
push edi
push edx
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov edi, eax
mov ecx, edi
cmp edi, 0xffffffff
jne 0x403ede
mov ecx, dword [esi]
test ecx, ecx
je 0x403ee2
push dword [ecx - 8]
push ecx
call fcn.0057f200
add esp, 8
mov ecx, eax
test ecx, ecx
js 0x403efd
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x403efd
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 4
push 0x80070057
call fcn.00403f80
int3
Function at 0x40a280
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
cmp dword [ecx + 0x38], 0
push ebx
push esi
push edi
mov dword [esp + 0xc], ecx
je 0x40a368
mov esi, dword [ebp + 0x10]
mov ebx, esi
mov edx, dword [ebp + 0xc]
mov edi, edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
test esi, esi
jl 0x40a357
jg 0x40a2c0
test edx, edx
je 0x40a357
nop dword [eax]
call fcn.0040cfd0
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x40a314
jg 0x40a2d7
test esi, esi
je 0x40a314
cmp ebx, eax
jg 0x40a2e7
jl 0x40a2e1
cmp edi, esi
jae 0x40a2e7
mov esi, edi
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
push esi
push eax
mov eax, dword [ecx + 0x20]
push dword [eax]
call fcn.00576510
mov ecx, dword [esp + 0x18]
add esp, 0xc
sub edi, esi
sbb ebx, dword [esp + 0x14]
mov eax, dword [ecx + 0x30]
sub dword [eax], esi
mov eax, dword [ecx + 0x20]
add dword [eax], esi
jmp 0x40a33b
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x10]
movzx eax, byte [eax]
push eax
call edx
cmp eax, 0xffffffff
je 0x40a351
mov ecx, dword [esp + 0xc]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
add dword [esp + 0x10], esi
test ebx, ebx
jg 0x40a2c0
jl 0x40a351
test edi, edi
jne 0x40a2c0
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
sub edx, edi
mov eax, edx
sbb esi, ebx
mov edx, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ecx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], eax
test eax, eax
je 0x40a38a
mov eax, dword [ecx + 0x30]
mov eax, dword [eax]
jmp 0x40a38c
xor eax, eax
cdq
mov ebx, eax
mov eax, edx
mov dword [esp + 0x14], eax
test edi, edi
jl 0x40a40a
jg 0x40a39f
test esi, esi
je 0x40a40a
test eax, eax
jl 0x40a3e4
jg 0x40a3a9
test ebx, ebx
je 0x40a3e4
cmp edi, eax
jg 0x40a3b9
jl 0x40a3b3
cmp esi, ebx
jae 0x40a3b9
mov ebx, esi
mov dword [esp + 0x14], edi
push ebx
push dword [ebp + 8]
push dword [esp + 0x18]
call fcn.00576510
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
add edx, ebx
sub esi, ebx
mov eax, dword [ecx + 0x30]
sbb edi, dword [esp + 0x14]
sub dword [eax], ebx
mov eax, dword [ecx + 0x20]
add dword [eax], ebx
jmp 0x40a3e7
mov edx, dword [ebp + 8]
test edi, edi
jl 0x40a40a
jg 0x40a3f1
test esi, esi
je 0x40a40a
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x40a40a
push eax
push esi
push 1
push edx
call fcn.00583702
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40a420
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
cmp dword [ecx + 0x38], 0
push ebx
push esi
push edi
mov dword [esp + 0xc], ecx
je 0x40a50b
mov esi, dword [ebp + 0x10]
mov ebx, esi
mov edx, dword [ebp + 0xc]
mov edi, edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
test esi, esi
jl 0x40a4fa
jg 0x40a460
test edx, edx
je 0x40a4fa
nop dword [eax]
call fcn.0040cff0
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x40a4b7
jg 0x40a477
test esi, esi
je 0x40a4b7
cmp ebx, eax
jg 0x40a487
jl 0x40a481
cmp edi, esi
jae 0x40a487
mov esi, edi
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0xc]
push esi
mov eax, dword [eax + 0x1c]
push dword [eax]
push dword [esp + 0x18]
call fcn.00576510
mov ecx, dword [esp + 0x18]
add esp, 0xc
sub edi, esi
sbb ebx, dword [esp + 0x14]
mov eax, dword [ecx + 0x2c]
sub dword [eax], esi
mov eax, dword [ecx + 0x1c]
add dword [eax], esi
mov eax, dword [esp + 0x10]
jmp 0x40a4dc
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40a4f4
mov eax, dword [esp + 0x10]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
mov byte [eax], cl
mov ecx, dword [esp + 0xc]
add eax, esi
mov dword [esp + 0x10], eax
test ebx, ebx
jg 0x40a460
jl 0x40a4f4
test edi, edi
jne 0x40a460
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
sub edx, edi
mov eax, edx
sbb esi, ebx
mov edx, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ecx + 0x1c]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], eax
test eax, eax
je 0x40a52d
mov eax, dword [ecx + 0x2c]
mov eax, dword [eax]
jmp 0x40a52f
xor eax, eax
cdq
mov ebx, eax
mov eax, edx
mov dword [esp + 0x14], eax
test edi, edi
jl 0x40a5e5
jg 0x40a54a
test esi, esi
je 0x40a5e5
test eax, eax
jl 0x40a593
jg 0x40a554
test ebx, ebx
je 0x40a593
cmp edi, eax
jg 0x40a564
jl 0x40a55e
cmp esi, ebx
jae 0x40a564
mov ebx, esi
mov dword [esp + 0x14], edi
push ebx
push dword [esp + 0x14]
push dword [ebp + 8]
call fcn.00576510
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
add edx, ebx
sub esi, ebx
mov dword [esp + 0x10], edx
mov eax, dword [ecx + 0x2c]
sbb edi, dword [esp + 0x14]
sub dword [eax], ebx
mov eax, dword [ecx + 0x1c]
add dword [eax], ebx
jmp 0x40a59a
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
test edi, edi
jl 0x40a5e5
jg 0x40a5a4
test esi, esi
je 0x40a5e5
mov edx, dword [ecx + 0x4c]
test edx, edx
je 0x40a5e5
mov ebx, dword [ecx + 0xc]
lea eax, [ecx + 0x3c]
cmp dword [ebx], eax
jne 0x40a5d0
mov edx, dword [ecx + 0x54]
mov ecx, dword [ecx + 0x50]
sub edx, ecx
mov dword [ebx], ecx
mov ebx, dword [esp + 0xc]
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov edx, dword [ebx + 0x4c]
push edx
push esi
push 1
push dword [esp + 0x1c]
call fcn.00584b03
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40a940
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x65d0c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40a970
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40a9ac
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40a9ac
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x40aa93
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40a9d4
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x40aa07
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.0057f695
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4
mov byte [ebp - 0x28], bl
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call edx
test eax, eax
js 0x40aa93
cmp eax, 1
jle 0x40aa66
cmp eax, 3
jne 0x40aa93
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.00405220
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40aa83
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00583702
add esp, 0x10
cmp edi, eax
jne 0x40aa93
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x40a997
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4
Function at 0x40cc60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x65d0c8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x38], 0
je 0x40cd03
cmp byte [esi + 0x3d], 0
je 0x40cd03
mov eax, dword [esi]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40ccb9
mov ecx, dword [esi + 0x38]
mov eax, dword [ecx]
mov edx, dword [eax + 0x20]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call edx
sub eax, 0
je 0x40cccb
sub eax, 1
je 0x40cccf
sub eax, 2
je 0x40cd03
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40ccec
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00583702
add esp, 0x10
cmp edi, eax
jne 0x40ccb9
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
xor ecx, ebp
pop esi
call fcn.0057380b
mov esp, ebp
pop ebp
ret

Function at 0x40de70
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a5360
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x65d0c8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.00573d8c
mov esi, eax
xorps xmm0, xmm0
movq qword [esi], xmm0
push 1
mov dword [ebp - 4], 0
call fcn.00571571
mov dword [esi + 4], eax
lea ecx, [edi + 8]
lea eax, [edi + 4]
mov dword [edi + 0x34], esi
mov dword [edi + 0xc], eax
add esp, 8
lea eax, [edi + 0x14]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x1c], eax
lea eax, [edi + 0x18]
mov dword [edi + 0x20], eax
lea eax, [edi + 0x24]
mov dword [edi + 0x2c], eax
lea eax, [edi + 0x28]
mov dword [edi + 0x30], eax
mov dword [ecx], 0
mov eax, dword [edi + 0x20]
mov dword [eax], 0
mov eax, dword [edi + 0x30]
mov dword [eax], 0
mov eax, dword [edi + 0xc]
mov dword [eax], 0
mov eax, dword [edi + 0x1c]
mov dword [eax], 0
mov eax, dword [edi + 0x2c]
mov dword [eax], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x412030
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x412089
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x412089
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x412078
cmp esi, edx
jae 0x412089
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x412066
cmp esi, edx
jae 0x412089
cmp word [esi], 0
je 0x412089
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x41e940
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x65d0c8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, 0xffff
mov esi, ecx
cmp ax, di
jne 0x41e975
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push ebx
mov ecx, dword [eax]
test ecx, ecx
je 0x41e9b3
mov edx, dword [esi + 0x30]
mov ebx, dword [edx]
lea eax, [ecx + ebx*2]
cmp ecx, eax
jae 0x41e9b3
lea ecx, [ebx - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 2]
mov dword [edx], ecx
mov word [esi], di
pop ebx
mov ax, di
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x41ea91
mov ebx, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [ebx], eax
jne 0x41e9dd
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [ebx], ecx
mov eax, dword [esi + 0x1c]
sar edx, 1
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x41ea16
push dword [esi + 0x4c]
push edi
call fcn.00585a32
mov ecx, 0xffff
add esp, 8
cmp ax, cx
movzx eax, di
jne 0x41ea96
pop ebx
pop edi
mov eax, ecx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4
movzx eax, di
mov dword [ebp - 0x28], eax
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x26]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call edx
test eax, eax
js 0x41ea91
cmp eax, 1
jle 0x41ea64
cmp eax, 3
jne 0x41ea91
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.00424020
add esp, 8
test al, al
movzx eax, di
jne 0x41ea96
jmp 0x41ea91
mov ebx, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub ebx, eax
je 0x41ea81
push dword [esi + 0x4c]
push ebx
push 1
push eax
call fcn.00583702
add esp, 0x10
cmp ebx, eax
jne 0x41ea91
lea eax, [ebp - 0x28]
mov byte [esi + 0x3e], 1
cmp dword [ebp - 0x30], eax
jne 0x41e99d
mov eax, 0xffff
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0057380b
mov esp, ebp
pop ebp
ret 4