joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5473a0
Capabilities:
Initialize winsock library

Disassembly:
mov eax, dword [0x62cf38]
nop
cmp eax, 2
je 0x547454
push esi
push edi
call fcn.0053fbf0
mov esi, eax
mov ecx, 1
mov edi, 0x62cf38
xor eax, eax
lock cmpxchg dword [edi], ecx
test eax, eax
je 0x547417
sub eax, 0
je 0x547417
sub eax, 1
je 0x5473f0
sub eax, 1
je 0x547452
push 1
push str.Unknown_WinSock_state.
mov ecx, esi
call fcn.0053fbc0
pop edi
pop esi
ret
mov eax, dword [0x62cf38]
nop
sub eax, 1
je 0x547410
sub eax, 1
je 0x547452
push 1
push str.Unknown_WinSock_state.
mov ecx, esi
call fcn.0053fbc0
jmp 0x5473f0
call fcn.005408a0
jmp 0x5473f0
push 0x62cda8
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x547444
xor ecx, ecx
mov eax, 1
lock cmpxchg dword [edi], ecx
push 1
push str.Could_not_initialize_WinSock.
mov ecx, esi
call fcn.0053fbc0
mov ecx, 2
mov eax, 1
lock cmpxchg dword [edi], ecx
pop edi
pop esi
ret

