joyce8/EMBER2024-capa huggingface dataset:
Function at 0x53a450
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0
push dword [ebp + 8]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x53a4a4
cmp eax, 0xb7
je 0x53a4a4
cmp eax, 0x50
je 0x53a4a4
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
call fcn.00536cd0
mov esi, eax
mov edi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_create_dir._Error____d
push 0x557600
push esi
call dword [edi + 0x24]
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebp
ret
mov al, 1
pop ebp
ret
Function at 0x53ae90
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x53aebe
call fcn.00536cd0
mov ecx, dword [eax]
push ebx
push str.File_does_not_exist_at__s
push eax
call dword [ecx + 4]
add esp, 0xc
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
mov byte [ebp - 1], 0
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x53aeb7
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push edi
call ebx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
call fcn.00536cd0
mov esi, eax
mov edi, dword [esi]
call ebx
push eax
push dword [ebp + 8]
push str.Failed_to_delete_file_at_path:_ls_error:_d
push esi
call dword [edi + 4]
mov al, byte [ebp - 1]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x53af10
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 8], ebx
cmp ebx, 0xffffffff
jne 0x53af74
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
call fcn.00536cd0
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
push dword [ebp + 8]
push str.Failed_to_open_the_file_handle_at__s._Error___d_
push 0x557600
push edi
call dword [ebx + 0x24]
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00536cd0
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
mov ecx, dword [eax]
push esi
push edi
push str.file_size_to_which_we_have_to_extend_is__llu
push eax
call dword [ecx + 4]
add esp, 0x10
push 0
push 0
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x53afe8
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x53afc0
push ebx
mov byte [ebp - 1], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
call fcn.00536cd0
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
push str.Failed_to_set_the_end_of_the_file_to_size__llu._Error____d
jmp 0x53b00e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
call fcn.00536cd0
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
push str.Failed_to_resize_the_file_to_size__ld._Error____d
push 0x557600
push edi
call dword [ebx + 0x24]
mov ebx, dword [ebp - 8]
add esp, 0x18
mov byte [ebp - 1], 0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x53b2e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x53b2f7
xor al, al
pop esi
pop ebp
ret
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x53b332
push edi
call fcn.00536cd0
mov esi, eax
mov edi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push str.Failed_to_get_the_directory_attributes_for____s._Error_is__d.
push 0x557600
push esi
call dword [edi + 0x24]
add esp, 0x14
xor al, al
pop edi
pop ebx
pop esi
pop ebp
ret
call fcn.00536cd0
mov ecx, dword [eax]
push ebx
push esi
push str.The_file_attributes_of_directory____s_is__d
push eax
call dword [ecx + 4]
add esp, 0x10
shr ebx, 4
and bl, 1
mov al, bl
pop ebx
pop esi
pop ebp
ret

Function at 0x53b360
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x53b38a
call fcn.00536cd0
push dword [ebp + 8]
mov ecx, dword [eax]
push str.File_does_not_exist_at__s
push eax
call dword [ecx + 4]
add esp, 0xc
xor al, al
pop ebp
ret
mov al, 1
pop ebp
ret

Function at 0x53b4b0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x53b50f
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x53b50f
push ebx
push eax
call fcn.004df807
add esp, 8
test eax, eax
je 0x53b50a
push esi
push edi
call fcn.004ddb33
mov ecx, dword [eax]
mov eax, dword [ebp + 0x10]
mov dword [eax], ecx
call fcn.00536cd0
mov esi, eax
mov edi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push dword [ebp + 0xc]
push str.Failed_to_rename_file_from__s_to__s._The_error_is_:_d
push 0x557600
push esi
call dword [edi + 0x24]
add esp, 0x18
xor al, al
pop edi
pop esi
pop ebx
pop ebp
ret
mov al, 1
pop ebx
pop ebp
ret
call fcn.00536cd0
mov ecx, dword [eax]
push 0x570920
push eax
call dword [ecx + 4]
add esp, 8
xor al, al
pop ebx
pop ebp
ret

Function at 0x53b6d0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, eax
test edi, edi
jne 0x53b6e9
xor al, al
pop edi
pop ebp
ret
lea eax, [edi*2 + 2]
push esi
push eax
call fcn.004df659
mov esi, eax
add esp, 4
test esi, esi
je 0x53b715
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
test eax, eax
jne 0x53b71b
call fcn.004dbc6f
add esp, 4
pop esi
xor al, al
pop edi
pop ebp
ret
mov ecx, dword [ebp + 8]
call fcn.00403a80
push esi
call fcn.004dbc6f
add esp, 4
mov al, 1
pop esi
pop edi
pop ebp
ret
Function at 0x53d880
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
cmp dword [edi], 0
jne 0x53d8ad
call fcn.00536cd0
mov ecx, dword [eax]
push str.file_handler_to_read_not_initialized
push eax
call dword [ecx + 4]
add esp, 8
xor al, al
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
lea eax, [ebx + 8]
push esi
mov ecx, eax
mov dword [ebp - 4], eax
call fcn.0053b740
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x53d92d
mov esi, dword [ebp + 0x18]
push 0
lea eax, [ebp + 8]
push eax
push esi
push dword [ebp + 0x14]
mov dword [ebp + 8], 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp + 0x18], eax
cmp dword [ebp + 8], esi
jb 0x53d8f9
test eax, eax
jne 0x53d960
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x24], 1
call esi
mov dword [ebx + 0x28], eax
call fcn.00536cd0
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
push str.failed_to_read_data._Error_code____d
push 0x557600
push edi
call dword [ebx + 0x24]
mov esi, dword [ebp + 0x18]
add esp, 0x10
jmp 0x53d962
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x24], 1
call esi
mov dword [ebx + 0x28], eax
call fcn.00536cd0
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
push str.file_pointer_set_error____d
push 0x557600
push edi
call dword [ebx + 0x24]
add esp, 0x10
xor esi, esi
jmp 0x53d962
mov esi, eax
mov ecx, dword [ebp - 4]
call fcn.0053b760
xor eax, eax
cmp esi, 1
pop esi
pop edi
sete al
pop ebx
mov esp, ebp
pop ebp
ret 0x14

Function at 0x53d9c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
cmp dword [edi], 0
jne 0x53d9ed
call fcn.00536cd0
mov ecx, dword [eax]
push str.file_handler_not_initialized
push eax
call dword [ecx + 4]
add esp, 8
xor al, al
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
lea eax, [ebx + 8]
push esi
mov ecx, eax
mov dword [ebp - 4], eax
call fcn.0053b740
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x53da5d
mov esi, dword [ebp + 0x18]
push 0
lea eax, [ebp + 8]
push eax
push esi
push dword [ebp + 0x14]
mov dword [ebp + 8], 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
cmp dword [ebp + 8], esi
jb 0x53da38
test edi, edi
jne 0x53da8e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x24], 1
call esi
mov dword [ebx + 0x28], eax
call fcn.00536cd0
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
push str.failed_to_write_data._Error_code____d
jmp 0x53da80
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x24], 1
call esi
mov dword [ebx + 0x28], eax
call fcn.00536cd0
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
push str.file_pointer_set_error____d
push 0x557600
push edi
call dword [ebx + 0x24]
add esp, 0x10
xor edi, edi
mov ecx, dword [ebp - 4]
call fcn.0053b760
xor eax, eax
pop esi
cmp edi, 1
pop edi
sete al
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x543bd0
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
cmp dword [esi + 0x24], 0
je 0x543bfa
call fcn.00536cd0
push dword [esi + 0x38]
mov edx, dword [eax]
push str.thread___d__is_already_running._Closing_it_first
push eax
call dword [edx + 4]
add esp, 0xc
mov ecx, esi
call fcn.00543e20
lea eax, [ebp - 4]
push eax
push 4
push esi
push 0x543a30
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x24], eax
test eax, eax
jne 0x543c36
call fcn.00536cd0
mov ecx, dword [eax]
push str.failed_to_create_a_new_thread._Fatal_Error
push 0x557600
push eax
call dword [ecx + 0x24]
add esp, 0xc
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x543c71
call fcn.00536cd0
mov ecx, dword [eax]
push str.thread_failed_to_resumed._fatal_error
push 0x557600
push eax
call dword [ecx + 0x24]
add esp, 0xc
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x24], 0
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov dword [esi + 0x38], eax
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x543e20
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
cmp byte [esi + 4], 0
je 0x543f21
push edi
lea ecx, [esi + 8]
mov dword [esi + 0x34], 2
call fcn.0053b740
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x543ec6
mov eax, dword [ecx]
call dword [eax + 0x10]
mov eax, dword [esi + 0x28]
xor edi, edi
cmp dword [eax + 8], 3
je 0x543ec6
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
nop
mov eax, dword [esi + 0x28]
cmp dword [eax + 8], 5
je 0x543ec5
inc edi
cmp edi, 0x12c
jne 0x543e95
call fcn.00536cd0
mov ecx, dword [esi + 0x28]
mov edx, dword [eax]
push dword [ecx + 4]
push str.forcing_the_job___d__to_terminate.
push eax
call dword [edx + 0x14]
mov ecx, dword [esi + 0x28]
add esp, 0xc
mov eax, dword [ecx]
call dword [eax + 0x14]
jmp 0x543e9d
cmp edi, 0x3e8
je 0x543eac
push 0xa
call ebx
mov eax, dword [esi + 0x28]
cmp dword [eax + 8], 3
jne 0x543e60
jmp 0x543ec5
call fcn.00536cd0
mov edx, dword [esi + 0x28]
mov edi, dword [eax]
push dword [edx + 4]
push str.job___d__is_still_not_terminated._Closing_the_thread_handle_now
push eax
call dword [edi + 0x14]
add esp, 0xc
pop ebx
lea ecx, [esi + 8]
call fcn.0053b760
mov eax, dword [esi + 0x24]
test eax, eax
je 0x543f19
push 0x61a8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
test edi, edi
je 0x543f09
call fcn.00536cd0
mov ecx, dword [eax]
push edi
push dword [esi + 0x38]
push str.Forcing_the_thread___d__to_terminate_forcibly._Thread_seem_to_get_hanged._Error____d
push eax
call dword [ecx + 0x14]
add esp, 0x10
push 0
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x24], 0
mov dword [esi + 0x34], 3
pop edi
mov al, 1
pop esi
ret
Function at 0x543f30
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5500d6
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x59de30]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp + 8]
mov dword [ebx], 0
mov dword [ebx + 4], 0
lea ecx, [ebx + 0xc]
mov dword [ebx + 8], eax
call fcn.00401620
mov byte [ebx + 0x28], 0
lea ecx, [ebx + 0x2c]
mov dword [ebp - 4], 0
mov dword [ebx + 0x2c], 0
mov dword [ebx + 0x30], 0
call fcn.00544050
mov dword [ebx + 0x2c], eax
lea ecx, [ebx + 0xc]
mov byte [ebp - 4], 1
call fcn.0053b770
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x546260
Capabilities:
Prepare http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x550448
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push esi
push edi
mov eax, dword [0x59de30]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 0x20], 0
jne 0x5462eb
push 0x557600
lea ecx, [ebp - 0x24]
call fcn.00405af0
lea ecx, [esi + 0x40]
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 0
mov dword [esi + 0x38], 0x12
mov dword [esi + 0x3c], 0
cmp ecx, eax
je 0x5462c5
push 0xffffffffffffffff
push 0
push eax
call fcn.00403f60
cmp dword [ebp - 0x10], 8
jb 0x5462d6
push dword [ebp - 0x24]
call fcn.004daf24
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0xac]
test eax, eax
je 0x546306
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [esi + 0xac], 0
mov eax, dword [esi + 0x24]
mov edi, 0x100
cmp dword [eax + 0x14c], 1
mov ecx, 0x800100
lea edx, [eax + 0x130]
cmove edi, ecx
cmp dword [edx + 0x14], 8
jb 0x54632b
mov edx, dword [edx]
cmp dword [esi + 0x8c], 8
lea eax, [esi + 0x78]
jb 0x546339
mov eax, dword [eax]
cmp dword [esi + 0xa4], 8
lea ecx, [esi + 0x90]
jb 0x54634a
mov ecx, dword [ecx]
push edi
push 0
push edx
push 0
push eax
push ecx
push dword [esi + 0xa8]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [esi + 0xac], eax
test eax, eax
jne 0x54639e
call fcn.00536cd0
mov ecx, dword [eax]
push str.createRequest_:_failed_to_open_the_request_handle
push eax
call dword [ecx + 4]
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00546fc0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x546a40
Capabilities:
Read http header

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push dword [ebp + 8]
mov edi, ecx
mov dword [ebp - 4], 0
push dword [edi + 0xac]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x546a85
push eax
mov ecx, edi
call fcn.00546fc0
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 4]
test eax, eax
jne 0x546aae
call fcn.00536cd0
mov ecx, dword [eax]
push str.retrieveHeaderFromHttpRequest:_Zero_buffer_required....
push 0x557600
push eax
call dword [ecx + 0x24]
add esp, 0xc
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
push 0x5aecb8
neg ecx
or ecx, eax
push ecx
call fcn.0054a8ef
mov esi, eax
add esp, 8
test esi, esi
jne 0x546b0c
call fcn.00536cd0
mov ecx, dword [eax]
push str.failed_to_allocate_memory
push 0x557600
push eax
call dword [ecx + 0x24]
sub esp, 0xc
mov ecx, esp
push str.Memory_Allocation_Failed
call fcn.00405af0
push esi
push 0x13
mov ecx, edi
call fcn.00547900
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
push 0
lea eax, [ebp - 4]
push eax
push esi
push 0
push dword [ebp + 8]
push dword [edi + 0xac]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x546b49
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, edi
call fcn.00546fc0
push esi
call fcn.004de7af
add esp, 4
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 0xc]
push esi
call fcn.00403a80
push esi
call fcn.004de7af
add esp, 4
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x546cc0
Capabilities:
Read http header

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x16
push dword [edi]
mov dword [ebp - 4], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x546d48
mov eax, dword [ebp - 4]
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
push esi
neg ecx
or ecx, eax
push ecx
call fcn.004de7b4
add esp, 4
mov esi, eax
push 0
lea eax, [ebp - 4]
push eax
push esi
push 0
push 0x16
push dword [edi]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x546d3a
call fcn.00536cd0
mov ecx, dword [eax]
push esi
push str.Header_contents:__n_s
push eax
call dword [ecx + 0x14]
add esp, 0xc
test esi, esi
je 0x546d47
push esi
call fcn.004de7af
add esp, 4
pop esi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x401000
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x403228
push eax
mov eax, dword [esp + 0x14]
mov dword fs:[0], esp
sub esp, 0x10
and eax, 0xffff
push esi
push edi
push 0x406020
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x401048
pop edi
pop esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
jne 0x401068
pop edi
pop esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
lea ecx, [esp + 8]
mov edi, eax
call fcn.00402d68
mov ecx, dword [esp + 0x28]
push 0
push 0x1001
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0
call sub.MFC42.DLL_CFile::Open
test eax, eax
jne 0x4010ca
lea ecx, [esp + 8]
mov dword [esp + 0x20], 0xffffffff
call sub.MFC42.DLL_CFile::CFile
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
push esi
push edi
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 8]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 8]
mov dword [esp + 0x20], 0xffffffff
call sub.MFC42.DLL_CFile::CFile
mov ecx, dword [esp + 0x18]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x1c
ret
Function at 0x401110
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x403248
push eax
mov dword fs:[0], esp
sub esp, 0x7c
lea eax, [esp + 0xc]
push esi
xor esi, esi
push eax
push 0x20019
push esi
push str.HARDWAREDEVICEMAPSERIALCOMM_
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, esi
jne 0x4012c7
push ebx
push ebp
push edi
xor ebp, ebp
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x58]
mov dword [esp + 0x14], 0x19
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x18], 0x32
lea ecx, [esp + 0x18]
lea edx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x28]
push edx
push ecx
lea edx, [esp + 0x20]
push esi
lea ecx, [esp + 0x4c]
mov eax, ebp
push edx
mov edx, dword [esp + 0x30]
push ecx
inc ebp
push eax
push edx
mov dword [esp + 0x40], ebp
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov ebx, eax
cmp ebx, esi
je 0x4011b1
cmp ebx, 0xea
jne 0x40127b
mov al, byte [esp + 0x13]
push esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x30], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [esp + 0x5b]
mov dword [esp + 0x94], esi
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
mov dword [esp + 0x2c], eax
lea edi, [esp + 0x40]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
lea ecx, [esp + 0x30]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x401224
mov edi, dword [esp + 0x30]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x3c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], ebp
xor esi, esi
mov byte [eax + ebp], 0
mov ecx, dword [esp + 0x9c]
lea edx, [esp + 0x28]
push edx
push 1
mov eax, dword [ecx + 8]
push eax
call fcn.00401320
mov eax, dword [esp + 0x30]
mov dword [esp + 0x94], 0xffffffff
cmp eax, esi
je 0x40126b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401262
cmp al, 0xff
je 0x401262
dec al
mov byte [ecx], al
jmp 0x40126b
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
cmp ebx, esi
mov dword [esp + 0x14], 0x19
mov dword [esp + 0x18], 0x32
je 0x401172
cmp ebx, 0xea
je 0x401172
mov eax, dword [esp + 0x1c]
mov esi, 1
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebp
mov eax, esi
pop ebx
pop esi
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
add esp, 0x88
ret
mov ecx, dword [esp + 0x80]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x88
ret