joyce8/EMBER2024-capa huggingface dataset:
Function at 0x478d50
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
mov eax, 0x481226
call fcn.0044c464
mov eax, 0x2024
call fcn.0044ace0
mov eax, dword [0x4a8ae4]
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
xor eax, ebp
push edi
xor edi, edi
mov dword [ebp - 0x202c], edi
cmp dword [ecx + 0x50], edi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x201c], ebx
mov dword [ebp - 0x2030], esi
mov dword [ebp - 0x2014], edx
je 0x478e8a
push eax
call fcn.00478ca1
cmp eax, edi
mov dword [ebp - 0x2020], eax
jne 0x478dbb
push dword [ebp - 0x2014]
jmp 0x478ebc
call fcn.004621d7
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x2018], ebx
lea eax, [ebp - 0x2024]
push eax
push edi
lea eax, [ebp - 0x202c]
push eax
push edi
push esi
push dword [ebp - 0x2020]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 4], edi
call esi
cmp eax, edi
mov dword [ebp - 0x2028], eax
jne 0x478e47
mov eax, dword [ebp - 0x2024]
shr eax, 1
push eax
lea ecx, [ebp - 0x2018]
call fcn.0043faff
lea ecx, [ebp - 0x2024]
push ecx
push eax
lea eax, [ebp - 0x202c]
push eax
push edi
push dword [ebp - 0x2030]
push dword [ebp - 0x2020]
call esi
push 0xffffffffffffffff
lea ecx, [ebp - 0x2018]
mov dword [ebp - 0x2028], eax
call fcn.0043fa4f
mov ebx, dword [ebp - 0x2018]
push dword [ebp - 0x2020]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x2028], edi
mov ecx, dword [ebp - 0x201c]
jne 0x478e7d
lea eax, [ebp - 0x2018]
push eax
call fcn.004400fa
lea ecx, [ebx - 0x10]
call fcn.00401230
mov eax, dword [ebp - 0x201c]
jmp 0x478ec5
push dword [ebp - 0x2014]
call fcn.0043fe5c
jmp 0x478e6d
cmp edx, edi
jne 0x478e98
mov dword [ebp - 0x2014], 0x489aa4
push dword [ecx + 0x64]
lea ecx, [ebp - 0x2010]
push 0x1000
push ecx
push dword [ebp - 0x2014]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x2010]
push eax
mov ecx, ebx
call fcn.0043fe5c
mov eax, ebx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.0044a318
leave
ret 0x10

Function at 0x478ee0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0x10], 0
jne 0x478f0f
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
shl eax, 1
push eax
push dword [ebp + 0xc]
push 1
push dword [ebp + 8]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
neg eax
sbb eax, eax
inc eax
jmp 0x478f60
push esi
lea eax, [ebp + 8]
push eax
push dword [ebp + 8]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x478f5d
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0xc]
push 1
push 0
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp + 8]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x478f5d
test esi, esi
jne 0x478f5d
inc eax
jmp 0x478f5f
xor eax, eax
pop esi
pop ebp
ret 0xc
Function at 0x4863e0
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
cmp ecx, 4
jae 0x4863ee
mov ecx, 4
mov eax, dword [esp + 8]
push esi
lea esi, [ecx*4 + 0x14]
add eax, 0x10
test esi, esi
je 0x486447
push ebx
push edi
mov ecx, dword [eax]
mov ebx, ecx
shr ebx, 0x10
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x4b4c10]
movzx edi, bl
mov ebx, dword [edi*4 + 0x4b4810]
shr ecx, 8
movzx ecx, cl
xor edx, ebx
mov ebx, dword [ecx*4 + 0x4b4410]
movzx ecx, byte [eax]
mov edi, dword [ecx*4 + 0x4b4010]
xor edx, ebx
xor edx, edi
mov dword [eax], edx
add eax, 4
dec esi
jne 0x486403
pop edi
pop ebx
pop esi
ret 8
Function at 0x40163d
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x43707c]
jne 0x401647
repz ret
jmp fcn.0040220e

