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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10024
call fcn.1005f7d0
mov eax, dword [0x10079040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0
mov esi, ecx
mov dword [ebp - 0x10014], 0
push 0
push 0
mov edi, 1
mov dword [esi + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ebx, eax
test ebx, ebx
je 0x10032289
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
mov eax, dword [esi + 0x28]
mov dword [esi + 0x40], ebx
mov dword [ebp - 0x10010], ebx
mov dword [ebp - 0x1000c], eax
nop dword [eax + eax]
mov eax, dword [esi + 0x28]
cmp eax, 0xffffffff
je 0x10032282
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x10032282
lea eax, [esi + 0x30]
push eax
lea eax, [ebp - 0x10014]
push eax
push 0xffff
lea eax, [ebp - 0x10008]
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10032209
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x2c], eax
cmp eax, 0x3e5
jne 0x100321f7
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x10010]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, eax
test ecx, ecx
jne 0x10032279
push eax
lea eax, [ebp - 0x10014]
push eax
lea eax, [esi + 0x30]
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x10032209
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_CancelIo]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
cmp dword [ebp - 0x10014], 0
jbe 0x1003225e
lea eax, [ebp - 0x10018]
mov dword [ebp - 0x10018], esi
push eax
lea eax, [ebp - 0x10024]
push eax
call fcn.1001c0e0
mov ecx, dword [ebp - 0x1001c]
mov eax, dword [0x1007b638]
cmp byte [ecx + 0xd], 0
jne 0x10032241
cmp esi, dword [ecx + 0x10]
jae 0x10032243
mov ecx, eax
cmp ecx, eax
je 0x1003225e
push dword [ebp - 0x10014]
mov ecx, dword [ecx + 0x14]
lea edx, [ebp - 0x10008]
call fcn.10021e00
add esp, 4
test edi, edi
jne 0x10032170
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10033290
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x20]
push eax
jmp 0x100321fa
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10033290
mov esp, ebp
pop ebp
ret
Function at 0x100322b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x10079040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 8], 0
cmp dword [esi + 0x20], 0xffffffff
je 0x10032371
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0x54], eax
test eax, eax
je 0x10032371
push edi
lea edi, [esi + 0x44]
push edi
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
push ebx
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1003235b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x2c], eax
cmp eax, 0x3e5
jne 0x1003233d
push 0xffffffffffffffff
push dword [esi + 0x54]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1003233d
push eax
lea eax, [ebp - 8]
push eax
push edi
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x1003235b
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_CancelIo]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10033290
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10033290
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.10033290
mov esp, ebp
pop ebp
ret 8
Function at 0x100325a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x10079040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp byte [esi + 8], 0
mov dword [esi + 0x74], 0
jne 0x100326db
xorps xmm0, xmm0
lea eax, [esi + 0xc]
movups xmmword [esi + 0x34], xmm0
mov dword [esi + 0x44], 0
movups xmmword [esi + 0x48], xmm0
mov dword [esi + 0x58], 0
movups xmmword [esi + 0x5c], xmm0
mov dword [esi + 0x6c], 0
cmp dword [eax + 0x14], 0xf
jbe 0x100325f3
mov eax, dword [eax]
push 0
push 0x40000080
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x24], eax
cmp eax, 0xffffffff
jne 0x1003263e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x74], eax
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x24], 0xffffffff
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10033290
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 1
push 0
call edi
mov dword [esi + 0x44], eax
cmp eax, 0xffffffff
je 0x10032676
push 0
push 0
push 1
push 0
call edi
mov dword [esi + 0x58], eax
cmp eax, 0xffffffff
je 0x10032676
push 0
push 0
push 1
push 0
call edi
mov dword [esi + 0x6c], eax
cmp dword [esi + 0x44], 0
pop edi
je 0x100326db
cmp dword [esi + 0x6c], 0
je 0x100326db
cmp dword [esi + 0x58], 0
je 0x100326db
push 0xd
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_PurgeComm]
cmp dword [esi + 0x28], 0
je 0x100326a3
mov dword [esi + 0x74], 0xb7
jmp 0x100326d7
lea eax, [ebp - 8]
mov dword [esi + 0x74], 0
push eax
push 0
push esi
push 0x100326f0
push 0
push 0
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x28], eax
test eax, eax
jne 0x100326d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x74], eax
mov byte [esi + 8], 1
mov ecx, dword [ebp - 4]
mov al, byte [esi + 8]
xor ecx, ebp
pop esi
call fcn.10033290
mov esp, ebp
pop ebp
ret
Function at 0x10032700
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x10079040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ClearCommError]
push esi
mov esi, ecx
mov dword [ebp - 0x54], 0
push edi
mov edi, 1
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x50], eax
mov eax, dword [esi + 0x6c]
mov dword [ebp - 0x4c], eax
lea eax, [esi + 0x34]
mov dword [esi + 0x74], 0
mov dword [esi + 0x70], 0
push eax
lea eax, [ebp - 0x54]
push eax
push 0x41
lea eax, [ebp - 0x48]
push eax
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100327e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x74], eax
cmp eax, 0x3e5
jne 0x100327cb
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x50]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x100327a9
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [esi + 0x34]
push eax
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x100327e6
lea eax, [ebp - 0x60]
push eax
lea eax, [esi + 0x78]
push eax
push dword [esi + 0x24]
call ebx
jmp 0x100327e4
mov ecx, dword [esi + 0x24]
cmp eax, 1
jne 0x100327be
push 0
lea eax, [ebp - 0x54]
push eax
lea eax, [esi + 0x5c]
push eax
push ecx
jmp 0x10032790
lea eax, [ebp - 0x60]
push eax
lea eax, [esi + 0x78]
push eax
push ecx
call ebx
jmp 0x100327e4
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_CancelIo]
push dword [esi + 0x44]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [esi + 0x6c]
call edi
xor edi, edi
cmp dword [ebp - 0x54], 0
jbe 0x1003282e
movzx ebx, byte [ebp - 0x47]
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x70]
mov dword [ebp - 0x64], esi
push eax
call fcn.1001c0e0
mov ecx, dword [ebp - 0x68]
mov eax, dword [0x1007b638]
cmp byte [ecx + 0xd], 0
jne 0x10032813
cmp esi, dword [ecx + 0x10]
jae 0x10032815
mov ecx, eax
cmp ecx, eax
je 0x10032828
mov ecx, dword [ecx + 0x14]
lea edx, [ebp - 0x46]
push ebx
call fcn.10021e00
add esp, 4
mov ebx, dword [sym.imp.KERNEL32.dll_ClearCommError]
lea eax, [esi + 0x34]
test edi, edi
jne 0x10032744
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10033290
mov esp, ebp
pop ebp
ret
Function at 0x100328b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x10079040]
xor eax, esp
mov dword [esp + 0x68], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0xc], eax
push edi
xor edi, edi
mov byte [esp + 0xf], 1
cmp dword [esi + 0x24], 0xffffffff
jne 0x100328f3
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.10033290
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 0xc]
mov byte [esp + 0x28], 0
test eax, eax
je 0x100329fd
mov edx, 0x3f
cmp eax, 0x3f
movzx ebx, al
push 0x3f
lea eax, [esp + 0x2e]
cmovg ebx, edx
push 0
push eax
mov byte [esp + 0x35], bl
call fcn.10037990
movzx eax, bl
push eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
add eax, edi
push eax
lea eax, [esp + 0x3e]
push eax
call fcn.10037b50
add esp, 0x18
lea ebx, [esi + 0x48]
lea eax, [esp + 0x24]
push ebx
push eax
push 0x41
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100329a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x74], eax
cmp eax, 0x3e5
jne 0x1003299b
push 0xffffffffffffffff
push dword [esi + 0x58]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1003299b
push eax
lea eax, [esp + 0x28]
push eax
push ebx
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
neg eax
sbb al, al
and al, byte [esp + 0xf]
mov bl, al
mov byte [esp + 0xf], bl
jmp 0x100329a7
xor bl, bl
mov byte [esp + 0xf], bl
jmp 0x100329a7
mov bl, byte [esp + 0xf]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x14]
sub eax, ecx
add edi, ecx
mov dword [ebp + 0xc], eax
cmp byte [esi + 4], 0
je 0x100329e1
mov eax, 0x66666667
imul ecx
lea ecx, [esp + 0x18]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call fcn.10021a90
mov eax, dword [ebp + 0xc]
mov edx, 0x3f
test eax, eax
jne 0x10032908
test bl, bl
jne 0x100329fd
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_CancelIo]
xor edi, edi
mov ecx, dword [esp + 0x74]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10033290
mov esp, ebp
pop ebp
ret 8
Function at 0x10034a74
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
push 0x105
call fcn.10034505
mov edi, eax
test edi, edi
jne 0x10034a9b
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov eax, esi
jmp 0x10034ae4
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or ebx, 0xffffffff
cmp eax, ebx
je 0x10034adf
test al, 0x10
je 0x10034adf
test eax, 0x400
je 0x10034adb
push 0x2000000
push 0x80
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
call fcn.10034aea
push dword [ebp - 4]
mov esi, eax
call fcn.10034570
test esi, esi
jne 0x10034adf
xor edx, edx
jmp 0x10034ae1
mov edx, ebx
mov eax, edi
pop ebx
pop edi
pop esi
leave
ret 4

Function at 0x10034d00
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 0x10034d27
mov eax, ecx
mov dword [ebp - 4], eax
jmp 0x10034d2a
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.10034cdc
pop esi
leave
ret 8
Function at 0x1003b1c8
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1005f7d0
mov eax, dword [0x10079040]
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.1004cc32
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x1003b20a
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x1003b366
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1005f720
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 + 0x1007b088]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.1004d03b
mov ecx, dword [esi*4 + 0x1007b088]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x1003b35f
cmp eax, dword [edi + ecx + 0x24]
jne 0x1003b35f
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1003b35f
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.1004d03b
add esp, 0x14
test edx, edx
jl 0x1003b35f
jg 0x1003b2d5
test eax, eax
jb 0x1003b35f
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x1003b35f
jl 0x1003b2ef
cmp dword [ebp - 0x1008], eax
ja 0x1003b35f
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x1003b30d
test ebx, ebx
je 0x1003b346
cmp ecx, edi
jae 0x1003b346
mov al, byte [ecx]
cmp al, 0xd
jne 0x1003b327
lea eax, [edi - 1]
cmp ecx, eax
jae 0x1003b333
cmp byte [ecx + 1], 0xa
jne 0x1003b333
inc ecx
jmp 0x1003b333
movzx eax, al
movsx eax, byte [eax + 0x100793d0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x1003b30d
cmp edx, ebx
jne 0x1003b30d
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x1003b364
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.10033290
leave
ret
Function at 0x100496c8
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x10079040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x10066f10
push esi
call fcn.100549eb
pop ecx
pop ecx
test eax, eax
jne 0x100496f6
xor al, al
jmp 0x10049773
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.1004940b
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x10049730
push dword [ebp - 0x210]
call fcn.1003c0ba
xor al, al
jmp 0x10049771
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x10049736
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x10049756
push edx
call fcn.100495fe
pop ecx
test al, al
je 0x10049721
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x10049764
mov bl, 1
push dword [ebp - 0x210]
call fcn.1003c0ba
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.10033290
leave
ret
Function at 0x1004edd0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
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 + 0x1007b088]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1004ee10
cmp byte [ebx], 0xa
jne 0x1004ee10
or byte [eax + edi + 0x28], 4
jmp 0x1004ee15
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x1004ef13
mov al, byte [edx]
cmp al, 0x1a
je 0x1004eef5
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x1004ee44
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x1004ee69
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x1004ee73
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x1004ee26
jmp 0x1004ef13
push 0
lea eax, [ebp - 0xc]
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 0x1004eef0
cmp dword [ebp - 0xc], 0
je 0x1004eef0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x1007b088]
test byte [eax + edi + 0x28], 0x48
je 0x1004eeca
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x1004eeb5
mov byte [esi], dl
jmp 0x1004eec6
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1007b088]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x1004ef13
cmp byte [ebp - 1], 0xa
jne 0x1004eed9
cmp esi, ebx
jne 0x1004eed9
mov byte [esi], 0xa
jmp 0x1004ef12
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1004d059
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1004ef13
mov byte [esi], 0xd
jmp 0x1004ef12
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x1007b088]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1004ef0f
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1004ef13
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1004ef1c
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 + 0x1007b088]
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 0x1004ef5f
cmp word [esi], dx
jne 0x1004ef5f
or byte [edi + eax + 0x28], 4
jmp 0x1004ef64
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 0x1004f0b7
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 0x1004f097
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x1004efa6
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1004efdc
cmp eax, edx
jae 0x1004efe8
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 0x1004ef7e
jmp 0x1004f0b7
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 0x1004f093
cmp dword [ebp - 0x14], 0
je 0x1004f093
mov eax, dword [ebx*4 + 0x1007b088]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x1004f06b
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x1004f034
mov word [esi], cx
jmp 0x1004f067
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x1007b088]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x1007b088]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x1007b088]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x1004f0b7
pop ebx
cmp word [ebp - 4], bx
jne 0x1004f07c
cmp esi, dword [ebp + 0xc]
jne 0x1004f07c
mov word [esi], bx
jmp 0x1004f0b4
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.1004d059
add esp, 0x10
cmp word [ebp - 4], bx
je 0x1004f0b7
push 0xd
jmp 0x1004f0b0
mov ecx, dword [ebx*4 + 0x1007b088]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1004f0ae
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1004f0b7
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 0x100512bd
Capabilities:
Read file on windows

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

Function at 0x100519b0
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100688d4
push 0x100688cc
push str.FlsAlloc
push 0x1e
call fcn.1005175d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100519e4
push dword [ebp + 8]
mov ecx, esi
call dword [0x100642cc]
call esi
jmp 0x100519ea
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10051a2e
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100688e4
push 0x100688dc
push str.FlsGetValue
push 0x20
call fcn.1005175d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10051a65
push dword [ebp + 8]
mov ecx, esi
call dword [0x100642cc]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10055458
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.100553da
Function at 0x10056877
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 0x10056914
push ebx
push esi
call fcn.10056840
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.100530c0
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x100568c1
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10056913
push edi
push eax
call fcn.100512c8
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x100568e1
call fcn.1004fe6d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10056912
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.100530c0
add esp, 0x20
test eax, eax
jne 0x10056900
push edi
call fcn.1004fe6d
jmp 0x10056908
push ebx
call fcn.1004fe6d
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 0x10056917
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x10056928
pop esi
ret
push ebx
push edi
push esi
call fcn.10056840
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.100512c8
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x10056950
push ebx
push esi
push edi
call fcn.10037b50
add esp, 0xc
push 0
call fcn.1004fe6d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x10056d14
Capabilities:
Set environment variable

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