joyce8/EMBER2024-capa huggingface dataset:
Function at 0x419e30
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x50a228
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [0x50a220]
sub esp, 4
test ebx, ebx
je 0x419e7b
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
sub esp, 4
mov esi, eax
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x419e74
test esi, esi
je 0x419e74
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x419e50
mov dword [esp], 0x50a228
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x41a060
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
lea esi, [esp + 0x24]
lea ebx, [eax + 0x40]
mov dword [esp + 4], 1
mov dword [esp + 0xc], ebx
mov dword [esp], str.Mingw_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x41a0b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, edx
push esi
mov esi, ecx
push ebx
mov ebx, eax
sub esp, 0x3c
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x41a184
mov eax, dword [esp + 0x28]
cmp eax, 0x40
je 0x41a0ee
cmp eax, 4
jne 0x41a110
test esi, esi
je 0x41a102
xor eax, eax
movzx ecx, byte [edi + eax]
mov byte [ebx + eax], cl
add eax, 1
cmp eax, esi
jb 0x41a0f4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x20]
lea ebp, [esp + 0x10]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
mov ecx, dword [esp + 0x28]
test esi, esi
je 0x41a14f
xor edx, edx
movzx eax, byte [edi + edx]
mov byte [ebx + edx], al
add edx, 1
cmp edx, esi
jb 0x41a141
cmp ecx, 0x40
je 0x41a102
cmp ecx, 4
je 0x41a102
mov eax, dword [esp + 0x10]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.0041a060
lea esi, [esi]
Function at 0x4259f0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
push ebx
sub esp, 0x3c
mov dword [esp + 4], 0
mov dword [esp], 2
call sub.msvcrt.dll_setlocale
test eax, eax
je 0x425ac4
mov dword [esp], eax
mov esi, eax
mov ebx, esp
call sub.msvcrt.dll_strlen
lea edx, [eax + 1]
add eax, 0x10
shr eax, 4
shl eax, 4
call fcn.00426140
sub esp, eax
lea eax, [esp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov dword [esp + 4], 0x4c72f0
mov dword [esp], 2
mov esi, eax
call sub.msvcrt.dll_setlocale
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x425ad0
mov dword [esp + 4], esi
mov dword [esp], 2
call sub.msvcrt.dll_setlocale
mov eax, esi
mov dword [esp + 4], 0x2e
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
je 0x425ac0
add eax, 1
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov edi, eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.KERNEL32.dll_GetCPInfo
sub esp, 8
test eax, eax
je 0x425ac0
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x425b10
xor edi, edi
mov esp, ebx
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.LC_ALL
call sub.msvcrt.dll_getenv
test eax, eax
jne 0x425a82
mov dword [esp], str.LC_CTYPE
call sub.msvcrt.dll_getenv
test eax, eax
jne 0x425a82
mov dword [esp], str.LANG
call sub.msvcrt.dll_getenv
test eax, eax
jne 0x425a82
mov eax, esi
jmp 0x425a82
mov esp, ebx
jmp 0x425ac4

Function at 0x4264c0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
call sub.KERNEL32.dll_GetLastError
mov esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call sub.KERNEL32.dll_SetLastError
mov eax, ebx
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x4264f0
Capabilities:
Set thread local storage value

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
test eax, eax
je 0x426518
xor eax, eax
add esp, 0x1c
ret
add esp, 0x1c
jmp sub.KERNEL32.dll_GetLastError
Function at 0x42a700
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0x1c
mov dword [0x50ac68], 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0xffff
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateSemaphoreW
sub esp, 0x10
mov dword [0x50ac6c], eax
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x42a768
mov dword [esp + 4], 0x42a610
mov dword [esp], eax
mov dword [0x50ac64], eax
call fcn.0042ad50
test eax, eax
jne 0x4b88d9
add esp, 0x1c
ret
call sub.KERNEL32.dll_GetLastError
jmp 0x42a758
Function at 0x42a770
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebp, dword [0x50a20c]
mov esi, dword [esp + 0x40]
test ebp, ebp
jne 0x42a798
mov eax, dword [esi + 8]
test eax, eax
je 0x42a7f0
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esi + 8]
test edi, edi
je 0x42a800
mov ebx, dword [0x50ac64]
call sub.KERNEL32.dll_GetLastError
mov dword [esp], ebx
mov ebp, eax
call sub.KERNEL32.dll_TlsGetValue
sub esp, 4
mov ebx, eax
mov dword [esp], ebp
call sub.KERNEL32.dll_SetLastError
sub esp, 4
test ebx, ebx
je 0x42a890
mov ebp, dword [ebx]
cmp ebp, edi
jb 0x42a8e0
lea ebx, [ebx + edi*4]
mov eax, dword [ebx]
test eax, eax
jne 0x42a78c
mov eax, esi
call fcn.0042a660
mov dword [ebx], eax
jmp 0x42a78c
mov eax, esi
call fcn.0042a660
mov dword [esi + 8], eax
jmp 0x42a78c
mov edi, dword [0x50a20c]
test edi, edi
je 0x42a968
mov ebx, dword [0x4c00d8]
test ebx, ebx
je 0x42a938
mov dword [esp], 0x50ac68
call sub.KERNEL32.dll_InterlockedIncrement
sub esp, 4
test eax, eax
jne 0x42a9ab
mov edi, dword [esi + 8]
test edi, edi
je 0x42a973
mov eax, dword [0x50a20c]
test eax, eax
je 0x42a79f
mov dword [esp], 0x50ac68
call sub.KERNEL32.dll_InterlockedDecrement
sub esp, 4
test eax, eax
js 0x42a79f
mov eax, dword [0x50ac6c]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.KERNEL32.dll_ReleaseSemaphore
sub esp, 0xc
jmp 0x42a79f
lea eax, [edi + 0x21]
mov dword [esp + 4], 4
lea ebp, [edi + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov ebx, eax
test eax, eax
je 0x4b88de
mov dword [eax], ebp
mov eax, dword [0x50ac64]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
test eax, eax
jne 0x42a7d6
call sub.KERNEL32.dll_GetLastError
jmp 0x42a7d6
lea edx, [ebp + ebp]
cmp edi, edx
jbe 0x42a8eb
lea edx, [edi + 0x20]
lea eax, [edx*4 + 4]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 0x1c], edx
call sub.msvcrt.dll_realloc
mov ebx, eax
test eax, eax
je 0x4b88de
mov edx, dword [esp + 0x1c]
mov dword [eax], edx
sub edx, ebp
lea eax, [eax + ebp*4 + 4]
shl edx, 2
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.msvcrt.dll_memset
jmp 0x42a8b2
mov dword [esp], 0x4c00dc
call sub.KERNEL32.dll_InterlockedIncrement
sub esp, 4
test eax, eax
jne 0x42a99f
call fcn.0042a700
mov dword [0x4c00d8], 1
mov edx, dword [0x50a20c]
test edx, edx
jne 0x42a81c
mov edi, dword [esi + 8]
test edi, edi
jne 0x42a79f
mov eax, dword [0x50ac60]
lea edi, [eax + 1]
mov dword [0x50ac60], edi
mov dword [esi + 8], edi
jmp 0x42a83e
mov dword [esp], 0
call sub.KERNEL32.dll_Sleep
sub esp, 4
mov ecx, dword [0x4c00d8]
test ecx, ecx
je 0x42a990
jmp 0x42a95a
mov eax, dword [0x50ac6c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
sub esp, 8
test eax, eax
je 0x42a833
mov dword [esp], 0x50ac68
call sub.KERNEL32.dll_InterlockedDecrement
sub esp, 4
jmp 0x42a833
Function at 0x42c620
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ecx, 0x1a
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x80]
mov esi, 0x4c432d
push ebx
sub esp, 0x9c
mov eax, dword [str.not_enough_space_for_format_expansion__Please_submit_full_bug_report_at_https:__gcc.gnu.org_bugs__:_n]
mov dword [ebp - 0x81], eax
mov eax, dword [0x4c4391]
mov dword [ebp - 0x1c], eax
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp + 0xc]
sub edx, dword [ebp + 8]
lea eax, [edx + 0x84]
and eax, 0xfffffff0
call fcn.00426140
mov ecx, 0x1a
sub esp, eax
lea esi, [ebp - 0x81]
mov dword [ebp - 0x8c], edx
lea ebx, [esp + 0x1b]
and ebx, 0xfffffff0
mov edi, ebx
lea eax, [ebx + 0x68]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x8c]
mov byte [ebx + edx + 0x68], 0
mov dword [esp], ebx
call fcn.004b7518
nop
nop
nop
nop
nop
nop
nop
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
cmp byte [0x4c118c], 0
jne 0x4b7c6c
mov byte [0x4c118c], 1
call fcn.004b4850
test eax, eax
je 0x4b7cdc
mov ebx, dword [eax + 4]
xor eax, eax
cmp byte [ebx], 0x2a
mov dword [esp + 8], 0
sete al
mov dword [esp + 4], 0
add ebx, eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call fcn.00419620
mov ebp, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x30
mov dword [esp + 4], 1
mov edi, eax
lea esi, [ebp + 0x40]
mov dword [esp], str.terminate_called_after_throwing_an_instance_of_
mov dword [esp + 0xc], esi
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x4b7c99
jmp 0x4b7d09
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1d
mov dword [esp + 4], 1
add eax, 0x40
mov dword [esp], str.terminate_called_recursively_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
call sub.msvcrt.dll_abort
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_fputs
lea eax, [ebp + 0x40]
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4c4a51
call sub.msvcrt.dll_fwrite
cmp dword [esp + 0x1c], 0
jne 0x4b7cd7
mov dword [esp], edi
call fcn.0042ab90
call fcn.004b4c20
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x2d
mov dword [esp + 4], 1
add eax, 0x40
mov dword [esp], str.terminate_called_without_an_active_exception_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
call sub.msvcrt.dll_abort
mov dword [esp + 4], esi
mov dword [esp], edi
call sub.msvcrt.dll_fputs
jmp 0x4b7ca5
Function at 0x4b8790
Capabilities:
Accept command line arguments

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push esi
push ebx
push ecx
sub esp, 0x6c
call fcn.00419d00
call sub.KERNEL32.dll_GetCommandLineA
mov ebx, eax
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call sub.KERNEL32.dll_GetStartupInfoA
sub esp, 4
test ebx, ebx
jne 0x4b87cb
jmp 0x4b881e
add ebx, 1
movzx eax, byte [ebx]
cmp al, 0x20
je 0x4b87c8
cmp al, 9
je 0x4b87c8
cmp al, 0x22
jne 0x4b8807
lea esi, [esi]
mov edx, ebx
movzx eax, byte [ebx + 1]
add ebx, 1
cmp al, 0x22
je 0x4b87f5
test al, al
jne 0x4b87e0
cmp al, 0x22
jne 0x4b8813
lea ebx, [edx + 2]
jmp 0x4b8813
cmp al, 9
je 0x4b8813
add ebx, 1
movzx eax, byte [ebx]
test al, 0xdf
jne 0x4b8800
jmp 0x4b8813
add ebx, 1
movzx eax, byte [ebx]
cmp al, 0x20
je 0x4b8810
cmp al, 9
je 0x4b8810
mov esi, 0xa
test byte [ebp - 0x30], 1
je 0x4b882d
movzx esi, word [ebp - 0x2c]
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0040bdd0
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ecx
pop ebx
pop esi
pop ebp
lea esp, [ecx - 4]
ret
Function at 0x4021a3
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x4021f8
push dword [esp + 0x10]
push 0x402122
call dword [sym.imp.USER32.dll_EnumWindows]
mov esi, dword [0x4f2f90]
test esi, esi
je 0x402251
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x4021f0
cmp byte [esi + 0x10], 0
je 0x4021f0
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x4021cc
jmp 0x402251
mov esi, dword [0x4f2f90]
test esi, esi
je 0x402251
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x40224a
cmp byte [esi + 0x11], 0
je 0x402226
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x40223d
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
push ebp
push 0x4f2f90
call fcn.00403cba
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x402205
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x4028ba
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [esp + 4], 0
je 0x4028e3
test byte [esp + 8], 2
je 0x4028d7
push pe_nt_image_headers32
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4028e5
xor eax, eax
ret 8

