joyce8/EMBER2024-capa huggingface dataset:
Function at 0x54d5b0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, dword [esp + 0x2c]
push edi
xor edi, edi
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x54d787
mov eax, dword [eax + 0x1c]
mov ebx, edi
inc edi
mov dword [esp + 0x20], ebx
test eax, eax
jne 0x54d5c7
test edi, edi
je 0x54d787
lea eax, [edi + edi*4]
shl eax, 3
push esi
push eax
mov dword [esp + 0x2c], eax
call dword [0x5f09c4]
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
test esi, esi
jne 0x54d607
lea eax, [esi + 0xf]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret
mov ebp, dword [ebp + 0x1c]
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebp
test edi, edi
jle 0x54d70c
mov ebx, dword [esp + 0x30]
lea ecx, [esi + 0x24]
mov dword [esp + 0x10], ecx
mov dword [ecx], eax
mov dword [ecx - 0x24], ebp
mov ebp, dword [ebp + 0x18]
movzx ecx, word [ebp]
mov eax, ecx
sub eax, 2
je 0x54d64d
sub eax, 0x15
je 0x54d646
xor eax, eax
jmp 0x54d6da
mov eax, 0x1c
jmp 0x54d652
mov eax, 0x10
push 0x11
push 2
push ecx
push ebx
mov dword [esp + 0x24], eax
call fcn.00549f40
mov esi, eax
add esp, 0x10
cmp esi, 0xffffffff
jne 0x54d680
call fcn.0055c079
cmp dword [eax], 0x273f
jne 0x54d76d
xor eax, eax
jmp 0x54d6da
push dword [esp + 0x14]
push ebp
push esi
push ebx
call fcn.00549ea0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x54d6af
call fcn.0055c079
cmp dword [eax], 0x2714
je 0x54d680
push esi
push ebx
call fcn.00549e70
add esp, 8
xor eax, eax
jmp 0x54d6da
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
add eax, 0xffffffe4
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
push esi
push ebx
test eax, eax
jne 0x54d765
call fcn.00549e70
add esp, 8
mov eax, 1
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
mov dword [ecx - 0x20], eax
add ecx, 0x28
mov eax, dword [esp + 0x18]
mov ebp, dword [ebp + 0x1c]
inc eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ebp
cmp eax, edi
jl 0x54d627
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
push 0x54da50
push 0x28
push edi
push esi
call fcn.00570020
mov ecx, dword [esp + 0x44]
add esp, 0x10
mov eax, dword [esi]
mov dword [ecx + 0x1c], eax
test ebx, ebx
jle 0x54d742
mov ecx, esi
nop dword [eax]
mov eax, dword [ecx + 0x28]
lea edx, [ecx + 0x28]
mov ecx, dword [ecx]
mov dword [ecx + 0x1c], eax
lea ecx, [edx]
sub ebx, 1
jne 0x54d730
mov eax, dword [esp + 0x28]
push esi
mov eax, dword [eax + esi - 0x28]
mov dword [eax + 0x1c], 0
call dword [0x5f09cc]
add esp, 4
xor eax, eax
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret
call fcn.00549e70
add esp, 8
push dword [esp + 0x20]
call dword [0x5f09cc]
add esp, 4
mov eax, 4
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1c
ret
Function at 0x54ebe0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
push edi
xor edi, edi
test ebx, ebx
jle 0x54ec82
mov esi, dword [esp + 0x18]
xor ecx, ecx
add esi, 4
mov edx, esi
nop dword [eax]
mov ebp, dword [edx]
mov eax, SysReAllocString
sub eax, edi
cmp ebp, eax
ja 0x54ec82
inc ecx
add edi, ebp
add edx, 8
cmp ecx, ebx
jl 0x54ec00
test edi, edi
jne 0x54ec22
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push edi
call dword [0x5f09c4]
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x54ec44
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
mov ebp, eax
push dword [esi]
push dword [esi - 4]
push ebp
call fcn.005577f0
add ebp, dword [esi]
lea esi, [esi + 8]
add esp, 0xc
sub ebx, 1
jne 0x54ec46
push ebx
push edi
mov edi, dword [esp + 0x24]
push edi
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_send]
push edi
mov esi, eax
call dword [0x5f09cc]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
push 0x2726
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
Function at 0x553375
Capabilities:
Parse pe header

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

Function at 0x5548b7
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
xor ecx, ecx
test eax, eax
jne 0x5548de
mov eax, ecx
mov dword [ebp - 4], eax
jmp 0x5548e1
mov eax, dword [ebp - 4]
push esi
mov esi, dword [ebp + 0xc]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.00554893
pop esi
leave
ret 8

Function at 0x55687a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x55689b
jl 0x556892
test edi, edi
jne 0x55689b
xor eax, eax
xor edx, edx
jmp 0x55695c
cmp dword [ebx + 0x38], 0
je 0x5568b0
push eax
push edi
push dword [ebp + 8]
call fcn.0043c880
jmp 0x55695c
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x5568f7
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x5568f7
cmp eax, edi
jb 0x5568d1
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.005577f0
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x5568fd
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x556951
mov ecx, ebx
call fcn.005561eb
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x55693c
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.0056ab04
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x556951
jmp 0x55690f
test edx, edx
je 0x556951
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.0056ab04
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc
Function at 0x56e437
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00552760
mov eax, dword [0x5f0a00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00570e8b
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x56e479
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x56e5d5
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.005528b0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x60a7c0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.005745d5
mov ecx, dword [esi*4 + 0x60a7c0]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x56e5ce
cmp eax, dword [ecx + edi + 0x24]
jne 0x56e5ce
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x56e5ce
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005745d5
add esp, 0x14
test edx, edx
jl 0x56e5ce
jg 0x56e544
test eax, eax
jb 0x56e5ce
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x56e5ce
jl 0x56e55e
cmp dword [ebp - 0x1008], eax
ja 0x56e5ce
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x56e57c
test ebx, ebx
je 0x56e5b5
cmp ecx, edi
jae 0x56e5b5
mov al, byte [ecx]
cmp al, 0xd
jne 0x56e596
lea eax, [edi - 1]
cmp ecx, eax
jae 0x56e5a2
cmp byte [ecx + 1], 0xa
jne 0x56e5a2
inc ecx
jmp 0x56e5a2
movzx eax, al
movsx eax, byte [eax + 0x5f0d28]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x56e57c
cmp edx, ebx
jne 0x56e57c
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x56e5d3
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00551e44
leave
ret
Function at 0x573a5c
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x5f0a00]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x5c5454
push esi
call fcn.00572614
pop ecx
pop ecx
test eax, eax
jne 0x573a8a
xor al, al
jmp 0x573b07
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.00573791
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x573ac4
push dword [ebp - 0x210]
call fcn.0055ba5c
xor al, al
jmp 0x573b05
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x573aca
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x573aea
push edx
call fcn.00573993
pop ecx
test al, al
je 0x573ab5
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x573af8
mov bl, 1
push dword [ebp - 0x210]
call fcn.0055ba5c
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00551e44
leave
ret
Function at 0x577ebb
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x60a7c0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x577efb
cmp byte [ebx], 0xa
jne 0x577efb
or byte [edi + eax + 0x28], 4
jmp 0x577f00
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x577fff
mov dl, byte [eax]
cmp dl, 0x1a
je 0x577fe2
inc eax
cmp dl, 0xd
je 0x577f2c
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x577f52
cmp eax, ecx
jae 0x577f60
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x577f14
jmp 0x577fff
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x577fdd
cmp dword [ebp - 0x10], 0
je 0x577fdd
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x60a7c0]
test byte [eax + edi + 0x28], 0x48
je 0x577fb7
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x577fa2
mov byte [esi], dl
jmp 0x577fb3
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x60a7c0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x577fff
cmp byte [ebp - 1], 0xa
jne 0x577fc6
cmp esi, ebx
jne 0x577fc6
mov byte [esi], 0xa
jmp 0x577ffe
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.005745f3
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x577fff
mov byte [esi], 0xd
jmp 0x577ffe
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x60a7c0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x577ffc
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x577fff
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x578008
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x60a7c0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x57804e
cmp word [ebx], dx
jne 0x57804e
or byte [eax + edi + 0x28], 4
jmp 0x578053
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x5781b6
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x578196
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x578094
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5780ca
cmp eax, edx
jae 0x5780d8
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x57806f
jmp 0x5781b6
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x578191
cmp dword [ebp - 0x18], 0
je 0x578191
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x60a7c0]
test byte [eax + edi + 0x28], 0x48
je 0x578167
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x57812b
mov word [esi], cx
jmp 0x578162
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x60a7c0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x60a7c0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x60a7c0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x5781b6
pop eax
cmp word [ebp - 4], ax
jne 0x578177
cmp esi, ebx
jne 0x578177
mov word [esi], ax
jmp 0x5781b3
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.005745f3
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x5781b6
push 0xd
pop eax
jmp 0x578172
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x60a7c0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x5781b0
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x5781b6
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x57b70b
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5c6b98
push 0x5c6b90
push str.FlsAlloc
push 0x1f
call fcn.0057b536
mov esi, eax
add esp, 0x10
test esi, esi
je 0x57b73f
push dword [ebp + 8]
mov ecx, esi
call dword [0x599800]
call esi
jmp 0x57b745
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x57b789
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5c6ba8
push 0x5c6ba0
push str.FlsGetValue
push 0x21
call fcn.0057b536
mov esi, eax
add esp, 0x10
test esi, esi
je 0x57b7c0
push dword [ebp + 8]
mov ecx, esi
call dword [0x599800]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x57b7c8
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5c6bb0
push 0x5c6ba8
push str.FlsSetValue
push 0x22
call fcn.0057b536
mov esi, eax
add esp, 0x10
test esi, esi
je 0x57b802
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x599800]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x57fb85
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]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.0057fb01
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x57fcf4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x57fcf4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x57fca9
jg 0x57fbe1
test eax, eax
je 0x57fc9f
push 1
push 0x1000
call fcn.0057ac0b
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x57fc04
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x57fc96
push 0x8000
push ebx
call fcn.00575dfa
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x57fc2d
jg 0x57fc28
cmp ecx, 0x1000
jb 0x57fc2d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00579125
add esp, 0x10
cmp eax, 0xffffffff
je 0x57fc72
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 0x57fc28
jl 0x57fc59
test ecx, ecx
jne 0x57fc1a
push dword [ebp - 0xc]
push ebx
call fcn.00575dfa
push esi
call fcn.0057ab83
add esp, 0xc
xor ebx, ebx
jmp 0x57fd02
cmp byte [edi + 0x24], 0
je 0x57fc89
cmp dword [edi + 0x20], 5
jne 0x57fc89
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x57fc94
mov ebx, dword [edi + 0x18]
jmp 0x57fc96
xor ebx, ebx
push esi
call fcn.0057ab83
pop ecx
jmp 0x57fd02
test ecx, ecx
jg 0x57fc6b
jl 0x57fca9
test eax, eax
jae 0x57fc6b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005745f3
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x57fcc9
cmp byte [edi + 0x1c], 0
je 0x57fc6b
jmp 0x57fcfa
push ebx
call fcn.0057226f
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x57fc6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x57fd02
cmp byte [edi + 0x1c], 0
je 0x57fcff
mov ebx, dword [edi + 0x18]
jmp 0x57fd02
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.005745f3
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x58097c
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x5f0a00]
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 0x5809c7
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00580b17
test al, al
jne 0x5809c1
sub edx, 2
cmp edx, edi
jne 0x5809a7
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x5809e9
lea eax, [edi + 2]
cmp edx, eax
je 0x5809e9
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.005808c8
add esp, 0x10
jmp 0x580ae3
push esi
lea ecx, [ebp - 0x255]
call fcn.00580b17
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 0x580a2c
push dword [ebp - 0x25c]
jmp 0x5809d9
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 0x580a69
cmp word [ebp - 0x226], 0
je 0x580a8a
cmp word [ebp - 0x226], ax
jne 0x580a69
cmp word [ebp - 0x224], 0
je 0x580a8a
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.005808c8
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x580ad6
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x580a43
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x580abe
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x580ae3
push 0x5806f8
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00570020
add esp, 0x10
jmp 0x580ab3
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.00551e44
leave
ret
Function at 0x5813f9
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 0x581496
push ebx
push esi
call fcn.005813c2
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.0057e8a8
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x581443
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x581495
push edi
push eax
call fcn.0057abbd
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x581463
call fcn.0057ab83
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x581494
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0057e8a8
add esp, 0x20
test eax, eax
jne 0x581482
push edi
call fcn.0057ab83
jmp 0x58148a
push ebx
call fcn.0057ab83
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 0x581499
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x5814aa
pop esi
ret
push ebx
push edi
push esi
call fcn.005813c2
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0057abbd
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x5814d2
push ebx
push esi
push edi
call fcn.005577f0
add esp, 0xc
push 0
call fcn.0057ab83
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x581c2c
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00581747

Function at 0x583e3c
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.0057afa6
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x583eab
cmp esi, dword [ebp - 4]
je 0x583ea6
cmp dword [ebp + 0xc], 0
je 0x583ea6
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x583e83
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0058398e
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x583ead
xor eax, eax
inc eax
jmp 0x583ead
xor eax, eax
pop edi
pop esi
leave
ret