joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4646b0
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [0x4a2c0c]
cmp dword [eax + 0x30], 0
je 0x46475a
cmp dword [ebx + 0x94], 0
jne 0x464754
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x464640
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x90]
cmp dword [eax + 8], 0
je 0x464754
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongA
test al, 8
je 0x46471a
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x90]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x464754
push 0x213
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x90]
call fcn.0041a92c
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x464729
inc dword [ebx + 0x94]
pop ecx
pop edx
pop esi
pop ebx
ret

Function at 0x4652bc
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xffffff00
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0xa4], 0
je 0x4652f1
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x30]
push eax
call sub.user32.dll_GetWindowTextA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.00404228
jmp 0x4652fe
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.0040418c
add esp, 0x100
pop esi
pop ebx
ret

Function at 0x466408
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x84]
test esi, esi
je 0x466449
mov eax, esi
call fcn.0044c48c
test al, al
je 0x466449
mov eax, dword [ebx + 0x84]
call fcn.0044c188
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x466449
push 0
mov eax, dword [ebx + 0x84]
call fcn.0044c188
push eax
call sub.user32.dll_ShowWindow
pop esi
pop ebx
ret
Function at 0x467108
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
lea eax, [ebp - 0x10]
mov edx, dword [0x4179e8]
call fcn.00404ad0
xor eax, eax
push ebp
push 0x46724c
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x49ff74], 0
jne 0x46715b
mov ecx, dword [0x4a16e0]
mov dl, 1
mov eax, dword [0x40753c]
call fcn.0040bdf4
call fcn.00403b74
lea eax, [ebp - 0x20]
xor ecx, ecx
mov edx, 0x10
call fcn.00402da4
mov eax, ebx
call fcn.004049a0
mov dword [ebp - 0x1c], eax
push esi
push edi
mov esi, 0x46725c
lea edi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
lea eax, [ebp - 0x30]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
call fcn.00405b68
xor eax, eax
mov dword [ebp - 8], eax
mov eax, ebx
call fcn.004049b0
test eax, eax
jle 0x4671f3
mov dword [ebp - 4], 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x40]
push eax
call sub.kernel32.dll_GetComputerNameA
test eax, eax
je 0x4671ec
lea eax, [ebp - 0x44]
mov edx, ebx
call fcn.004043c0
mov eax, dword [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x40]
mov ecx, 0x10
call fcn.004043a8
mov eax, dword [ebp - 0x48]
pop edx
call fcn.0040846c
test eax, eax
jne 0x4671ec
mov ebx, 0x15
jmp 0x4671f8
mov ebx, 0x10
jmp 0x4671f8
mov ebx, 0x15
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 0x20]
push eax
push ebx
push 0
push esi
call dword [0x49ff74]
call fcn.00467060
mov eax, dword [ebp - 8]
call fcn.00467060
mov eax, edi
mov edx, dword [ebp - 0xc]
call fcn.00405b80
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x467253
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.0040415c
lea eax, [ebp - 0x10]
mov edx, dword [0x4179e8]
call fcn.00404ba0
ret

Function at 0x4705fc
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp - 4]
mov edx, dword [ebp - 8]
dec edx
test edx, edx
jl 0x4706a9
inc edx
mov dword [ebp - 0x10], edx
mov edx, dword [eax]
and edx, 0xffff
or edx, 2
mov dword [ebp - 0xc], edx
mov dl, byte [esi]
mov ebx, dword [ebp - 0xc]
xor ebx, 1
imul ebx, dword [ebp - 0xc]
shr ebx, 8
xor dl, bl
mov byte [esi], dl
mov edx, dword [ecx]
mov bl, byte [esi]
xor dl, bl
and edx, 0xff
mov edx, dword [edx*4 + 0x4a034c]
mov ebx, dword [ecx]
shr ebx, 8
and ebx, 0xffffff
xor edx, ebx
mov dword [ecx], edx
mov edx, dword [ecx]
and edx, 0xff
add dword [edi], edx
mov edx, dword [edi]
imul edx, dword [ebp + 8]
inc edx
mov dword [edi], edx
mov edx, dword [eax]
mov ebx, dword [edi]
shr ebx, 0x18
xor dl, bl
and edx, 0xff
mov edx, dword [edx*4 + 0x4a034c]
mov ebx, dword [eax]
shr ebx, 8
and ebx, 0xffffff
xor edx, ebx
mov dword [eax], edx
inc esi
dec dword [ebp - 0x10]
jne 0x470624
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x471fdc
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
mov ebx, eax
lea eax, [ebp - 0x104]
push eax
push 0x104
call sub.kernel32.dll_GetTempPathA
mov edx, ebx
lea eax, [ebp - 0x104]
call fcn.00408edc
mov eax, dword [ebx]
call fcn.004043f8
mov edx, dword [ebx]
cmp byte [edx + eax - 1], 0x5c
je 0x472022
mov eax, ebx
mov edx, 0x472030
call fcn.00404400
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x47c48c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
mov ebx, eax
push 0x104
lea eax, [ebp - 0x104]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov edx, ebx
lea eax, [ebp - 0x104]
call fcn.0047c454
mov eax, dword [ebx]
call fcn.004043f8
mov edx, dword [ebx]
cmp byte [edx + eax - 1], 0x5c
je 0x47c4d2
mov eax, ebx
mov edx, 0x47c4e0
call fcn.00404400
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x47c4e4
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
mov ebx, eax
push 0x104
lea eax, [ebp - 0x104]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
mov edx, ebx
lea eax, [ebp - 0x104]
call fcn.0047c454
mov eax, dword [ebx]
call fcn.004043f8
mov edx, dword [ebx]
cmp byte [edx + eax - 1], 0x5c
je 0x47c52a
mov eax, ebx
mov edx, 0x47c538
call fcn.00404400
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x47d50c
Capabilities:
Check os version

Disassembly:
add esp, 0xffffff6c
mov eax, esp
mov edx, 0x94
call fcn.00406f28
mov dword [esp], 0x94
push esp
call sub.kernel32.dll_GetVersionExA
cmp dword [esp + 4], 5
jb 0x47d540
cmp dword [esp + 8], 1
jb 0x47d540
cmp dword [esp + 0x10], 2
je 0x47d544
xor eax, eax
jmp 0x47d546
mov al, 1
add esp, 0x94
ret

Function at 0x47d550
Capabilities:
Check os version

Disassembly:
add esp, 0xffffff6c
mov eax, esp
mov edx, 0x94
call fcn.00406f28
mov dword [esp], 0x94
push esp
call sub.kernel32.dll_GetVersionExA
cmp dword [esp + 4], 6
jne 0x47d584
cmp dword [esp + 8], 0
jne 0x47d584
cmp dword [esp + 0x10], 2
je 0x47d588
xor eax, eax
jmp 0x47d58a
mov al, 1
add esp, 0x94
ret
Function at 0x488fa4
Capabilities:
Check for software breakpoints