Function at 0x406b6a
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43707c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0040405d
and dword [ebp - 0x14], 0
cmp dword [0x439a4c], 0
mov dword [ebp - 0x18], eax
jne 0x406c1d
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x406cc5
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x406cc5
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x439a4c], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x439a50], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x439a54], eax
call edi
push eax
call esi
mov dword [0x439a5c], eax
test eax, eax
je 0x406c1d
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x439a58], eax
mov eax, dword [0x439a58]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x406c76
cmp dword [0x439a5c], ecx
je 0x406c76
push eax
call esi
push dword [0x439a5c]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x406c76
test ebx, ebx
je 0x406c76
call edi
test eax, eax
je 0x406c6d
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x406c6d
test byte [ebp - 8], 1
jne 0x406c76
or dword [ebp + 0x10], 0x200000
jmp 0x406ca9
mov eax, dword [0x439a50]
cmp eax, dword [ebp - 0x18]
je 0x406ca9
push eax
call esi
test eax, eax
je 0x406ca9
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x406ca9
mov eax, dword [0x439a54]
cmp eax, dword [ebp - 0x18]
je 0x406ca9
push eax
call esi
test eax, eax
je 0x406ca9
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x439a4c]
call esi
test eax, eax
je 0x406cc5
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x406cc7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040163d
leave
ret
Function at 0x416ba3
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
pushal
call 0x416bb2
pop dword [ebp - 0x50]
mov eax, 0x416bb2
sub dword [ebp - 0x50], eax
push 0x40
push 0x1000
push 0x3c74a
push 0
mov eax, 0x1542038d
sub eax, 0x15003179
add eax, dword [ebp - 0x50]
call dword [eax]
mov ecx, 0x11217bee
add ecx, 0xeedec875
mov ebx, eax
mov edx, 0x46a8ff70
add edx, 0xb99a6090
add edx, dword [ebp - 0x50]
mov edi, 0x1fe00802
sub edi, 0x1f170ae6
add dword [ebp - 0xc], 0xf97a5d6e
mov esi, dword [edx]
add dword [ebp - 0x48], edi
xor esi, edi
mov dword [ebx], esi
add dword [ebp - 0x40], ebx
add ebx, 0xb878d506
add ebx, 0x47872afe
add edx, 4
loop 0x416c0c
add eax, 0x778e8a35
add eax, 0x88727a2a
mov ebx, eax
add eax, 0xb6596dc2
add eax, 0x49a69243
mov ecx, 0x93a35917
sub ecx, 0x93635917
add ecx, dword [ebp - 0x50]
call ebx
leave
ret
Function at 0x42211b
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x42215a
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42215a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42215a
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x42215a
cmp dword [ecx + 0x74], 0xe
jbe 0x42215a
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x4347a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4347cd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4347cd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0xd1a058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.00d1a1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0xd1a07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd1a06a
add dl, dl
jne 0xd1a089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd1a0dc
xor eax, eax
add dl, dl
jne 0xd1a096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xd1a17d
add dl, dl
jne 0xd1a0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd1a0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd1a0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd1a0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0xd1a0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0xd1a075
mov eax, 1
add dl, dl
jne 0xd1a0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xd1a0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd1a0e1
sub eax, ebx
mov ebx, 1
jne 0xd1a128
mov ecx, 1
add dl, dl
jne 0xd1a10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xd1a119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd1a105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd1a075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0xd1a13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xd1a14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xd1a136
cmp eax, 0x7d00
jae 0xd1a16d
cmp eax, 0x500
jb 0xd1a168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd1a075
cmp eax, 0x7f
ja 0xd1a170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xd1a075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0xd1a19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0xd1a075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x8e3c60
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x499000]
push edi
jmp 0x8e3c7a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x8e3c81
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8e3c70
mov eax, 1
add ebx, ebx
jne 0x8e3c93
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x8e3ca4
jne 0x8e3cc3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8e3cc3
dec eax
add ebx, ebx
jne 0x8e3cb0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x8e3c88
add ebx, ebx
jne 0x8e3cbf
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x8e3d15
xor ecx, ecx
sub eax, 3
jb 0x8e3cdb
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x8e3d4a
sar eax, 1
mov ebp, eax
jmp 0x8e3ce6
add ebx, ebx
jne 0x8e3ce6
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8e3cb4
inc ecx
add ebx, ebx
jne 0x8e3cf4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x8e3cb4
add ebx, ebx
jne 0x8e3d01
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x8e3cf6
jne 0x8e3d12
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x8e3cf6
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x8e3d34
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x8e3d26
jmp 0x8e3c76
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x8e3d34
add edi, ecx
jmp 0x8e3c76
pop esi
mov edi, esi
mov ecx, 0x2c75
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x8e3d52
cmp byte [edi], 0xc
jne 0x8e3d52
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x8e3d57
lea edi, [esi + 0x4e0000]
mov eax, dword [edi]
or eax, eax
je 0x8e3dcf
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x4e4310]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x4e44ac]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x8e3d84
mov ecx, edi
jns 0x8e3db3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x4e44b4]
or eax, eax
je 0x8e3dc9
mov dword [ebx], eax
add ebx, 4
jmp 0x8e3da1
call dword [esi + 0x4e44b0]
mov ebp, dword [esi + 0x4e44b8]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x20f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x8e3e03
sub esp, 0xffffff80
jmp 0x478ed3
Function at 0x40191a
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x401959
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x401959
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401959
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x401959
cmp dword [ecx + 0x74], 0xe
jbe 0x401959
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x40b8d0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40b8fd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40b8fd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x402930
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x402955
mov ecx, dword [0x40d768]
push eax
mov eax, dword [str.htcacheclean]
push eax
push str._s_error:__s_n
push ecx
call fcn.004032c0
add esp, 0x10
mov eax, dword [str.htcacheclean]
mov edx, dword [0x40d768]
push eax
push eax
push eax
push str._s____program_for_cleaning_the_disk_cache._r_nUsage:__s___Dvtrn___pPATH__lLIMIT___PPIDFILE__r_n________s___nti___dINTERVAL__pPATH__lLIMIT___PPIDFILE__r_n_r_nOptions:_r_n___d___Daemonize_and_repeat_cache_cleaning_every_INTERVAL_minutes._r_n_______This_option_is_mutually_exclusive_with_the__D___v_and__r_r_n_______options._r_n_r_n___D___Do_a_dry_run_and_dont_delete_anything._This_option_is_mutually_r_n_______exclusive_with_the__d_option._r_n_r_n___v___Be_verbose_and_print_statistics._This_option_is_mutually_r_n_______exclusive_with_the__d_option._r_n_r_n___r___Clean_thoroughly._This_assumes_that_the_Apache_web_server_is__r_n_______not_running._This_option_is_mutually_exclusive_with_the__d_r_n_______option_and_implies__t._r_n_r_n___n___Be_nice._This_causes_slower_processing_in_favour_of_other_r_n_______processes._r_n_r_n___t___Delete_all_empty_directories._By_default_only_cache_files_are_r_n_______removed__however_with_some_configurations_the_large_number_of_r_n_______directories_created_may_require_attention._r_n_r_n___p___Specify_PATH_as_the_root_directory_of_the_disk_cache._r_n_r_n___P___Specify_PIDFILE_as_the_file_to_write_the_pid_to._r_n_r_n___l___Specify_LIMIT_as_the_total_disk_cache_size_limit._Attach_K_r_n_______or_M_to_the_number_for_specifying_KBytes_or_MBytes._r_n_r_n___i___Be_intelligent_and_run_only_when_there_was_a_modification_of_r_n_______the_disk_cache._This_option_is_only_possible_together_with_the_r_n________d_option._r_n
push edx
call fcn.004032c0
add esp, 0x14
push 1
call dword [sym.imp.MSVCRT.dll_exit]
nop
nop
nop
nop
nop
nop
nop

Function at 0x402980
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push ebx
push esi
push edi
call dword [sym.imp.MSVCRT.dll__getpid]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov esi, eax
mov eax, dword [ebp + 8]
push eax
push 0x644
push 0x116
push ebx
push edi
call fcn.00405360
test eax, eax
jne 0x4029c8
mov ecx, dword [edi]
push esi
push str._d_r_n
push ecx
call fcn.004032c0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x40d768]
test ecx, ecx
je 0x4029f3
lea edx, [ebp - 0x78]
push 0x78
push edx
push eax
call fcn.00405a50
push eax
mov eax, dword [0x40d768]
push ebx
push str.Could_not_write_the_pid_file__s:__s_r_n
push eax
call fcn.004032c0
add esp, 0x10
push 1
call dword [sym.imp.MSVCRT.dll_exit]
nop
nop
nop
nop
nop
Function at 0x4031e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
mov al, byte [esi + 0x2c]
test al, al
je 0x4032b1
mov ecx, dword [esi + 0x48]
xor eax, eax
push ebx
cmp ecx, 1
push edi
mov dword [ebp - 4], eax
mov dword [ebp + 8], eax
jne 0x4032a5
mov edi, dword [esi + 0x3c]
cmp edi, eax
je 0x4032a5
mov ebx, dword [esi + 0x38]
cmp edi, 0xffffffff
jbe 0x403221
or eax, 0xffffffff
jmp 0x403223
mov eax, edi
mov edx, dword [esi + 4]
lea ecx, [ebp - 4]
push 0
push ecx
push eax
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403268
mov eax, dword [ebp - 4]
mov edx, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
add edx, eax
adc ecx, 0
sub edi, eax
add ebx, eax
mov dword [esi + 0x50], edx
test edi, edi
mov dword [esi + 0x54], ecx
ja 0x403217
mov eax, dword [ebp + 8]
pop edi
mov dword [esi + 0x3c], 0
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 4
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jne 0x403279
mov dword [ebp + 8], eax
jmp 0x403283
call edi
add eax, 0xafc80
mov dword [ebp + 8], eax
mov eax, dword [ebp - 4]
mov edx, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
add edx, eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x50], edx
adc ecx, 0
test eax, eax
mov dword [esi + 0x54], ecx
jne 0x4032a5
mov dword [esi + 0x3c], 0
mov eax, dword [ebp + 8]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 4
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x405770
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4000
call fcn.0040ad10
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x4000]
push eax
push 0x2000
push ecx
call fcn.00405110
add esp, 0xc
test eax, eax
jne 0x4057ce
lea edx, [ebp - 0x4000]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4057b2
xor eax, eax
mov esp, ebp
pop ebp
ret 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x4057c6
pop esi
mov esp, ebp
pop ebp
ret 8
call esi
add eax, 0xafc80
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x405930
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x6000
call fcn.0040ad10
lea eax, [ebp - 0x6000]
push esi
push eax
push 0x2000
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x40596e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x4059d1
call esi
add eax, 0xafc80
pop esi
mov esp, ebp
pop ebp
ret 0xc
lea ecx, [ebp - 0x6000]
lea edx, [ebp - 0x2000]
push ecx
push 0x2000
push edx
call fcn.00405200
add esp, 0xc
test eax, eax
jne 0x4059d3
mov al, byte [ebp + 0xc]
mov esi, dword [ebp + 8]
test al, 0x10
jne 0x4059bf
lea eax, [ebp - 0x2000]
mov dword [esi], eax
mov al, byte [ebp - 0x2000]
test al, al
je 0x4059bf
mov eax, dword [esi]
cmp byte [eax], 0x5c
jne 0x4059b3
mov byte [eax], 0x2f
mov edx, dword [esi]
inc edx
mov eax, edx
mov dword [esi], edx
cmp byte [eax], 0
jne 0x4059a9
mov edx, dword [ebp + 0x10]
lea ecx, [ebp - 0x2000]
push ecx
push edx
call fcn.00405e30
mov dword [esi], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4059e0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4000
call fcn.0040ad10
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x4000]
push eax
push 0x2000
push ecx
call fcn.00405110
add esp, 0xc
test eax, eax
jne 0x405a3e
lea edx, [ebp - 0x4000]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x405a3c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x405a2e
pop esi
mov esp, ebp
pop ebp
ret 8
call esi
add eax, 0xafc80
pop esi
mov esp, ebp
pop ebp
ret 8
xor eax, eax
mov esp, ebp
pop ebp
ret 8