Function at 0x547460
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_recv]
push esi
push edi
mov edi, dword [esp + 0x18]
xor esi, esi
mov eax, dword [edi + 4]
push 0
sub eax, esi
push eax
mov eax, dword [edi + 0x10]
add eax, esi
push eax
push ebx
call ebp
cmp eax, 0xffffffff
je 0x54749c
test eax, eax
je 0x547495
add esi, eax
cmp esi, dword [edi + 4]
jl 0x547474
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.00584c0f
pop edi
mov dword [eax], esi
or eax, 0xffffffff
pop esi
pop ebp
pop ebx
ret
Function at 0x547590
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x14]
xor ebx, ebx
push esi
push edi
xor edi, edi
test ebp, ebp
je 0x547643
cmp ebp, 0x1fffffff
ja 0x5476b8
lea edi, [ebp*8]
cmp edi, 0x1000
jb 0x5475eb
lea eax, [edi + 0x23]
cmp eax, edi
jbe 0x5476bd
push eax
call fcn.005702a9
add esp, 4
test eax, eax
je 0x5476b3
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov esi, ecx
add edi, ecx
mov dword [ecx - 4], eax
jmp 0x547602
test edi, edi
je 0x5475fc
push edi
call fcn.005702a9
add esp, 4
mov ecx, eax
jmp 0x5475fe
xor ecx, ecx
mov esi, ecx
add edi, esi
lea eax, [ebp*8]
push eax
push 0
push ecx
call fcn.00572a00
mov ebx, dword [esp + 0x2c]
add esp, 0xc
xor edx, edx
mov dword [esp + 0x10], esi
nop
xorps xmm0, xmm0
lea esi, [esi + 8]
movq qword [esi - 8], xmm0
mov ecx, dword [ebx + edx*4]
inc edx
mov eax, dword [ecx + 0x10]
mov dword [esi - 4], eax
mov eax, dword [ecx + 8]
mov dword [esi - 8], eax
cmp edx, ebp
jne 0x547620
mov ebx, dword [esp + 0x10]
push 0
push 0
push 0
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0
push eax
push ebp
push ebx
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x54767a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.00584c0f
mov dword [eax], esi
xor esi, esi
jmp 0x54767e
mov esi, dword [esp + 0x1c]
test ebx, ebx
je 0x5476ab
sub edi, ebx
and edi, 0xfffffff8
cmp edi, 0x1000
jb 0x5476a1
mov ecx, dword [ebx - 4]
add edi, 0x23
sub ebx, ecx
lea eax, [ebx - 4]
cmp eax, 0x1f
ja 0x5476b3
mov ebx, ecx
push edi
push ebx
call fcn.005702d9
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
pop ecx
ret
call fcn.00584b21
call fcn.0052bbf0
call fcn.0047a370
int3
Function at 0x548510
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c32ee
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push esi
push edi
mov eax, dword [0x6218c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x10]
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
push eax
push esi
mov dword [ebp - 4], 0
movups xmmword [esi], xmm0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov dword [ebp - 0x10], 0x8007
call fcn.004794a0
mov edx, eax
mov dword [esi + 0x10], 0x8000
mov eax, dword [ebp - 0x10]
mov ecx, 0x4000
mov dword [esi + 0x14], eax
mov edi, edx
xor eax, eax
mov dword [esi], edx
rep stosd dword es:[edi], eax
add esp, 8
mov word [edx + 0x10000], ax
cmp dword [esi + 0x14], 7
mov dword [ebp - 4], eax
mov eax, esi
mov dword [ebp - 0x14], 1
jbe 0x5485ae
mov eax, dword [esi]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x5485e7
cmp eax, dword [esi + 0x10]
jae 0x5485e7
mov dword [esi + 0x10], eax
mov ecx, esi
cmp dword [esi + 0x14], 7
jbe 0x5485ce
mov ecx, dword [esi]
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.GetCurrentDirectory
lea ecx, [ebp - 0x20]
call fcn.00522760
push 0x616b4c
lea eax, [ebp - 0x20]
push eax
call fcn.00572059
int3
Function at 0x54e660
Capabilities:
Access the windows event log

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0xe0], 0
jne 0x54e681
push str.NT_EventLog_not_opened.
call fcn.00528240
mov ecx, eax
call fcn.0053ff80
pop esi
ret 4
push edi
mov edi, dword [esp + 0xc]
push edi
call fcn.0053efe0
cmp dword [eax + 0x10], 0x7c5f
jbe 0x54e6af
mov dword [eax + 0x10], 0x7c5f
mov ecx, eax
cmp dword [eax + 0x14], 7
jbe 0x54e6a6
mov ecx, dword [eax]
xor edx, edx
mov word [ecx + 0xf8be], dx
cmp dword [eax + 0x14], 7
jbe 0x54e6b7
mov eax, dword [eax]
push 0
mov dword [esp + 0x10], eax
mov ecx, esi
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi]
push 0
push 1
push dword [esi + 0xe4]
push 0x1000
push edi
call dword [eax + 0x24]
movzx eax, ax
mov ecx, esi
push eax
mov eax, dword [esi]
push edi
call dword [eax + 0x20]
movzx eax, ax
push eax
push dword [esi + 0xe0]
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
pop edi
test eax, eax
jne 0x54e70c
push eax
push str.Cannot_report_event_in_NT_EventLog.
call fcn.00528240
mov ecx, eax
call fcn.0053fbc0
pop esi
ret 4
Function at 0x5582d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x558455
cmp dword [esi + 0x20], 0
je 0x558455
cmp dword [esi + 0x24], 0
je 0x558455
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x558455
cmp dword [eax], esi
jne 0x558455
mov eax, dword [eax + 4]
cmp eax, 0x2a
je 0x558335
cmp eax, 0x39
je 0x558335
cmp eax, 0x45
je 0x558335
cmp eax, 0x49
je 0x558335
cmp eax, 0x5b
je 0x558335
cmp eax, 0x67
je 0x558335
cmp eax, 0x71
je 0x558335
cmp eax, 0x29a
jne 0x558455
push edi
mov edi, dword [esi + 0x1c]
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x2c], 2
mov ecx, dword [edi + 0x18]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], eax
test ecx, ecx
jns 0x55836e
neg ecx
mov dword [edi + 0x18], ecx
cmp ecx, 2
mov eax, 0x2a
push 0
mov edx, 0x39
cmove eax, edx
push 0
mov dword [edi + 4], eax
push 0
jne 0x558390
call fcn.00556360
jmp 0x558395
call fcn.00558e80
add esp, 0xc
mov dword [esi + 0x30], eax
mov dword [edi + 0x28], 0xfffffffe
push edi
call fcn.00559fe0
mov esi, dword [esi + 0x1c]
xor edx, edx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x4c]
add eax, eax
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x44]
mov word [eax + ecx*2 - 2], dx
mov eax, dword [esi + 0x4c]
lea eax, [eax*2 - 2]
push eax
push edx
push dword [esi + 0x44]
call fcn.00572a00
mov eax, dword [esi + 0x84]
add esp, 0x10
lea ecx, [eax + eax*2]
movzx eax, word [ecx*4 + 0x5e908a]
mov dword [esi + 0x80], eax
movzx eax, word [ecx*4 + 0x5e9088]
mov dword [esi + 0x8c], eax
movzx eax, word [ecx*4 + 0x5e908c]
mov dword [esi + 0x90], eax
xor eax, eax
movzx ecx, word [ecx*4 + 0x5e908e]
pop edi
mov dword [esi + 0x7c], ecx
mov dword [esi + 0x6c], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x74], 0
mov dword [esi + 0x16b4], 0
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
mov dword [esi + 0x68], 0
mov dword [esi + 0x48], 0
pop esi
ret
mov eax, 0xfffffffe
pop esi
ret
Function at 0x55db28
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 0x55db4f
mov eax, ecx
mov dword [ebp - 4], eax
jmp 0x55db52
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.0055db04
pop esi
leave
ret 8