Function at 0x4028f6
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x402a3e
xor ecx, ecx
cmp word [eax], cx
je 0x402a3e
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x40294f
cmp eax, 3
jne 0x402989
cmp word [esp + 0xa], 0x3a
jne 0x402989
cmp eax, 2
jne 0x40296d
lea eax, [esp + 8]
push 0x404014
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x402a3e
push 0xfffffffffffffffe
pop edi
jmp 0x402a3e
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x40299e
cmp ax, bx
jne 0x4029a8
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x402991
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x4029e7
test byte [esp + 0x21c], 0x10
je 0x4029ce
push 0xfffffffffffffffe
pop edi
jmp 0x4029de
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x402a3c
cmp word [esp + 0x10], bp
jne 0x4029f5
cmp word [esp + 0x12], bp
je 0x402a14
cmp word [esp + 0x10], bx
jne 0x402a03
cmp word [esp + 0x12], bx
je 0x402a14
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x402a3c
cmp word [esp + 0x12], ax
jne 0x402a3c
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x402a29
test al, 0x10
je 0x402a3c
jmp 0x402a39
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x402a3c
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4

Function at 0x402af0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x402b2c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4
Function at 0x402ef0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
je 0x402f55
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x402f4d
push dword [esp + 0x10]
push dword [0x4f2fd4]
call fcn.00403b17
test eax, eax
je 0x402f43
cmp dword [eax + 4], 0
je 0x402f32
push edi
push esi
push eax
call fcn.00403150
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea ecx, [esp + 0xc]
push ecx
push edi
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
pop edi
xor eax, eax
pop esi
pop ecx
ret 0xc
xor eax, eax
pop esi
pop ecx
ret 0xc

Function at 0x402f60
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x4f2fd4]
call fcn.00403b17
mov esi, eax
test esi, esi
je 0x402fdf
cmp dword [esi + 4], 0
je 0x402fb0
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.00403260
test eax, eax
je 0x402fa4
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402fea
cmp dword [esp + 8], 0
je 0x402fea
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4
Function at 0x403150
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 4], 0
cmp dword [esi + 0x1c], 0
jne 0x403257
cmp dword [esi + 0x14], 1
jne 0x40319b
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0xc]
push 1
neg eax
cdq
push ecx
push eax
push dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
push edi
mov edi, dword [esp + 0x20]
cmp eax, edi
jle 0x403218
mov ecx, dword [esi + 8]
add ecx, dword [esi + 4]
sub ecx, eax
mov eax, edi
dec eax
je 0x403203
dec eax
je 0x4031ec
sub eax, 2
je 0x4031d7
push edi
push dword [esp + 0x20]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov ax, word [eax]
mov word [ecx], ax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov al, byte [eax]
mov byte [ecx], al
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
push esi
call fcn.00402af0
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x403245
push 0
lea eax, [esp + 0xc]
push eax
push edi
push dword [esp + 0x28]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
add esp, 0xc
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
push edi
push dword [esp + 0x20]
add ecx, eax
jmp 0x4031c1
xor eax, eax
pop esi
add esp, 0xc
ret 0xc
Function at 0x403260
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x403281
push esi
call fcn.00402af0
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x4032f5
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x4032e2
dec ecx
je 0x4032cd
sub ecx, 2
je 0x4032ba
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x40333a
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x40335b
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x403380
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x4f2f7c]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x403504
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x4033ce
test ebp, ebp
je 0x403470
dec ebp
cmp dword [ebx + 4], 0
je 0x4033e7
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00403260
mov dword [esp + 0x14], eax
jmp 0x403401
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x403470
test cl, cl
je 0x403415
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x403450
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x4f2f7c]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x403470
cmp dword [esp + 0x2c], 0
jne 0x4033c0
cmp cl, 0xd
je 0x403477
cmp cl, 0xa
jne 0x4033c0
dec esi
jmp 0x4034e7
cmp dword [esp + 0x2c], 0
jne 0x4034e7
cmp cl, 0xa
jne 0x40347f
dec esi
jmp 0x4034e7
cmp cl, 0xd
jne 0x4034e7
dec esi
cmp dword [ebx + 4], 0
je 0x40349e
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00403260
mov dword [esp + 0x14], eax
jmp 0x4034b4
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x4034e7
cmp dword [ebx + 4], 0
je 0x4034c6
inc dword [ebx + 0xc]
jmp 0x4034e7
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10