Function at 0x406650
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
call fcn.00406840
test eax, eax
jne 0x406731
mov eax, dword [0x40dbe0]
test eax, eax
jne 0x40672f
push esi
push edi
mov dword [0x40dbe0], 1
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
test eax, eax
je 0x4066b2
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
test esi, esi
je 0x4066b2
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
push edx
push esi
push eax
call fcn.00409a70
mov ecx, dword [ebp + 8]
add esp, 0xc
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov ebx, eax
push 0xffffffffffffffff
push ebx
call dword [sym.imp.MSVCRT.dll___p__environ]
push eax
call fcn.00406740
mov edi, dword [ebp + 0x10]
add esp, 0xc
test edi, edi
je 0x406701
lea esi, [eax*4 + 4]
push esi
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [edi], eax
call dword [sym.imp.MSVCRT.dll___p__environ]
mov edi, dword [edi]
mov ecx, esi
mov esi, dword [eax]
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]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov esi, dword [sym.imp.MSVCRT.dll___p__wenviron]
call esi
mov ecx, dword [eax]
pop ebx
test ecx, ecx
je 0x40672d
call esi
mov edi, dword [eax]
call esi
push edi
mov dword [eax], 0
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc
Function at 0x406840
Capabilities:
Allocate thread local storage
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x40dbe4]
mov ecx, eax
inc eax
test ecx, ecx
mov dword [0x40dbe4], eax
je 0x406860
xor eax, eax
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 8]
push edx
call fcn.00407560
add esp, 4
test eax, eax
jne 0x4068f6
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x40e144], eax
call fcn.00403430
test eax, eax
jne 0x4068fb
push eax
push eax
push eax
lea eax, [ebp - 4]
push eax
call fcn.00403940
test eax, eax
je 0x4068a1
mov eax, 0x4e22
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push str.apr_initialize
push ecx
call fcn.00403ff0
lea edx, [ebp - 0x198]
push edx
push 2
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x4068fb
mov ax, word [ebp - 0x198]
cmp al, 2
jne 0x4068f0
xor ecx, ecx
mov cl, ah
test cl, cl
jne 0x4068f0
mov edx, dword [ebp - 4]
push edx
call fcn.00408f10
mov eax, dword [ebp - 4]
push eax
call fcn.00404ff0
add esp, 8
xor eax, eax
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov eax, 0x11
mov esp, ebp
pop ebp
ret