Disassembly:
push ebx
mov ebx, eax
cmp dword [ebx + 0x14], 0xca
jne 0x488fd2
mov eax, ebx
call fcn.00489a58
cmp dword [ebx + 0x40], 0
je 0x488fcb
mov dword [ebx + 0x14], 0xcf
mov eax, 1
pop ebx
ret
mov dword [ebx + 0x14], 0xcb
cmp dword [ebx + 0x14], 0xcb
jne 0x489043
mov edx, dword [ebx + 0x1b4]
cmp dword [edx + 0x10], 0
je 0x489035
cmp dword [ebx + 8], 0
je 0x488ff4
mov eax, ebx
mov edx, dword [eax + 8]
call dword [edx]
mov eax, ebx
mov edx, dword [eax + 0x1b4]
call dword [edx]
test eax, eax
jne 0x489006
xor eax, eax
pop ebx
ret
cmp eax, 2
je 0x489035
cmp dword [ebx + 8], 0
je 0x488fe7
cmp eax, 3
je 0x489019
dec eax
jne 0x488fe7
mov edx, dword [ebx + 8]
inc dword [edx + 4]
mov ecx, dword [edx + 4]
mov eax, dword [ebx + 8]
cmp ecx, dword [eax + 8]
jl 0x488fe7
mov edx, dword [ebx + 0x140]
add dword [eax + 8], edx
jmp 0x488fe7
mov ecx, dword [ebx + 0x90]
mov dword [ebx + 0x98], ecx
jmp 0x489061
cmp dword [ebx + 0x14], 0xcc
je 0x489061
mov eax, dword [ebx]
mov dword [eax + 0x14], 0x14
mov edx, dword [ebx + 0x14]
mov dword [eax + 0x18], edx
mov eax, ebx
mov edx, dword [eax]
call dword [edx]
mov eax, ebx
call fcn.0048906c
pop ebx
ret
Function at 0x507ce7a0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [esp + 8]
cmp eax, 1
jne 0x507ce8ac
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov ecx, dword [0x507d5118]
mov dword [0x507d5120], eax
test ecx, ecx
jne 0x507ce800
cmp al, 3
jne 0x507ce7d7
test eax, 0x80000000
je 0x507ce7d7
push 2
call fcn.507cf830
add esp, 4
push 0x507cae3c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x507ce800
push 0x507cae34
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x507ce800
push 1
call fcn.507cf830
add esp, 4
call fcn.507cf7b0
test eax, eax
jne 0x507ce80c
ret 0xc
mov ecx, dword [0x507d5120]
xor edx, edx
mov eax, ecx
mov dl, ch
and eax, 0xff
mov dword [0x507d512c], edx
mov dword [0x507d5128], eax
shl eax, 8
add eax, edx
shr ecx, 0x10
mov dword [0x507d5124], eax
mov dword [0x507d5120], ecx
call fcn.507ceb60
test eax, eax
jne 0x507ce84e
call fcn.507cf7f0
xor eax, eax
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x507d69f0], eax
call fcn.507cf650
mov ecx, dword [0x507d69f0]
mov dword [0x507d510c], eax
test ecx, ecx
je 0x507ce89d
test eax, eax
je 0x507ce89d
call fcn.507ced30
call fcn.507cf640
call fcn.507cf090
call fcn.507cefa0
call fcn.507cea00
mov eax, dword [0x507d5108]
inc eax
mov dword [0x507d5108], eax
mov eax, 1
ret 0xc
call fcn.507cebc0
call fcn.507cf7f0
xor eax, eax
ret 0xc
test eax, eax
jne 0x507ce8ec
mov eax, dword [0x507d5108]
test eax, eax
jle 0x507ce8e7
mov ecx, eax
mov eax, dword [0x507d5158]
dec ecx
test eax, eax
mov dword [0x507d5108], ecx
jne 0x507ce8d0
call fcn.507cea50
call fcn.507cef40
call fcn.507cebc0
call fcn.507cf7f0
mov eax, 1
ret 0xc
xor eax, eax
ret 0xc
cmp eax, 3
jne 0x507ce8fb
push 0
call fcn.507cec90
add esp, 4
mov eax, 1
ret 0xc

Function at 0x507cea60
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.507ceb20
mov eax, dword [0x507d515c]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x507cea84
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x507d5158], 1
mov byte [0x507d5154], bl
jne 0x507ceade
mov ecx, dword [0x507d69e8]
test ecx, ecx
je 0x507ceacc
mov esi, dword [0x507d69e4]
sub esi, 4
cmp esi, ecx
jb 0x507ceacc
mov eax, dword [esi]
test eax, eax
je 0x507ceac5
call eax
mov ecx, dword [0x507d69e8]
sub esi, 4
cmp esi, ecx
jae 0x507ceab7
push 0x507d201c
push 0x507d2014
call fcn.507ceb40
add esp, 8
push 0x507d2024
push 0x507d2020
call fcn.507ceb40
add esp, 8
test ebx, ebx
je 0x507ceafd
call fcn.507ceb30
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x507d515c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x507ceb60
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.507cfa60
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x507d29cc], eax
je 0x507cebb8
push 0x74
push 1
call fcn.507cfc90
mov esi, eax
add esp, 8
test esi, esi
je 0x507cebb8
mov eax, dword [0x507d29cc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x507cebb8
push esi
call fcn.507cebf0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x507cec10
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x507d29cc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x507cec7e
push 0x74
push 1
call fcn.507cfc90
mov esi, eax
add esp, 8
test esi, esi
je 0x507cec74
mov ecx, dword [0x507d29cc]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x507cec74
push esi
call fcn.507cebf0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.507ce9c0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

Function at 0x507cec90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov eax, dword [0x507d29cc]
cmp eax, 0xffffffff
je 0x507ced2c
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x507cecb4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x507ced1d
mov eax, dword [esi + 0x24]
test eax, eax
je 0x507cecc4
push eax
call fcn.507cfd40
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x507cecd4
push eax
call fcn.507cfd40
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x507cece4
push eax
call fcn.507cfd40
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x507cecf4
push eax
call fcn.507cfd40
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x507ced04
push eax
call fcn.507cfd40
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x507ced14
push eax
call fcn.507cfd40
add esp, 4
push esi
call fcn.507cfd40
add esp, 4
mov eax, dword [0x507d29cc]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x507cf650
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x507d538c]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x507cf692
call edi
mov esi, eax
test esi, esi
je 0x507cf67c
mov eax, 1
jmp 0x507cf68d
call ebp
mov ebx, eax
test ebx, ebx
je 0x507cf79f
mov eax, 2
mov dword [0x507d538c], eax
cmp eax, 1
jne 0x507cf732
test esi, esi
jne 0x507cf6ab
call edi
mov esi, eax
test esi, esi
je 0x507cf79f
cmp word [esi], 0
mov eax, esi
je 0x507cf6c5
add eax, 2
cmp word [eax], 0
jne 0x507cf6b3
add eax, 2
cmp word [eax], 0
jne 0x507cf6b3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x507cf724
push edi
call fcn.507cfdb0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x507cf724
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x507cf716
push ebx
call fcn.507cfd40
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x507cf79f
test ebx, ebx
jne 0x507cf743
call ebp
mov ebx, eax
test ebx, ebx
je 0x507cf79f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x507cf75b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x507cf74b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x507cf74b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.507cfdb0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x507cf77d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x507cf880
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x507d2af8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x507cf8a4
add eax, 8
inc ebp
cmp eax, 0x507d2b88
jb 0x507cf895
cmp ecx, dword [ebp*8 + 0x507d2af8]
jne 0x507cfa4b
mov eax, dword [0x507d5114]
cmp eax, 1
je 0x507cfa0d
test eax, eax
jne 0x507cf8d0
cmp dword [0x507d5118], 1
je 0x507cfa0d
cmp ecx, 0xfc
je 0x507cfa4b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x507cf90b
mov ecx, 5
mov esi, 0x507cb124
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x507cf954
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x507cb120
add ebx, ecx
push ebx
call fcn.507d0630
add esp, 0xc
mov ecx, 6
mov esi, 0x507cb104
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
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 edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x507cb100
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x507cb0d8
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 edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x507d2afc]
or ecx, 0xffffffff
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 + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.507d05a0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x507d68e0]
test eax, eax
je 0x507cfa1e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x507cfa28
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x507d2afc]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x507d0c20
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x507d0c4c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x507d68e0]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x507d0c87
push 2
push ebp
push ecx
call fcn.507d11a0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x507d0de9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x507d0d31
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x507d0ce2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x507d0ccf
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x507d0cb2
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x507d0dda
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x507d0d2d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x507d0cae
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x507d0dc9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x507d0d85
cmp eax, 5
jne 0x507d0d6e
call fcn.507d1180
mov dword [eax], 9
call fcn.507d1190
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.507d1100
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x507d0da5
cmp byte [ebp], 0x1a
jne 0x507d0da5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.507d1180
mov dword [eax], 0x1c
call fcn.507d1190
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x507d0d2d
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x507d0e1a
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x507d0d31
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x507d0d31