Function at 0x5700a1
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
call fcn.00596896
push 2
lea ecx, [ebp - 4]
push ecx
mov eax, dword [eax + 0x14]
push 0x22
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
movzx eax, word [ebp - 4]
sub eax, 0x30
je 0x5700e0
sub eax, 1
je 0x5700db
sub eax, 1
je 0x5700d7
xor eax, eax
leave
ret
push 3
jmp 0x5700e2
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret

Function at 0x571664
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x5716a3
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x5716a3
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x5716a3
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x5716a3
cmp dword [ecx + 0x74], 0xe
jbe 0x5716a3
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x590a61
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.005709e0
mov eax, dword [0x6218c0]
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.0059bd87
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x590aa3
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x590bff
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00570330
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 + 0x62df58]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00592b78
mov ecx, dword [esi*4 + 0x62df58]
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 0x590bf8
cmp eax, dword [ecx + edi + 0x24]
jne 0x590bf8
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 0x590bf8
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00592b78
add esp, 0x14
test edx, edx
jl 0x590bf8
jg 0x590b6e
test eax, eax
jb 0x590bf8
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x590bf8
jl 0x590b88
cmp dword [ebp - 0x1008], eax
ja 0x590bf8
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x590ba6
test ebx, ebx
je 0x590bdf
cmp ecx, edi
jae 0x590bdf
mov al, byte [ecx]
cmp al, 0xd
jne 0x590bc0
lea eax, [edi - 1]
cmp ecx, eax
jae 0x590bcc
cmp byte [ecx + 1], 0xa
jne 0x590bcc
inc ecx
jmp 0x590bcc
movzx eax, al
movsx eax, byte [eax + 0x621ac0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x590ba6
cmp edx, ebx
jne 0x590ba6
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x590bfd
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0057029b
leave
ret
Function at 0x592572
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x6218c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x5edf64
push esi
call fcn.00592bf4
pop ecx
pop ecx
test eax, eax
jne 0x5925a0
xor al, al
jmp 0x59261d
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.00592274
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x5925da
push dword [ebp - 0x210]
call fcn.00584c22
xor al, al
jmp 0x59261b
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x5925e0
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x592600
push edx
call fcn.005924a9
pop ecx
test al, al
je 0x5925cb
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x59260e
mov bl, 1
push dword [ebp - 0x210]
call fcn.00584c22
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0057029b
leave
ret

Function at 0x595b70
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x6218c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x595bb3
call fcn.00584bfc
mov dword [eax], 0xf
call fcn.00584c0f
mov dword [eax], 0xd
call fcn.00584b11
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057029b
leave
ret
test eax, eax
jne 0x595bba
inc eax
jmp 0x595ba7
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x595ba5
xor eax, eax
cmp ecx, 1
setne al
jmp 0x595ba7
Function at 0x59a251
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 + 0x62df58]
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 0x59a291
cmp byte [ebx], 0xa
jne 0x59a291
or byte [edi + eax + 0x28], 4
jmp 0x59a296
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 0x59a395
mov dl, byte [eax]
cmp dl, 0x1a
je 0x59a378
inc eax
cmp dl, 0xd
je 0x59a2c2
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x59a2e8
cmp eax, ecx
jae 0x59a2f6
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 0x59a2aa
jmp 0x59a395
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 0x59a373
cmp dword [ebp - 0x10], 0
je 0x59a373
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x62df58]
test byte [eax + edi + 0x28], 0x48
je 0x59a34d
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x59a338
mov byte [esi], dl
jmp 0x59a349
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x62df58]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x59a395
cmp byte [ebp - 1], 0xa
jne 0x59a35c
cmp esi, ebx
jne 0x59a35c
mov byte [esi], 0xa
jmp 0x59a394
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00592b96
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x59a395
mov byte [esi], 0xd
jmp 0x59a394
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x62df58]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x59a392
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x59a395
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x59a39e
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 + 0x62df58]
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 0x59a3e4
cmp word [ebx], dx
jne 0x59a3e4
or byte [eax + edi + 0x28], 4
jmp 0x59a3e9
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 0x59a54c
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 0x59a52c
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x59a42a
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x59a460
cmp eax, edx
jae 0x59a46e
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 0x59a405
jmp 0x59a54c
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 0x59a527
cmp dword [ebp - 0x18], 0
je 0x59a527
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x62df58]
test byte [eax + edi + 0x28], 0x48
je 0x59a4fd
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 0x59a4c1
mov word [esi], cx
jmp 0x59a4f8
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x62df58]
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 + 0x62df58]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x62df58]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x59a54c
pop eax
cmp word [ebp - 4], ax
jne 0x59a50d
cmp esi, ebx
jne 0x59a50d
mov word [esi], ax
jmp 0x59a549
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00592b96
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x59a54c
push 0xd
pop eax
jmp 0x59a508
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x62df58]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x59a546
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x59a54c
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 0x59c389
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5ef70c
push 0x5ef704
push 0x5ecce4
push 0x1f
call fcn.0059c1b4
mov esi, eax
add esp, 0x10
test esi, esi
je 0x59c3bd
push dword [ebp + 8]
mov ecx, esi
call dword [0x5c7804]
call esi
jmp 0x59c3c3
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x59c407
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5ef71c
push 0x5ef714
push str.FlsGetValue
push 0x21
call fcn.0059c1b4
mov esi, eax
add esp, 0x10
test esi, esi
je 0x59c43e
push dword [ebp + 8]
mov ecx, esi
call dword [0x5c7804]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x59c446
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5ef724
push 0x5ef71c
push 0x5ecd1c
push 0x22
call fcn.0059c1b4
mov esi, eax
add esp, 0x10
test esi, esi
je 0x59c480
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x5c7804]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x5a0ea4
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.005a0e20
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x5a1013
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x5a1013
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x5a0fc8
jg 0x5a0f00
test eax, eax
je 0x5a0fbe
push 1
push 0x1000
call fcn.0059be75
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x5a0f23
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x5a0fb5
push 0x8000
push ebx
call fcn.0059894b
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x5a0f4c
jg 0x5a0f47
cmp ecx, 0x1000
jb 0x5a0f4c
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0059b4bb
add esp, 0x10
cmp eax, 0xffffffff
je 0x5a0f91
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 0x5a0f47
jl 0x5a0f78
test ecx, ecx
jne 0x5a0f39
push dword [ebp - 0xc]
push ebx
call fcn.0059894b
push esi
call fcn.0059bed2
add esp, 0xc
xor ebx, ebx
jmp 0x5a1021
cmp byte [edi + 0x24], 0
je 0x5a0fa8
cmp dword [edi + 0x20], 5
jne 0x5a0fa8
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x5a0fb3
mov ebx, dword [edi + 0x18]
jmp 0x5a0fb5
xor ebx, ebx
push esi
call fcn.0059bed2
pop ecx
jmp 0x5a1021
test ecx, ecx
jg 0x5a0f8a
jl 0x5a0fc8
test eax, eax
jae 0x5a0f8a
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00592b96
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x5a0fe8
cmp byte [edi + 0x1c], 0
je 0x5a0f8a
jmp 0x5a1019
push ebx
call fcn.00596251
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x5a0f8a
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 0x5a1021
cmp byte [edi + 0x1c], 0
je 0x5a101e
mov ebx, dword [edi + 0x18]
jmp 0x5a1021
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00592b96
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret