joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406400
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
mov esi, eax
call fcn.004051f8
test eax, eax
je 0x406426
test ebx, ebx
je 0x406426
cmp word [ebx], 0
je 0x406426
push 0
push ebx
call sub.KERNEL32.DLL_CreateDirectoryW
jmp 0x40642e
push 0
push esi
call sub.KERNEL32.DLL_CreateDirectoryA
test eax, eax
je 0x406441
mov ecx, edi
mov edx, ebx
mov eax, esi
call fcn.004066ec
xor eax, eax
jmp 0x40645c
call sub.KERNEL32.DLL_GetLastError
cmp eax, 2
je 0x406450
cmp eax, 3
jne 0x406457
mov eax, 2
jmp 0x40645c
mov eax, 1
pop edi
pop esi
pop ebx
ret

Function at 0x406660
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
mov ebx, edx
mov esi, eax
call fcn.004051f8
test eax, eax
je 0x40668b
test ebx, ebx
je 0x40668b
cmp word [ebx], 0
je 0x40668b
push ebx
call sub.KERNEL32.DLL_GetFileAttributesW
cmp eax, 0xffffffff
setne al
and eax, 1
pop esi
pop ebx
ret
push esi
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
setne al
and eax, 1
pop esi
pop ebx
ret

Function at 0x4066c0
Capabilities:
Get file attributes

Disassembly:
push ebx
push esi
mov ebx, edx
mov esi, eax
call fcn.004051f8
test eax, eax
je 0x4066e2
test ebx, ebx
je 0x4066e2
cmp word [ebx], 0
je 0x4066e2
push ebx
call sub.KERNEL32.DLL_GetFileAttributesW
pop esi
pop ebx
ret
push esi
call sub.KERNEL32.DLL_GetFileAttributesA
pop esi
pop ebx
ret

Function at 0x4066ec
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
mov ebx, edx
mov edi, eax
call fcn.004051f8
test eax, eax
je 0x406719
test ebx, ebx
je 0x406719
cmp word [ebx], 0
je 0x406719
push esi
push ebx
call sub.KERNEL32.DLL_SetFileAttributesW
test eax, eax
setne al
and eax, 1
jmp 0x406728
push esi
push edi
call sub.KERNEL32.DLL_SetFileAttributesA
test eax, eax
setne al
and eax, 1
pop edi
pop esi
pop ebx
ret

