joyce8/EMBER2024-capa huggingface dataset:
Function at 0x459132
Capabilities:
Extract resource via kernel32 functions
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0x459278
mov ecx, 0x614c74
call fcn.0044dc70
mov esi, eax
test esi, esi
je 0x45926d
xor eax, eax
cmp word [esi + 8], ax
jne 0x459237
push str.comctl32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
test ebx, ebx
je 0x4591f3
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov edi, dword [ebp + 0x10]
mov ecx, 0x3ff
and ax, cx
cmp ax, 0x11
jne 0x4591b9
push str.MS_UI_Gothic
call fcn.004592b6
pop ecx
test eax, eax
je 0x4591b9
mov eax, edi
neg eax
push 0xfc11
sbb eax, eax
and eax, 0xe
add eax, 0x3ee
push eax
push 5
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
jne 0x4591d4
neg edi
push 5
sbb edi, edi
and edi, 0xe
add edi, 0x3ee
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4591f3
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
test eax, eax
je 0x4591f9
push ebx
push edi
push eax
call fcn.00458b08
add esp, 0xc
jmp 0x4591f9
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push 1
mov eax, dword [eax - 0xc]
inc eax
push eax
call fcn.00431c45
pop ecx
pop ecx
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, eax
mov dword [esi + 4], ecx
test ecx, ecx
je 0x459272
mov eax, dword [edi]
push eax
mov eax, dword [eax - 0xc]
inc eax
push eax
push ecx
call fcn.0044d4ed
mov ax, word [ebx]
add esp, 0xc
mov word [esi + 8], ax
xor eax, eax
jmp 0x45923a
mov ebx, dword [ebp + 0xc]
mov edi, dword [esi + 4]
test edi, edi
je 0x459248
push edi
call fcn.0058c690
pop ecx
mov ecx, dword [ebp + 8]
push eax
push edi
call fcn.00403010
movzx ecx, word [esi + 8]
mov edx, 0xffff
xor eax, eax
mov word [ebx], cx
pop edi
cmp cx, dx
pop esi
setne al
pop ebx
pop ebp
ret 0xc
call fcn.00430700
call fcn.0043071a
int3

Function at 0x459f44
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, ecx
lea eax, [ebp - 4]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x459f6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x459f74
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
pop esi
leave
ret
lea ecx, [esi + 0xc]
call fcn.00430b53
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push eax
call fcn.00459ac9
int3

Function at 0x45a24f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0
push esi
mov esi, ecx
jne 0x45a260
xor eax, eax
jmp 0x45a27c
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45a281
mov eax, dword [ebp - 4]
pop esi
leave
ret 8
lea ecx, [esi + 0xc]
call fcn.00430b53
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push eax
call fcn.00459ac9
int3
Function at 0x45a2f3
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, ecx
push 0
push dword [ebp + 0xc]
mov eax, dword [edi]
push dword [ebp + 8]
mov esi, dword [eax + 0x2c]
mov ecx, esi
call dword [0x5b4a74]
mov ecx, edi
call esi
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x45a326
pop edi
pop esi
pop ebp
ret 8
lea ecx, [edi + 0xc]
call fcn.00430b53
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push eax
call fcn.00459ac9
int3

Function at 0x45a3fa
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
test esi, esi
je 0x45a425
push 0
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45a42b
cmp dword [ebp - 4], esi
jne 0x45a442
pop edi
pop esi
leave
ret 8
lea ecx, [edi + 0xc]
call fcn.00430b53
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push eax
call fcn.00459ac9
lea ecx, [edi + 0xc]
call fcn.00430b53
push eax
push 0xffffffffffffffff
push 0xd
call fcn.0045971f
int3
Function at 0x45a9e9
Capabilities:
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x615780]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
push 0x128
xor edi, edi
push edi
push esi
call fcn.00578cc0
push 0xffffffffffffffff
push dword [ebx + 0xc]
lea eax, [esi + 0x24]
push 0x104
push eax
call fcn.0058c600
push eax
call fcn.00404ab0
mov eax, dword [ebx + 4]
add esp, 0x20
cmp eax, dword [0x5c2af0]
je 0x45ab47
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x40]
push ecx
lea ecx, [ebp - 0x38]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x45ab5b
lea eax, [ebp - 0x30]
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x45ab5b
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov eax, dword [ebx + 0xc]
cmp dword [eax - 0xc], edi
je 0x45aaa5
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x45aa99
lea edx, [ebp - 0x28]
push edx
push edi
push eax
call fcn.0045a7f0
neg eax
sbb eax, eax
and eax, dword [ebp - 0x28]
jmp 0x45aaa0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x45aaa7
mov eax, edi
mov ecx, esi
mov dword [ecx + 0x20], eax
lea eax, [ebp - 0x38]
push eax
call fcn.0044d488
test eax, eax
je 0x45aace
push 0xffffffffffffffff
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x50]
call fcn.0044cd9d
mov ecx, dword [eax]
mov eax, dword [eax + 4]
jmp 0x45aad2
mov ecx, edi
mov eax, edi
mov dword [esi], ecx
mov dword [esi + 4], eax
lea eax, [ebp - 0x40]
push eax
call fcn.0044d488
test eax, eax
je 0x45aaf9
push 0xffffffffffffffff
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x50]
call fcn.0044cd9d
mov ecx, dword [eax]
mov eax, dword [eax + 4]
jmp 0x45aafd
mov ecx, edi
mov eax, edi
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], eax
lea eax, [ebp - 0x48]
push eax
call fcn.0044d488
test eax, eax
je 0x45ab25
push 0xffffffffffffffff
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x50]
call fcn.0044cd9d
mov edi, dword [eax]
mov ecx, dword [eax + 4]
jmp 0x45ab27
mov ecx, edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], ecx
mov eax, dword [esi]
or eax, dword [esi + 4]
jne 0x45ab39
mov dword [esi], edi
mov dword [esi + 4], ecx
mov eax, dword [esi + 0x10]
or eax, dword [esi + 0x14]
jne 0x45ab47
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], ecx
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0057742f
leave
ret 4
xor eax, eax
jmp 0x45ab4a
Function at 0x45acc9
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
call fcn.0058e1db
pop ecx
test eax, eax
jne 0x45ad0b
push dword [ebp - 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
push str._s_s_X.tmp
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.00444eb3
add esp, 0x18
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x45acd1
leave
ret
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
leave
ret
Function at 0x47759e
Capabilities:
Get file system object information

Disassembly:
push 0x398
mov eax, 0x5a7d21
call fcn.00577c2a
mov ebx, ecx
mov ecx, dword [ebp + 0x14]
xor esi, esi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x3a0], edi
test ecx, ecx
je 0x47772f
mov eax, dword [ebp + 0x10]
sub eax, esi
je 0x477701
sub eax, 1
je 0x47761d
sub eax, 1
je 0x4775f5
sub eax, 1
je 0x47761d
push 0x5b71db
mov ecx, edi
call fcn.00430960
mov eax, edi
call fcn.00577bd9
ret 0x10
push 0x408
push 0x160
lea eax, [ebp - 0x39c]
push eax
push esi
push dword [ecx + 4]
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
test eax, eax
je 0x4775df
lea eax, [ebp - 0x28c]
push eax
jmp 0x4775e4
lea eax, [ebp - 0x114]
push eax
push dword [ecx + 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4775df
push esi
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x23c], esi
push eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x238], esi
push eax
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x22c], esi
mov dword [ebp - 0x228], esi
call fcn.0045ab5f
test eax, eax
je 0x4775df
lea ecx, [ebp - 0x3a0]
call fcn.004034e0
cmp dword [ebp + 0x10], 1
mov dword [ebp - 4], esi
jne 0x4776b7
test byte [ebp - 0x21c], 0x18
jne 0x4776d9
mov eax, dword [ebx]
lea ecx, [ebp - 0x3a0]
push ecx
push dword [ebp - 0x220]
mov esi, dword [eax + 0x1a0]
mov ecx, esi
push dword [ebp - 0x224]
call dword [0x5b4a74]
mov ecx, ebx
call esi
jmp 0x4776d9
mov eax, dword [ebx]
lea ecx, [ebp - 0x3a0]
push ecx
lea ecx, [ebp - 0x234]
push ecx
mov esi, dword [eax + 0x1a4]
mov ecx, esi
call dword [0x5b4a74]
mov ecx, ebx
call esi
mov eax, dword [ebp - 0x3a0]
add eax, 0xfffffff0
push eax
call fcn.00402c60
pop ecx
mov ecx, dword [ebp - 0x3a0]
add eax, 0x10
mov dword [edi], eax
lea ecx, [ecx - 0x10]
call fcn.00431417
jmp 0x4775eb
push 0x208
push 0x160
lea eax, [ebp - 0x39c]
push eax
push esi
push dword [ecx + 4]
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
test eax, eax
je 0x4775df
lea eax, [ebp - 0x390]
jmp 0x47761a
call fcn.00430700
int3

Function at 0x4778a7
Capabilities:
Get common file path

Disassembly:
push esi
mov esi, ecx
call fcn.004c515a
call fcn.0043e1c5
cmp dword [eax + 0x14], 0
jne 0x4778c2
mov ecx, esi
pop esi
jmp fcn.00476bc0
pop esi
ret

Function at 0x47823d
Capabilities:
Get file system object information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
mov eax, dword [0x615780]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x168], esi
test eax, eax
je 0x4782a7
push 0x208
push 0x160
lea ecx, [ebp - 0x164]
push ecx
push 0
push dword [eax + 4]
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
mov ecx, esi
test eax, eax
je 0x47828c
lea eax, [ebp - 0x158]
push eax
jmp 0x478291
push 0x5c62c8
call fcn.00430960
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0057742f
leave
ret 8
call fcn.00430700
int3

Function at 0x47878c
Capabilities:
Get common file path
Get file system object information

Disassembly:
push esi
mov esi, ecx
call fcn.00402b40
call fcn.0043e1c5
cmp dword [eax + 0x14], 0
jne 0x4787a7
mov ecx, esi
pop esi
jmp fcn.00477fe7
pop esi
ret
Function at 0x480038
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
push edi
test esi, esi
jne 0x480051
call fcn.0043e171
mov esi, dword [eax + 0xc]
push 0x5c6d4c
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x480093
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x480093
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x480093
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp - 4]
push eax
push ebx
call fcn.0048009c
jmp 0x480095
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x51aeb5
Capabilities:
Create process on windows

Disassembly:
push esi
mov esi, dword [ecx + 0x14]
cmp dword [esi - 0xc], 0
je 0x51aeeb
push ebx
mov ebx, dword [ecx + 8]
push edi
mov edi, dword [ecx + 0xc]
call fcn.0043567c
test eax, eax
je 0x51aed3
mov eax, dword [eax + 0x20]
push 1
push edi
push ebx
push esi
push 0
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp eax, 0x20
pop edi
sbb eax, eax
pop ebx
inc eax
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x53a390
Capabilities:
Log keystrokes via polling
Open clipboard
Write clipboard data

Disassembly:
push 8
mov eax, 0x5aac82
call fcn.00577bf7
mov edi, ecx
mov ebx, dword [ebp + 8]
cmp dword [ebx + 4], 0x100
jne 0x53a476
mov esi, dword [ebx + 8]
push 0x11
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
bt ax, 0xf
jae 0x53a476
cmp esi, 0x43
je 0x53a3d2
cmp esi, 0x2d
jne 0x53a476
push dword [edi + 0x20]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x53a476
call dword [sym.imp.USER32.dll_EmptyClipboard]
lea ecx, [ebp - 0x10]
call fcn.004034e0
movzx eax, byte [edi + 0xe6]
and dword [ebp - 4], 0
push eax
movzx eax, byte [edi + 0xe5]
push eax
movzx eax, byte [edi + 0xe4]
push eax
lea eax, [ebp - 0x10]
push str.RGB__d___d___d_
push eax
call fcn.004038f0
mov esi, dword [ebp - 0x10]
add esp, 0x14
lea eax, [esi - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [eax + 4]
inc eax
push eax
push 0x2000
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x53a464
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x53a464
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
call dword [sym.imp.USER32.dll_CloseClipboard]
mov ecx, dword [ebp - 0x14]
or dword [ebp - 4], 0xffffffff
call fcn.00431417
push ebx
mov ecx, edi
call fcn.005386e3
call fcn.00577bc5
ret 4

Function at 0x5780ed
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x57812c
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x57812c
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x57812c
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x57812c
cmp dword [ecx + 0x74], 0xe
jbe 0x57812c
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x589f48
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 + 0x61ecc8]
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 0x589f88
cmp byte [ebx], 0xa
jne 0x589f88
or byte [eax + edi + 0x28], 4
jmp 0x589f8d
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x58a08b
mov al, byte [edx]
cmp al, 0x1a
je 0x58a06d
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x589fbc
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x589fe1
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x589feb
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 0x589f9e
jmp 0x58a08b
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 0x58a068
cmp dword [ebp - 0xc], 0
je 0x58a068
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x61ecc8]
test byte [eax + edi + 0x28], 0x48
je 0x58a042
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x58a02d
mov byte [esi], dl
jmp 0x58a03e
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x61ecc8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x58a08b
cmp byte [ebp - 1], 0xa
jne 0x58a051
cmp esi, ebx
jne 0x58a051
mov byte [esi], 0xa
jmp 0x58a08a
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00589eea
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x58a08b
mov byte [esi], 0xd
jmp 0x58a08a
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x61ecc8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x58a087
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x58a08b
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x58a094
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 + 0x61ecc8]
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 0x58a0d7
cmp word [esi], dx
jne 0x58a0d7
or byte [edi + eax + 0x28], 4
jmp 0x58a0dc
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 0x58a22f
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 0x58a20f
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x58a11e
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x58a154
cmp eax, edx
jae 0x58a160
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 0x58a0f6
jmp 0x58a22f
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 0x58a20b
cmp dword [ebp - 0x14], 0
je 0x58a20b
mov eax, dword [ebx*4 + 0x61ecc8]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x58a1e3
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x58a1ac
mov word [esi], cx
jmp 0x58a1df
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x61ecc8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x61ecc8]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x61ecc8]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x58a22f
pop ebx
cmp word [ebp - 4], bx
jne 0x58a1f4
cmp esi, dword [ebp + 0xc]
jne 0x58a1f4
mov word [esi], bx
jmp 0x58a22c
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00589eea
add esp, 0x10
cmp word [ebp - 4], bx
je 0x58a22f
push 0xd
jmp 0x58a228
mov ecx, dword [ebx*4 + 0x61ecc8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x58a226
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x58a22f
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 0x593a3f
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5e8378
push 0x5e8370
push str.FlsAlloc
push 0x1e
call fcn.0059386c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x593a73
push dword [ebp + 8]
mov ecx, esi
call dword [0x5b4a74]
call esi
jmp 0x593a79
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x593abd
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5e8388
push 0x5e8380
push str.FlsGetValue
push 0x20
call fcn.0059386c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x593af4
push dword [ebp + 8]
mov ecx, esi
call dword [0x5b4a74]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x596210
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.0059618c
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x596388
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x596388
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x596337
jg 0x596269
test eax, eax
je 0x59632d
push 1
push 0x1000
call fcn.0059560a
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x59628f
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x596324
push 0x8000
push ebx
call fcn.005915a3
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 0x5962bb
jg 0x5962b6
cmp ecx, 0x1000
jb 0x5962bb
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0058b1ae
add esp, 0x10
cmp eax, 0xffffffff
je 0x596300
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 0x5962b6
jl 0x5962e7
test ecx, ecx
jne 0x5962a8
push dword [ebp - 0xc]
push ebx
call fcn.005915a3
push esi
call fcn.00592eb1
add esp, 0xc
xor edi, edi
jmp 0x596399
cmp byte [edi + 0x24], 0
je 0x596317
cmp dword [edi + 0x20], 5
jne 0x596317
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x596322
mov edi, dword [edi + 0x18]
jmp 0x596324
xor edi, edi
push esi
call fcn.00592eb1
pop ecx
jmp 0x596399
test ecx, ecx
jg 0x5962f9
jl 0x596337
test eax, eax
jae 0x5962f9
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00589eea
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x59635a
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x5962f9
jmp 0x596391
push ebx
call fcn.0058fb82
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x5962f9
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 0x596399
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x596396
mov edi, dword [edi + 0x18]
jmp 0x596399
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00589eea
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x599ffc
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 0x59a099
push ebx
push esi
call fcn.00599fc5
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.005960a3
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x59a046
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x59a098
push edi
push eax
call fcn.0059357d
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x59a066
call fcn.00592eb1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x59a097
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.005960a3
add esp, 0x20
test eax, eax
jne 0x59a085
push edi
call fcn.00592eb1
jmp 0x59a08d
push ebx
call fcn.00592eb1
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 0x59a09c
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x59a0ad
pop esi
ret
push ebx
push edi
push esi
call fcn.00599fc5
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0059357d
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x59a0d5
push ebx
push esi
push edi
call fcn.00578e20
add esp, 0xc
push 0
call fcn.00592eb1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x59a499
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0059a0ea
Function at 0x5a1bc0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x5a1bed
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x5a1bed
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret