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

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x43cc8d
mov eax, dword [ebp + 8]
mov dword [eax + 8], ebx
mov dword [eax + 4], ebx
mov dword [eax], 1
pop ebx
pop ebp
ret
push esi
push edi
push 2
push 0
push 0
push ebx
call fcn.0044ce46
push ebx
call fcn.0044b43c
push 0
push 0
push 0
push ebx
mov edi, eax
mov esi, edx
call fcn.0044ce46
add esp, 0x24
test esi, esi
jg 0x43ccc8
jl 0x43ccbe
test edi, edi
jae 0x43ccc8
mov ecx, 2
jmp 0x43cd86
xor eax, eax
cmp eax, esi
jne 0x43cd81
mov esi, dword [section..data]
lea eax, [edi + 2]
push eax
mov ecx, esi
call dword [0x46b414]
call esi
mov esi, eax
add esp, 4
test esi, esi
jne 0x43cd03
mov eax, dword [ebp + 8]
pop edi
mov dword [eax + 8], esi
mov dword [eax + 4], esi
pop esi
mov dword [eax], 3
pop ebx
pop ebp
ret
push ebx
push edi
push 1
push esi
call fcn.0044e164
add esp, 0x10
cmp eax, edi
je 0x43cd44
push esi
mov esi, dword [fcn.00414530]
mov ecx, esi
call dword [0x46b414]
call esi
mov eax, dword [ebp + 8]
add esp, 4
pop edi
pop esi
mov dword [eax], 2
mov dword [eax + 8], 0
mov dword [eax + 4], 0
pop ebx
pop ebp
ret
push edi
push esi
push dword [ebp + 0x18]
call fcn.0043c7c0
add esp, 0xc
push dword [ebp + 0x1c]
push 1
push 1
push eax
push dword [ebp + 0x14]
push eax
push edi
push esi
call fcn.0043fbe0
add esp, 0xc
push eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push eax
push eax
push esi
call fcn.0043c9c0
add esp, 0x28
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret
mov ecx, 3
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword [eax], ecx
mov dword [eax + 8], 0
mov dword [eax + 4], 0
pop ebp
ret

Function at 0x45bb35
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0045b9b2
Function at 0x401ee2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x411280]
jne 0x401eec
repz ret
jmp fcn.00404399

Function at 0x402793
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
pushal
call 0x4027a2
pop dword [ebp - 0x34]
mov eax, 0xf07c88a4
add eax, 0xfc39efe
sub dword [ebp - 0x34], eax
push 0x40
push 0x1000
push 0x36dba
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x34]
call dword [eax]
mov ecx, 0x3c23
xor edi, edi
add edi, eax
mov ebx, 0x5d5c68d
add ebx, 0xfa6b7537
add ebx, dword [ebp - 0x34]
mov esi, 0x68d60422
sub esi, 0x8844820e
add dword [ebp - 0x14], 0x40c50f43
mov edx, dword [ebx]
xor dword [ebp - 0x14], esi
add edx, esi
mov dword [ebp - 0xc], 0x8d532cdf
mov dword [edi], edx
add edi, 0x20519535
sub edi, 0x20519531
add ebx, 0x937cadba
sub ebx, 0x937cadb6
loop 0x4027f8
add eax, 0xe35f
mov ebx, eax
add eax, 5
mov ecx, 0xc70460fd
sub ecx, 0xc6c460fd
add ecx, dword [ebp - 0x34]
call ebx
leave
ret
Function at 0x4026c0
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
sub esp, 0x110
lea eax, [esp + 0xc]
push ebx
push esi
push edi
push str.SYSTEMCurrentControlSetServices_
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x18]
push str.Distribugxr
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x10]
lea eax, [esp + 0x18]
push edx
push 0xf003f
push 0
push eax
push 0x80000002
call dword [0x408d60]
test eax, eax
je 0x402715
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x104
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x20]
push str.ImagePath
push eax
call dword [0x408d64]
test eax, eax
je 0x402761
mov ecx, dword [esp + 0x10]
push ecx
call dword [0x408d68]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
mov edx, dword [esp + 0x10]
push edx
call dword [0x408d68]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x402788
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
push 0
push 0
push 3
push 0
push 1
lea ecx, [esp + 0x2c]
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4027b5
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
mov dword [esp + 0xc], eax
jne 0x4027d9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x4027fb
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
mov eax, dword [esp + 0xc]
lea edx, [esp + 0xc]
push 0
push edx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40282d
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x120]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov esi, eax
test esi, esi
jne 0x40285d
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
mov edx, dword [esp + 0xc]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_UpdateResourceA]
push edx
push ebx
push 0
push 0x66
push 0xa
push esi
call ebp
mov edi, eax
test edi, edi
je 0x402896
push str.Distribugxr
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push str.Distribugxr
push 0
push 0x65
push 0xa
push esi
call ebp
mov edi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
pop ebp
test eax, eax
push ebx
jne 0x4028b7
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110
ret
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x110
ret
Function at 0x403d90
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp]
push str.Program_FilesInternet_Exploreriexplore.exe
push ecx
mov byte [esp + 0xa], 0
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [esp + 0x108]
lea edx, [esp]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, 1
add esp, 0x104
ret

Function at 0x42277d
Capabilities:
Encode data using xor

Disassembly:
lea ecx, [ebx + 7]
jmp 0x422785
push 0xffffffffffffffff
not al
xor eax, 0xc9b14524
push dword [ecx + 0x35]
xchg al, dl
inc edx
lea esi, [ecx - 7]
pop edx
or ah, 0xf8
dec ah
dec edi
xchg edi, eax
add ecx, dword [edx + ebx + 0x78]
sbb ah, 0x41
add esi, dword [ecx + 0x19]
xchg al, ah
pop edx
inc edx
lodsd eax, dword [esi]
lea edi, [eax + ebx + 5]
cmp dword [ecx + 0x11], edx
je 0x4229d6
sahf
xor eax, eax
imul eax, eax, 0xf
cmc
mov esi, esi
push eax
sahf
movzx eax, byte [edi - 5]
cld
nop
add ah, 0
neg eax
lea edx, [edx]
add dword [esp], eax
mov edx, edx
lea edi, [edi - 0xe]
xor cl, 0
sub edi, 0xfffffff1
cmp byte [edi - 5], 0xa
pop eax
ja 0x4227be
sub bh, bl
add bh, bl
cmp bh, 0xa6
mov eax, 0x644cf270
xor dword [esp - 4], eax
mov ebx, ebx
mov eax, dword [esp + 4]
xor dword [esp - 4], eax
jne 0x4227ac
nop
mov edx, edx
cld
sub ecx, 0xffffffed
add esp, 8
nop
mov ah, bh
push dword [ecx + 2]
pop edi
cmp eax, 0x4c3f9080
add edx, edx
sub al, cl
or al, ch
and al, 0x69
inc al
add edi, ebx
mov esi, dword [ecx + 0xa]
add edx, ebx
jmp 0x4228d0
mov ax, word [edx + esi]
cwde
dec ch
mov ecx, edi
not ecx
sbb cl, ch
push dword [edi + eax*4]
lea edx, [ecx + 0x2c]
add dword [esp], ebx
pop esi
mov eax, dword [esp - 8]
jmp eax
ret

Function at 0x422905
Capabilities:
Encode data using xor

Disassembly:
mov dword [esi + 0x14], 0xc
xchg dh, cl
xchg ecx, eax
cmp cl, 0xaf
mov ch, al
pop dword [esi + 0x1c]
sub ecx, 0x20
lea edi, [esi + 0x1f2f1933]
lea eax, [ebp - 0x341]
push eax
mov dword [esi + 0x18], esi
sub byte [esi + 2], 0xfc
test dh, al
push 4
or ecx, ebx
push 3
lea esi, [esi + 0x14]
xchg dh, ch
push esi
add dword [ebp - 0x394], ebp
add esi, 0xfffffffa
call dword [0xfffffc26]
sub dword [ebp - 0x394], ebp
add edx, 0x65
not dl
ret
push 0x96401cd7
call fcn.0042277d
mov dword [ebp - 0x3da], esi
inc edi
push 0x4eea76f8
call fcn.0042277d
and cl, bl
lea eax, [esp + 0x28]
cmp edi, 0xffffffd5
mov dword [esp + 0x4c], esi
xchg esi, eax
push 0x3c
mov edi, dword [esp + 0x4c]
inc eax
push esp
xchg edx, eax
inc dword [esp]
test ch, al
push dword [esp]
add ecx, 0xc1e170a7
xor eax, 0xffffffa0
mov dword [esp + 4], 1
push dword [esp]
call edi
dec byte [esp]
cld
mov dh, dh
jne 0x422935
add ah, ah
inc edi
inc edi
pop eax
push 1
call fcn.004228ef
jmp 0x422628
Function at 0x403772
Capabilities:
Parse pe header

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

Function at 0x407cb8
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsAlloc
push 0x424b4c
push str.FlsAlloc
push 0x1f
call fcn.00407b80
mov esi, eax
add esp, 0x10
test esi, esi
je 0x407cec
push dword [ebp + 8]
mov ecx, esi
call dword [0x42413c]
call esi
jmp 0x407cf2
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x407d36
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsGetValue
push 0x424b70
push str.FlsGetValue
push 0x21
call fcn.00407b80
mov esi, eax
add esp, 0x10
test esi, esi
je 0x407d6d
push dword [ebp + 8]
mov ecx, esi
call dword [0x42413c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x407d75
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsSetValue
push 0x424b84
push str.FlsSetValue
push 0x22
call fcn.00407b80
mov esi, eax
add esp, 0x10
test esi, esi
je 0x407daf
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x42413c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x4097e5
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 0x409882
push ebx
push esi
call fcn.004097ae
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.00409742
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40982f
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x409881
push edi
push eax
call fcn.00406ad1
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40984f
call fcn.00406a97
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x409880
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00409742
add esp, 0x20
test eax, eax
jne 0x40986e
push edi
call fcn.00406a97
jmp 0x409876
push ebx
call fcn.00406a97
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 0x40c5cb
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.00407550
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 0x40c63a
cmp esi, dword [ebp - 4]
je 0x40c635
cmp dword [ebp + 0xc], 0
je 0x40c635
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40c612
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0040c11d
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x40c63c
xor eax, eax
inc eax
jmp 0x40c63c
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x40c6a1
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x42d124]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.00407550
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00407550
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x40c718
cmp word [ecx], dx
je 0x40c718
mov eax, dword [0x425e2c]
push edi
dec eax
push eax
push 0x425d18
call fcn.0040c640
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x40c78b
cmp word [eax], dx
je 0x40c78b
mov eax, dword [edi]
test eax, eax
je 0x40c73c
cmp word [eax], dx
je 0x40c73c
lea eax, [ebp - 0x10]
push eax
call fcn.0040c023
jmp 0x40c745
lea eax, [ebp - 0x10]
push eax
call fcn.0040c0be
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x40c7b5
mov eax, dword [0x425d14]
push dword [ebp - 0x14]
dec eax
push eax
push 0x425a08
call fcn.0040c640
add esp, 0xc
test al, al
je 0x40c7b5
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x40c780
cmp word [eax], di
je 0x40c780
lea eax, [ebp - 0x10]
push eax
call fcn.0040c023
pop ecx
jmp 0x40c7b7
lea eax, [ebp - 0x10]
push eax
call fcn.0040c0be
jmp 0x40c77d
mov eax, dword [edi]
test eax, eax
je 0x40c7a2
cmp word [eax], dx
je 0x40c7a2
lea eax, [ebp - 0x10]
push eax
call fcn.0040bfd8
pop ecx
jmp 0x40c7b5
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x40c880
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0040c4c5
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x40c880
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x40c880
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x40c880
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40c80d
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00407eb5
test ebx, ebx
je 0x40c87b
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00407eb5
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40c880
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40c880
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.0040e7a8
add esp, 0x10
xor eax, eax
inc eax
jmp 0x40c882
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403aa5
leave
ret
Function at 0x415433
Capabilities:
Check if file exists

Disassembly:
xor eax, eax
push ebp
mov ebp, eax
mov eax, dword [0x42e458]
push esi
test eax, eax
jne 0x415458
push 0x415560
push 0x10
push 0x258
call fcn.004169dd
mov dword [0x42e458], eax
push dword [esp + 0xc]
push eax
call fcn.00416960
mov esi, eax
test esi, esi
je 0x415559
push edi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x41547a
mov edi, 0x427108
push ebx
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x41548a
xor eax, eax
cmp word [ebx], ax
jne 0x41548f
mov ebx, 0x429350
push edi
call fcn.0040ae1a
push ebx
mov dword [esp + 0x24], eax
call fcn.0040ae1a
add eax, dword [esp + 0x24]
pop ecx
pop ecx
lea eax, [eax*2 + 4]
push eax
xor eax, eax
push eax
push dword [0x42d9f8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x415540
push edi
push eax
call fcn.0041f285
mov eax, dword [esp + 0x24]
pop ecx
pop ecx
test eax, eax
je 0x4154f0
cmp word [edi + eax*2 - 2], 0x5c
mov edi, dword [esp + 0x18]
je 0x4154f4
push 0x424460
push edi
call fcn.0041f254
pop ecx
pop ecx
jmp 0x4154f4
mov edi, dword [esp + 0x18]
push ebx
push edi
call fcn.0041f254
pop ecx
pop ecx
lea eax, [esi + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x415518
xor eax, eax
mov ebp, esi
mov dword [esi + 4], eax
jmp 0x41552e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x41552c
mov dword [esi + 4], 1
mov ebp, esi
xor eax, eax
push edi
push eax
push dword [0x42d9f8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebp, ebp
jne 0x415557
cmp dword [esp + 0x14], 0xffffffff
je 0x41554b
mov esi, dword [esp + 0x14]
push esi
push dword [0x42e458]
call fcn.004168fe
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc
Function at 0x4155d6
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x41571e
xor ecx, ecx
cmp word [eax], cx
je 0x41571e
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call fcn.0041f2a7
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call fcn.0040ae1a
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x41562f
cmp eax, 3
jne 0x415669
cmp word [esp + 0xa], 0x3a
jne 0x415669
cmp eax, 2
jne 0x41564d
lea eax, [esp + 8]
push 0x424460
push eax
call fcn.0041f254
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x41571e
push 0xfffffffffffffffe
pop edi
jmp 0x41571e
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x41567e
cmp ax, bx
jne 0x415688
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x415671
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x4156c7
test byte [esp + 0x21c], 0x10
je 0x4156ae
push 0xfffffffffffffffe
pop edi
jmp 0x4156be
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x41571c
cmp word [esp + 0x10], bp
jne 0x4156d5
cmp word [esp + 0x12], bp
je 0x4156f4
cmp word [esp + 0x10], bx
jne 0x4156e3
cmp word [esp + 0x12], bx
je 0x4156f4
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x41571c
cmp word [esp + 0x12], ax
jne 0x41571c
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x415709
test al, 0x10
je 0x41571c
jmp 0x415719
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x41571c
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4

Function at 0x415740
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
cmp edi, 0xffffffff
jne 0x415759
push dword [0x42e4f4]
call fcn.00416a26
pop edi
ret 4
push esi
push edi
push dword [0x42e4f4]
call fcn.00416938
mov esi, eax
test esi, esi
je 0x4157c3
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4157af
cmp dword [esi + 0x14], 0
mov dword [esp + 0xc], 0
jne 0x41579e
push 0
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push ecx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
push dword [esi + 4]
push 0
push dword [0x42d9f8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push dword [0x42e4f4]
call fcn.004168fe
pop esi
pop edi
ret 4
Function at 0x4157d0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x41580c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x415b00
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push 0x1000
push 0
push dword [0x42d9f8]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x415c90
mov cl, byte [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x415b4e
test ebp, ebp
je 0x415bf6
dec ebp
cmp dword [ebx + 4], 0
lea edi, [ebx + 4]
je 0x415b6a
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.004160e0
mov dword [esp + 0x10], eax
jmp 0x415b84
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
mov cl, byte [esp + 0x24]
cmp eax, 1
jne 0x415bf9
test cl, cl
je 0x415b98
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x24]
mov eax, dword [esp + 0x14]
mov edi, esi
mov edx, dword [esp + 0x1c]
dec eax
sub edi, edx
cmp edi, eax
jle 0x415bd3
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x42d9f8]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x24]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [edi + edx]
test cl, cl
je 0x415bf6
cmp dword [esp + 0x28], 0
jne 0x415b40
cmp cl, 0xd
je 0x415c02
cmp cl, 0xa
jne 0x415b40
dec esi
jmp 0x415c73
lea edi, [ebx + 4]
cmp dword [esp + 0x28], 0
jne 0x415c73
jmp 0x415c05
lea edi, [ebx + 4]
cmp cl, 0xa
jne 0x415c0d
dec esi
jmp 0x415c73
cmp cl, 0xd
jne 0x415c73
dec esi
cmp dword [edi], 0
je 0x415c2b
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.004160e0
mov dword [esp + 0x10], eax
jmp 0x415c41
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x24], 0xa
je 0x415c73
cmp dword [edi], 0
je 0x415c52
inc dword [ebx + 0xc]
jmp 0x415c73
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x30]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
xor eax, eax
pop ebx
add esp, 0x10
ret 0x10