Function at 0x408240
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, 0x415140
push edi
push ebp
mov ebp, edx
cmp dword [esi + 4], 0
mov edi, ecx
mov ebx, eax
jne 0x40825a
call fcn.00408208
mov eax, ebp
cmp edi, 8
jb 0x4082e5
xor ebx, dword [eax]
xor edx, edx
mov dl, bl
sub edi, 8
shr ebx, 8
mov ecx, dword [esi + edx*4]
xor ecx, ebx
xor edx, edx
mov ebx, ecx
mov dl, bl
shr ebx, 8
mov ecx, dword [esi + edx*4]
xor ecx, ebx
xor edx, edx
mov ebx, ecx
mov dl, bl
shr ebx, 8
mov ecx, dword [esi + edx*4]
xor ecx, ebx
xor edx, edx
mov ebx, ecx
mov dl, bl
shr ebx, 8
mov ecx, dword [esi + edx*4]
xor ecx, ebx
xor edx, edx
mov ebx, ecx
xor ebx, dword [eax + 4]
add eax, 8
mov dl, bl
shr ebx, 8
mov ecx, dword [esi + edx*4]
xor ecx, ebx
xor edx, edx
mov ebx, ecx
mov dl, bl
shr ebx, 8
mov ecx, dword [esi + edx*4]
xor ecx, ebx
xor edx, edx
mov ebx, ecx
mov dl, bl
shr ebx, 8
mov ecx, dword [esi + edx*4]
xor ecx, ebx
xor edx, edx
mov ebx, ecx
mov dl, bl
shr ebx, 8
mov ecx, dword [esi + edx*4]
xor ecx, ebx
cmp edi, 8
mov ebx, ecx
jae 0x408265
xor edx, edx
jmp 0x4082ff
mov ecx, ebx
xor cl, byte [eax + edx]
and ecx, 0xff
shr ebx, 8
mov ecx, dword [esi + ecx*4]
xor ecx, ebx
mov ebx, ecx
inc edx
cmp edi, edx
ja 0x4082e9
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4088f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
mov esi, ecx
mov ebx, edx
mov dword [ebp - 4], eax
test ebx, ebx
je 0x408907
test esi, esi
jg 0x40890e
xor eax, eax
jmp 0x4089c0
mov edx, dword [ebp - 4]
add edx, 4
lea eax, [ebp - 0x2c]
mov ecx, 0x10
call fcn.0040e608
test esi, esi
jns 0x408928
add esi, 0xf
sar esi, 4
mov dword [ebp - 8], esi
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0
jle 0x4089a7
lea ecx, [ebp - 0x1c]
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.00408c7c
lea edx, [ebp - 0x2c]
mov eax, edx
mov ecx, dword [eax]
xor dword [ebp - 0x1c], ecx
mov ecx, dword [eax + 4]
xor dword [ebp - 0x18], ecx
mov ecx, dword [eax + 8]
xor dword [ebp - 0x14], ecx
mov eax, dword [eax + 0xc]
xor dword [ebp - 0x10], eax
mov eax, edx
mov edx, ebx
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov edx, dword [edx + 0xc]
mov dword [eax + 0xc], edx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
mov dword [eax], edx
mov ecx, dword [ebp - 0x18]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x14]
mov dword [eax + 8], edx
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0xc], ecx
add ebx, 0x10
add dword [ebp + 8], 0x10
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
jg 0x40893a
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 4]
add eax, 4
mov ecx, 0x10
call fcn.0040e608
mov eax, dword [ebp - 8]
shl eax, 4
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x408be4
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffec
mov dword [esp], eax
mov esi, 1
xor eax, eax
xor ecx, ecx
mov edx, esi
mov ebx, ecx
shl edx, 4
add edx, dword [esp]
shl ebx, 2
add edx, ebx
xor ebx, ebx
add edx, 0x14
movzx edi, byte [edx + 1]
mov bl, byte [edx]
lea edi, [edi*4 + 0x417e02]
lea ebx, [ebx*4 + 0x417a02]
mov bl, byte [ebx + eax]
xor bl, byte [edi + eax]
movzx edi, byte [edx + 2]
movzx edx, byte [edx + 3]
lea edi, [edi*4 + 0x418202]
lea edx, [edx*4 + 0x418602]
xor bl, byte [edi + eax]
xor bl, byte [edx + eax]
lea edx, [esp + ecx*4 + 4]
mov byte [edx + eax], bl
inc ecx
cmp ecx, 4
jl 0x408bf6
inc eax
cmp eax, 4
jl 0x408bf4
mov eax, esi
lea edx, [esp + 4]
shl eax, 4
mov ecx, 0x10
add eax, dword [esp]
add eax, 0x14
call fcn.0040e608
inc esi
cmp esi, 0xa
jl 0x408bf2
add esp, 0x14
pop edi
pop esi
pop ebx
ret
Function at 0x409ec0
Capabilities:
Hash data using sha1

Disassembly:
mov dword [eax], 0x67452301
xor edx, edx
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
mov dword [eax + 0x18], edx
mov dword [eax + 0x14], edx
ret
Function at 0x40d410
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
mov ebx, eax
push edi
mov dword [ebp - 4], edx
xor edx, edx
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc18], edx
cmp byte [ebx + 0x14], 0
mov edi, ecx
je 0x40d433
mov al, 1
cmp byte [ebp + 8], 0
mov esi, 0x80000000
je 0x40d444
or esi, 0x40000000
mov dword [ebp - 8], 1
test al, al
je 0x40d453
or dword [ebp - 8], 2
call fcn.004051f8
test eax, eax
je 0x40d47f
test edi, edi
je 0x40d47f
cmp word [edi], 0
je 0x40d47f
push 0
push 0x8000000
push 3
push 0
push dword [ebp - 8]
push esi
push edi
call sub.KERNEL32.DLL_CreateFileW
mov esi, eax
jmp 0x40d498
push 0
push 0x8000000
push 3
push 0
push dword [ebp - 8]
push esi
push dword [ebp - 4]
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d4b1
call sub.KERNEL32.DLL_GetLastError
cmp eax, 2
jne 0x40d4b1
mov dword [ebx + 0xc18], 1
xor eax, eax
cmp esi, 0xffffffff
mov byte [ebx + 0x12], 0
setne dl
mov dword [ebx + 0xc], eax
and edx, 1
mov byte [ebx + 0x10], 0
mov byte [ebp - 9], dl
cmp byte [ebp - 9], 0
je 0x40d4fa
mov dword [ebx + 4], esi
test edi, edi
je 0x40d4e6
lea eax, [ebx + 0x416]
mov edx, edi
call fcn.0040edc8
jmp 0x40d4ef
mov word [ebx + 0x416], 0
lea eax, [ebx + 0x15]
mov edx, dword [ebp - 4]
call fcn.0040e6f4
mov al, byte [ebp - 9]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x40d698
Capabilities:
Delete file

Disassembly:
push ebx
mov ebx, eax
cmp dword [ebx + 0xc], 0
jne 0x40d6a7
cmp byte [ebx + 0x13], 0
jne 0x40d6ab
xor eax, eax
pop ebx
ret
cmp dword [ebx + 4], 0xffffffff
je 0x40d6b8
mov eax, ebx
call fcn.0040d618
call fcn.004051f8
test eax, eax
je 0x40d6e1
cmp word [ebx + 0x416], 0
je 0x40d6e1
add ebx, 0x416
push ebx
call sub.KERNEL32.DLL_DeleteFileW
test eax, eax
setne al
and eax, 1
jmp 0x40d6f2
add ebx, 0x15
push ebx
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
setne al
and eax, 1
pop ebx
ret
Function at 0x40d6f4
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov esi, ecx
test esi, esi
mov edi, eax
mov dword [esp], edx
je 0x40d7d5
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40d72f
dec eax
je 0x40d719
dec eax
je 0x40d725
jmp 0x40d72f
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetStdHandle
mov dword [edi + 4], eax
jmp 0x40d72f
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov dword [edi + 4], eax
cmp dword [edi + 0xc], 0
je 0x40d781
xor ebp, ebp
cmp esi, ebp
jle 0x40d79d
push 0
lea eax, [esp + 8]
push eax
mov edx, esi
sub edx, ebp
cmp edx, 0x4000
jge 0x40d754
mov ecx, esi
sub ecx, ebp
jmp 0x40d759
mov ecx, 0x4000
push ecx
mov eax, dword [esp + 0xc]
add eax, ebp
push eax
push dword [edi + 4]
call sub.KERNEL32.DLL_WriteFile
test eax, eax
setne bl
and ebx, 1
test bl, bl
je 0x40d79d
add ebp, 0x4000
cmp esi, ebp
jg 0x40d73b
jmp 0x40d79d
push 0
lea eax, [esp + 8]
push eax
push esi
push dword [esp + 0xc]
push dword [edi + 4]
call sub.KERNEL32.DLL_WriteFile
test eax, eax
setne bl
and ebx, 1
test bl, bl
jne 0x40d7d1
cmp dword [edi + 0xc], 0
jne 0x40d7d1
lea ebp, [edi + 0x15]
mov eax, 0x419088
mov edx, ebp
call fcn.0040be10
test al, al
jne 0x40d72f
mov edx, ebp
mov eax, 0x419088
call fcn.0040bddc
jmp 0x40d7d1
mov byte [edi + 8], 1
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x40d8ac
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, eax
push esi
push edi
push ecx
mov edi, edx
cmp dword [ebx + 0xc], 1
mov esi, ecx
jne 0x40d8d3
cmp esi, 0x4e20
jle 0x40d8c9
mov esi, 0x4e20
push 0xfffffffffffffff6
call sub.KERNEL32.DLL_GetStdHandle
mov dword [ebx + 4], eax
push 0
lea eax, [esp + 4]
push eax
push esi
push edi
push dword [ebx + 4]
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x40d924
mov eax, ebx
call fcn.0040db9c
test al, al
je 0x40d90b
cmp esi, 0x4e20
jle 0x40d90b
mov ecx, 0x4e20
mov edx, edi
mov eax, ebx
call fcn.0040d8ac
jmp 0x40d927
cmp dword [ebx + 0xc], 1
jne 0x40d91f
call sub.KERNEL32.DLL_GetLastError
cmp eax, 0x6d
jne 0x40d91f
xor eax, eax
jmp 0x40d927
or eax, 0xffffffff
jmp 0x40d927
mov eax, dword [esp]
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40ecc8
Capabilities:
Check for time delay via gettickcount

Disassembly:
cmp byte [0x4136fc], 0
jne 0x40ece1
call fcn.0040e8a8
mov dword [0x4136f8], eax
inc byte [0x4136fc]
call fcn.0040e8a8
sub eax, dword [0x4136f8]
cmp eax, 0x64
jle 0x40ed1d
cmp dword [0x41387c], 0
je 0x40ed18
mov eax, 0x419088
mov edx, 0xff
call fcn.0040bf4c
mov eax, 0x419088
mov edx, 0xff
call fcn.0040bf44
call fcn.00402984
ret
Function at 0x401120
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push 0
push 0
mov dword [esp + 0xc], 0
push dword [esi]
call fcn.0040a448
push dword [esi]
lea eax, [esp + 0x1c]
push 2
push 1
push eax
call fcn.0040a0de
mov ax, word [esp + 0x28]
add esp, 0x1c
cmp al, 0x4d
jne 0x401217
cmp ah, 0x5a
jne 0x401217
push 0
push 0x3c
push dword [esi]
call fcn.0040a448
push dword [esi]
lea eax, [esp + 0x14]
push 1
push 4
push eax
call fcn.0040a0de
mov eax, dword [esp + 0x20]
push 0
add eax, 0x18
push eax
push dword [esi]
call fcn.0040a448
push dword [esi]
lea eax, [esp + 0x38]
push 1
push 2
push eax
call fcn.0040a0de
mov ax, word [esp + 0x44]
add esp, 0x38
cmp al, 0xb
jne 0x401202
cmp ah, 1
jne 0x4011b6
mov ecx, 0x98
jmp 0x4011c0
cmp ah, 2
jne 0x401202
mov ecx, 0xa8
mov eax, dword [esp + 4]
push 0
add eax, ecx
push eax
push dword [esi]
call fcn.0040a448
push dword [esi]
lea eax, [esp + 0x14]
push 1
push 4
push eax
call fcn.0040a0de
add esp, 0x1c
cmp dword [esp + 4], 0
je 0x401217
lea eax, [esi + 0x68]
push eax
push str.LOADER:__s_contains_a_digital_signature_n
call fcn.004018c0
mov eax, dword [esp + 0xc]
add esp, 8
pop esi
pop ecx
ret
movsx ecx, ah
push ecx
movsx eax, al
push eax
push str.LOADER:_Could_not_find_a_valid_magic_value__was__x__x_._n
call fcn.004018c0
add esp, 0xc
or eax, 0xffffffff
pop esi
pop ecx
ret

Function at 0x401240
Capabilities:
Read file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
cmp dword [edi], 0
jne 0x401272
lea eax, [edi + 0x68]
push 0x421200
push eax
call fcn.00402930
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x401272
push str.Cannot_open_archive_file_n
call fcn.004018c0
add esp, 4
xor eax, eax
pop edi
ret
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push 0
push dword [ebp + 4]
call sub.WS2_32.dll_ntohl
add eax, dword [edi + 4]
push eax
push dword [edi]
call fcn.0040a448
add esp, 0xc
push dword [ebp + 8]
call sub.WS2_32.dll_ntohl
push eax
call fcn.00409dbb
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4012ba
push str.Could_not_allocate_read_buffer_n
call fcn.004018c0
add esp, 4
xor eax, eax
pop ebp
pop ebx
pop edi
ret
push dword [edi]
push 1
push dword [ebp + 8]
call sub.WS2_32.dll_ntohl
push eax
push ebx
call fcn.0040a0de
add esp, 0x10
cmp eax, 1
jae 0x4012ee
push str.Could_not_read_from_file_n
call fcn.004018c0
push ebx
call fcn.00409db6
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
ret
cmp byte [ebp + 0x10], 1
jne 0x401325
push esi
push ebp
push ebx
call fcn.00401030
push ebx
mov esi, eax
call fcn.00409db6
add esp, 0xc
mov ebx, esi
test esi, esi
pop esi
jne 0x401325
lea eax, [ebp + 0x12]
push eax
push str.Error_decompressing__s_n
call fcn.004018c0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
ret
mov eax, dword [edi]
test eax, eax
je 0x40133a
push eax
call fcn.00409e3c
add esp, 4
mov dword [edi], 0
pop ebp
mov eax, ebx
pop ebx
pop edi
ret
Function at 0x401340
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push ebp
push esi
call fcn.00401240
push esi
mov ebx, eax
call fcn.00403d70
add esp, 0xc
cmp eax, 0xffffffff
jne 0x401368
pop esi
pop ebp
or eax, eax
pop ebx
ret
push edi
lea edi, [ebp + 0x12]
lea eax, [esi + 0x2068]
push edi
push eax
call fcn.00404080
add esp, 8
mov esi, eax
push dword [ebp + 0xc]
call sub.WS2_32.dll_ntohl
mov ebp, eax
test esi, esi
jne 0x4013a7
push edi
push str._s_could_not_be_extracted__n
push str.fopen
call fcn.004018a0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
push 1
push ebp
push ebx
call fcn.0040abfd
add esp, 0x10
cmp eax, 1
je 0x4013d8
test ebp, ebp
je 0x4013d8
push edi
push str.Failed_to_write_all_bytes_for__s_n
push str.fwrite
call fcn.004018a0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.00409e3c
push ebx
call fcn.00409db6
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x4013f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x64
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
mov ebx, dword [esp + 0x70]
push esi
push edi
mov edi, dword [esp + 0x74]
lea esi, [esp + 0x14]
push 0
add ebx, 0xffffffa0
push ebx
push dword [edi]
call fcn.0040a448
add esp, 0xc
test eax, eax
jne 0x40145d
push dword [edi]
lea eax, [esp + 0x10]
push 1
push 0x60
push eax
call fcn.0040a0de
add esp, 0x10
cmp eax, 1
jb 0x40145d
nop dword [eax]
push 8
push esi
push str.MEI_f_v_n_v
call fcn.00409a60
add esp, 0xc
test eax, eax
je 0x401472
dec esi
lea eax, [esp + 0xc]
cmp esi, eax
jae 0x401440
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00407c24
add esp, 0x64
ret
movups xmm0, xmmword [esi]
movups xmmword [edi + 0x10], xmm0
movups xmm0, xmmword [esi + 0x10]
movups xmmword [edi + 0x20], xmm0
movups xmm0, xmmword [esi + 0x20]
movups xmmword [edi + 0x30], xmm0
movups xmm0, xmmword [esi + 0x30]
movups xmmword [edi + 0x40], xmm0
movups xmm0, xmmword [esi + 0x40]
movups xmmword [edi + 0x50], xmm0
movq xmm0, qword [esi + 0x50]
movq qword [edi + 0x60], xmm0
push dword [edi + 0x18]
call sub.WS2_32.dll_ntohl
lea ecx, [esp + 0xc]
sub esi, ecx
mov ecx, dword [esp + 0x6c]
add esi, ebx
sub esi, eax
xor eax, eax
add esi, 0x58
mov dword [edi + 4], esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407c24
add esp, 0x64
ret
Function at 0x401580
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
lea edi, [esi + 0x68]
push edi
push str.LOADER:_archivename_is__s_n
call fcn.004018c0
add esp, 8
cmp dword [esi], 0
jne 0x4015c4
push 0x421200
push edi
call fcn.00402930
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x4015c4
push edi
push str.LOADER:_Cannot_open_archive:__s_n
call fcn.004018c0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
ret
push esi
call fcn.00401120
add esp, 4
cmp eax, 1
jge 0x4015e7
push 2
push 0
push dword [esi]
call fcn.0040a448
push dword [esi]
call fcn.0040a9ba
add esp, 0x10
push eax
push esi
call fcn.004013f0
add esp, 8
cmp eax, 0xffffffff
jne 0x401609
push str.Loader:_Cannot_find_cookie
call fcn.004018c0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
ret
push dword [esi + 0x24]
mov dword [esi + 0x406c], 0
call sub.WS2_32.dll_ntohl
push 0
mov dword [0x42d954], eax
push dword [esi + 0x1c]
call sub.WS2_32.dll_ntohl
add eax, dword [esi + 4]
push eax
push dword [esi]
call fcn.0040a448
add esp, 0xc
push dword [esi + 0x20]
call sub.WS2_32.dll_ntohl
push eax
call fcn.00409dbb
add esp, 4
mov dword [esi + 8], eax
test eax, eax
jne 0x401668
push str.Could_not_allocate_buffer_for_TOC.
push str.malloc
call fcn.004018a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
ret
push dword [esi]
push 1
push dword [esi + 0x20]
call sub.WS2_32.dll_ntohl
push eax
push dword [esi + 8]
call fcn.0040a0de
add esp, 0x10
cmp eax, 1
jae 0x40169d
push str.Could_not_read_from_file.
push str.fread
call fcn.004018a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
ret
push dword [esi + 0x20]
call sub.WS2_32.dll_ntohl
add eax, dword [esi + 8]
push dword [esi]
mov dword [esi + 0xc], eax
call fcn.00409ee7
add esp, 4
test eax, eax
je 0x4016cc
push str.Error_on_file_n.
call fcn.004018c0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
ret
push esi
call fcn.00401220
add esp, 4
xor eax, eax
pop edi
pop esi
ret
Function at 0x403c40
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x1004
call fcn.00407c40
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x1000], eax
mov eax, dword [esp + 0x1008]
push ebx
push esi
mov esi, dword [esp + 0x1018]
push edi
mov edi, dword [esp + 0x1018]
push 0x421200
push eax
call fcn.00402930
push esi
push edi
mov ebx, eax
call fcn.00404080
add esp, 0x10
xor edi, edi
mov esi, eax
test ebx, ebx
je 0x403d3c
push ebx
test esi, esi
je 0x403d41
call fcn.00409ebc
add esp, 4
test eax, eax
jne 0x403d13
push ebx
push 1
lea eax, [esp + 0x14]
push 0x1000
push eax
call fcn.0040a0de
add esp, 0x10
cmp eax, 0xffffffff
jne 0x403cd2
push ebx
call fcn.00409ee7
add esp, 4
test eax, eax
je 0x403cf8
push ebx
jmp 0x403d08
push esi
push 1
lea eax, [esp + 0x14]
push 0x1000
push eax
call fcn.0040abfd
add esp, 0x10
test eax, eax
jle 0x403d07
push esi
call fcn.00409ee7
add esp, 4
test eax, eax
jne 0x403d07
push ebx
call fcn.00409ebc
add esp, 4
test eax, eax
je 0x403ca8
jmp 0x403d13
push esi
call fcn.0041013c
add esp, 4
or edi, 0xffffffff
push ebx
call fcn.00409e3c
push esi
call fcn.00409e3c
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.00407c24
add esp, 0x1004
ret
test esi, esi
je 0x403d49
push esi
call fcn.00409e3c
add esp, 4
mov ecx, dword [esp + 0x100c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407c24
add esp, 0x1004
ret
Function at 0x403de0
Capabilities:
Get common file path
Set environment variable

Disassembly:
mov eax, 0x302c
call fcn.00407c40
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x3028], eax
mov eax, dword [esp + 0x3030]
push ebx
push ebp
mov ebp, dword [esp + 0x303c]
mov dword [esp + 8], eax
push esi
push edi
test ebp, ebp
je 0x403e66
push 0x422d10
call fcn.00403fd0
push ebp
mov ebx, eax
lea eax, [esp + 0x3c]
push 0x1000
push eax
call fcn.004029a0
push 0
push 0x422d10
push 0
call fcn.00404f00
mov edi, eax
lea eax, [esp + 0x50]
push 0
push eax
push 0
call fcn.00404f00
mov esi, eax
push esi
push edi
call fcn.0040efd5
push edi
call fcn.00409db6
push esi
call fcn.00409db6
add esp, 0x38
jmp 0x403e6a
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x1038]
push eax
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
push 0x422d14
lea eax, [esp + 0x1c]
push 0x10
push eax
call fcn.004048c0
add esp, 0x10
xor esi, esi
nop dword [eax]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x103c]
push eax
call fcn.00410121
mov edi, eax
push edi
call fcn.00404d50
add esp, 0xc
test eax, eax
je 0x403f32
push edi
call fcn.00409db6
inc esi
add esp, 4
cmp esi, 5
jl 0x403ea0
test ebp, ebp
je 0x403f2e
push 0
push 0x422d10
push 0
call fcn.00404f00
test ebx, ebx
je 0x403f17
push 0
push ebx
push 0
mov edi, eax
call fcn.00404f00
mov esi, eax
push esi
push edi
call fcn.0040efd5
push edi
call fcn.00409db6
push esi
call fcn.00409db6
push ebx
call fcn.00409db6
add esp, 0x2c
xor eax, eax
jmp 0x403fa8
add esp, 0xc
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call fcn.00409db6
add esp, 4
xor eax, eax
jmp 0x403fa8
push 0x1000
push edi
push dword [esp + 0x18]
call fcn.00404f90
push edi
call fcn.00409db6
add esp, 0x10
test ebp, ebp
je 0x403fa3
push 0
push 0x422d10
push 0
call fcn.00404f00
test ebx, ebx
je 0x403f8c
push 0
push ebx
push 0
mov edi, eax
call fcn.00404f00
mov esi, eax
push esi
push edi
call fcn.0040efd5
push edi
call fcn.00409db6
push esi
call fcn.00409db6
push ebx
call fcn.00409db6
add esp, 0x2c
jmp 0x403fa3
add esp, 0xc
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call fcn.00409db6
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x3038]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407c24
add esp, 0x302c
ret
Function at 0x403fd0
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x4004
call fcn.00407c40
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push 0
push eax
push 0
call fcn.00404f00
add esp, 0xc
lea ecx, [esp]
push 0x2000
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x404060
push 0x2000
lea eax, [esp + 0x2004]
push eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0
lea eax, [esp + 4]
push eax
push 0
call fcn.00404f90
add esp, 0xc
test eax, eax
je 0x404060
cmp byte [eax], 0
je 0x404060
push eax
call fcn.0040e6c4
add esp, 4
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.00407c24
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4000]
xor eax, eax
xor ecx, esp
call fcn.00407c24
add esp, 0x4004
ret

Function at 0x404560
Capabilities:
Set environment variable

Disassembly:
push esi
push edi
push 0
push dword [esp + 0x10]
push 0
call fcn.00404f00
add esp, 0xc
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
mov esi, eax
call fcn.00409db6
add esp, 4
mov eax, esi
pop edi
pop esi
ret