joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52e100
Capabilities:
Resume thread

Disassembly:
mov eax, dword [0x6a6340]
sub esp, 0x10
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
jne 0x52e29b
mov dword [0x6a637c], ebx
mov dword [0x6a6380], ebx
mov dword [0x6a6384], ebx
mov dword [0x6a6388], ebx
push edi
mov dword [0x6a6394], ebx
mov dword [0x6a6398], ebx
push 0x863f20
mov dword [0x6a6368], ebx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
mov dword [0x6a63b8], ecx
push eax
mov dword [0x6a63bc], edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push ebx
mov edi, 1
push ebx
push edi
push ebx
mov dword [0x6a63b0], ecx
mov dword [0x6a63b4], edx
mov dword [0x6a63a8], ebx
mov dword [0x6a63ac], ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x863f38], eax
mov eax, dword [0x6a63c0]
cmp eax, ebx
jne 0x52e1cc
push edi
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
push ebx
push ebx
push 0x52e8b0
push ebx
push edi
call dword [sym.imp.WINMM.dll_timeSetEvent]
mov dword [0x863f00], eax
call fcn.00531380
push ebx
push 0x52ded0
call fcn.00531240
push ebx
push 0x52def0
call fcn.00531260
push 0x52df10
call fcn.00531400
mov esi, dword [esp + 0x34]
add esp, 0x14
cmp esi, ebx
jne 0x52e22e
mov dword [0x6a6354], ebx
mov dword [0x6a6344], 0xf
mov dword [0x6a6348], 2
mov dword [0x6a634c], edi
mov dword [0x6a6350], edi
mov dword [0x6a6358], 0xfffffffe
jmp 0x52e23a
mov ecx, 6
mov edi, 0x6a6344
rep movsd dword es:[edi], dword [esi]
call fcn.0052e480
test eax, eax
pop edi
jge 0x52e253
call fcn.0052e5c0
pop esi
pop ebx
add esp, 0x10
jmp fcn.005313a0
call fcn.0052e770
test eax, eax
jge 0x52e26b
call fcn.0052e5c0
pop esi
pop ebx
add esp, 0x10
jmp fcn.005313a0
mov eax, dword [0x863f3c]
mov esi, dword [sym.imp.KERNEL32.dll_ResumeThread]
push eax
call esi
mov ecx, dword [0x863f08]
push ecx
call esi
mov edx, dword [0x863f14]
push edx
call esi
push ebx
push 0x52df30
push 6
call fcn.005311f0
add esp, 0xc
mov eax, dword [0x6a6340]
pop esi
inc eax
pop ebx
mov dword [0x6a6340], eax
add esp, 0x10
ret
Function at 0x52e5c0
Capabilities:
Resume thread

Disassembly:
sub esp, 8
mov ecx, dword [0x863f3c]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebp
xor eax, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp ecx, eax
mov dword [esp + 0x14], eax
mov ebp, 1
je 0x52e664
mov dword [esp + 0x10], eax
mov dword [0x6a6384], ebp
mov eax, dword [0x863f3c]
push 2
push eax
call esi
mov ecx, dword [0x863f3c]
push ecx
call edi
mov edx, dword [0x863f3c]
push 0x3e8
push edx
call ebx
cmp eax, 0x102
jne 0x52e62e
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x1e
mov dword [esp + 0x10], eax
jl 0x52e5f2
cmp dword [esp + 0x10], 0x1e
jne 0x52e64a
push str.02100901:_Timeout_Error:_adxm_destroy_thrd__vsync_
call fcn.00531090
add esp, 4
mov dword [esp + 0x14], 0xffffffff
xor eax, eax
mov dword [0x6a6388], eax
mov dword [0x6a6384], eax
mov eax, dword [0x863f3c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [0x863f08], eax
je 0x52e6e4
mov dword [esp + 0x10], eax
mov dword [0x6a638c], ebp
mov ecx, dword [0x863f08]
push 2
push ecx
call esi
mov edx, dword [0x863f08]
push edx
call edi
mov eax, dword [0x863f08]
push 0x3e8
push eax
call ebx
cmp eax, 0x102
jne 0x52e6ac
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x1e
mov dword [esp + 0x10], eax
jl 0x52e670
cmp dword [esp + 0x10], 0x1e
jne 0x52e6c9
push str.02100902:_Timeout_Error:_ADXWIN_DisableFsThrd
call fcn.00531090
mov eax, dword [esp + 0x18]
add esp, 4
dec eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [0x6a6390], eax
mov dword [0x6a638c], eax
mov ecx, dword [0x863f08]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [0x863f14], eax
je 0x52e762
mov dword [esp + 0x10], eax
mov dword [0x6a6394], ebp
mov edx, dword [0x863f14]
push 2
push edx
call esi
mov eax, dword [0x863f14]
push eax
call edi
mov ecx, dword [0x863f14]
push 0x3e8
push ecx
call ebx
cmp eax, 0x102
jne 0x52e72c
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x1e
mov dword [esp + 0x10], eax
jl 0x52e6f0
cmp dword [esp + 0x10], 0x1e
jne 0x52e749
push str.02100903:_Timeout_Error:_adxm_destroy_thrd__mwidle_
call fcn.00531090
mov eax, dword [esp + 0x18]
add esp, 4
dec eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [0x6a6398], eax
mov dword [0x6a6394], eax
mov edx, dword [0x863f14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x52eaf0
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
call dword [0x6a63c4]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push esi
push eax
call fcn.0052ec50
mov edi, dword [esp + 0x18]
add esp, 8
cmp edi, esi
jbe 0x52eb21
xor edi, edi
mov dword [esp + 0x10], edi
lea ecx, [esi + 0x32]
mov eax, 0x5f5e100
xor edx, edx
mov ebx, dword [esp + 0x28]
div ecx
xor edx, edx
div ebx
mov ebp, eax
lea eax, [edi + edi*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
lea eax, [esi + esi*4]
shl edx, 5
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 5
sub eax, edx
xor edx, edx
div ecx
xor edx, edx
div ebx
mov ebx, eax
cmp ebx, 1
jle 0x52eb87
push 1
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.WINMM.dll_timeEndPeriod]
mov edi, dword [esp + 0x10]
cmp edi, esi
jae 0x52ec06
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [esp + 0x1c]
push eax
call edi
lea ecx, [esp + 0x14]
push ecx
call edi
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
sub edx, eax
mov eax, dword [esp + 0x18]
push 0
sbb eax, ebx
push 0xf4240
push eax
push edx
call fcn.00566410
mov ecx, dword [0x6a63bc]
push ecx
mov ecx, dword [0x6a63b8]
push ecx
push edx
push eax
call fcn.00567940
cmp eax, ebp
jl 0x52eb98
call dword [0x6a63c4]
lea edx, [esp + 0x10]
push esi
push edx
mov dword [esp + 0x18], eax
call fcn.0052ec50
mov eax, dword [esp + 0x18]
add esp, 8
cmp eax, esi
ja 0x52ec06
mov ecx, esi
shr ecx, 1
cmp eax, ecx
jb 0x52ec06
cmp eax, esi
jb 0x52eb91
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x533270
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
call fcn.005320a0
mov esi, dword [esp + 0x20]
xor edi, edi
mov eax, 1
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], eax
mov dword [0x6a6cd8], eax
call fcn.005320b0
mov eax, dword [0x6a6cd4]
mov bl, 3
cmp eax, edi
jne 0x5332d1
mov eax, dword [esi + 0x48]
mov ecx, dword [esi + 0x4c]
mov edx, dword [esi + 4]
mov dword [esp + 0x14], eax
mov dword [esi + 0x3c], eax
lea eax, [esi + 0x34]
mov dword [esp + 0x18], ecx
mov dword [esi + 0x40], ecx
mov ecx, dword [esi + 0x50]
push eax
mov eax, dword [esi + 0x30]
push edi
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, eax
jmp 0x53333c
mov ecx, dword [esi + 0x48]
mov edx, dword [esi + 0x4c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
call fcn.00533f60
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x30]
lea eax, [esp + 0x18]
push edi
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call fcn.00533f80
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 4]
lea eax, [esp + 0x10]
push edi
push eax
mov eax, dword [esi + 0x30]
push ecx
push edx
push eax
call fcn.00533fc0
mov ebp, eax
add esp, 0x14
cmp ebp, edi
je 0x533335
cmp dword [esp + 0x10], edi
jne 0x533335
push str.E02052101:The_reading_start_position_is_over_the_end_of_the_file._n
push edi
call fcn.005330e0
add esp, 8
mov byte [esi + 1], bl
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x50], ecx
cmp ebp, edi
mov dword [0x6a6cd8], edi
jne 0x5333fa
call fcn.005320a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
ja 0x53339d
je 0x53338d
mov ecx, eax
sub ecx, 6
je 0x53337d
sub ecx, 2
je 0x5333ce
sub ecx, 0x16
jne 0x5333ab
push str.E02040901:The_reading_error_occurred.
push edi
call fcn.005330e0
mov byte [esi + 1], bl
jmp 0x5333e3
push str.E02040401:The_reading_error_occurred.
push edi
call fcn.005330e0
mov byte [esi + 1], bl
jmp 0x5333e3
push str.E02052001:The_reading_start_position_is_over_the_end_of_the_file._n
push edi
call fcn.005330e0
mov byte [esi + 1], bl
jmp 0x5333e3
cmp eax, 0x3e5
je 0x5333e6
cmp eax, 0x6f8
je 0x5333ce
push eax
push str.E02052002:The_reading_error_occurred.___d__n
push 0x84eb40
call fcn.00565c1c
push 0x84eb40
push edi
call fcn.005330e0
add esp, 0x14
mov byte [esi + 1], bl
jmp 0x5333e6
push str.E02050801:Too_many_I_O_requests.
push edi
call fcn.005330e0
mov dword [esi + 0x54], 1
mov dword [esi + 0x58], edi
add esp, 8
cmp byte [esi + 1], bl
jne 0x5333f5
mov dword [esi + 0x54], 1
mov dword [esi + 0x58], edi
call fcn.005320b0
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x533fc0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [0x6a6cec]
test eax, eax
je 0x533fcb
jmp eax
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push edx
mov edx, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
ret
Function at 0x567ece
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x5caf28
call fcn.0056ab64
mov edi, 0x94
mov eax, edi
call fcn.00571290
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x8301ac], ecx
mov eax, dword [esi + 4]
mov dword [0x8301b8], eax
mov edx, dword [esi + 8]
mov dword [0x8301bc], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x8301b0], esi
cmp ecx, 2
je 0x567f2e
or esi, 0x8000
mov dword [0x8301b0], esi
shl eax, 8
add eax, edx
mov dword [0x8301b4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x567f69
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x567f69
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x567f81
cmp eax, 0x20b
je 0x567f6e
mov dword [ebp - 0x1c], esi
jmp 0x567f95
cmp dword [ecx + 0x84], 0xe
jbe 0x567f69
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x567f8f
cmp dword [ecx + 0x74], 0xe
jbe 0x567f69
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0056b741
pop ecx
test eax, eax
jne 0x567fa9
push 0x1c
call fcn.00567eaa
pop ecx
call fcn.0056add0
test eax, eax
jne 0x567fba
push 0x10
call fcn.00567eaa
pop ecx
call fcn.005711ff
mov dword [ebp - 4], esi
call fcn.00571001
test eax, eax
jge 0x567fd3
push 0x1b
call fcn.00567e85
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x95be10], eax
call fcn.00570edf
mov dword [0x830010], eax
call fcn.00570e3d
test eax, eax
jge 0x567ff9
push 8
call fcn.00567e85
pop ecx
call fcn.00570c0a
test eax, eax
jge 0x56800a
push 9
call fcn.00567e85
pop ecx
push 1
call fcn.0057072c
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x568020
push eax
call fcn.00567e85
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00570bad
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x568041
movzx eax, word [ebp - 0x40]
jmp 0x568044
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004b3921
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x568062
push edi
call fcn.00570859
call fcn.0057087b
jmp 0x568094
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0056ab9f
ret
Function at 0x56985b
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x569878
call fcn.0056ec8c
mov dword [eax], 0x16
xor eax, eax
jmp 0x5698e2
push esi
push 0x8c
push 1
call fcn.00567441
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x5698cd
push esi
call fcn.0056abd6
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x5698ab
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x5697c6
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x5698e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00565fe7
test ebx, ebx
pop ecx
je 0x5698df
push ebx
call fcn.0056ec9e
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x570796
Capabilities:
Terminate process

Disassembly:
push 8
push 0x5cf5c8
call fcn.0056ab64
push 8
call fcn.0056b6f6
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x8301ec], esi
jne 0x5707ca
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x8301e8], esi
mov al, byte [ebp + 0x10]
mov byte [0x8301e4], al
cmp dword [ebp + 0xc], edi
jne 0x570814
cmp dword [0x95ab88], edi
je 0x570804
mov eax, dword [0x95ab84]
sub eax, 4
mov dword [0x95ab84], eax
cmp eax, dword [0x95ab88]
jb 0x570804
mov eax, dword [eax]
cmp eax, edi
je 0x5707e5
call eax
jmp 0x5707e5
push 0x5df030
mov eax, 0x5df028
call fcn.00570714
pop ecx
push 0x5df03c
mov eax, 0x5df034
call fcn.00570714
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x570845
cmp dword [ebp + 0x10], edi
jne 0x570853
mov dword [0x8301ec], esi
push dword [ebp + 8]
call fcn.005706d2
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x570852
push 8
call fcn.0056b641
pop ecx
ret
call fcn.0056ab9f
ret
Function at 0x570899
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x600758]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x6013d8]
je 0x5708ce
inc eax
cmp eax, 0x13
jb 0x5708bf
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x6013d8]
jne 0x5709f4
mov eax, dword [0x830018]
cmp eax, 1
je 0x5709cc
cmp eax, edx
jne 0x5708fe
cmp dword [0x600814], 1
je 0x5709cc
cmp ecx, 0xfc
je 0x5709f4
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x570934
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00566ec0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00566fc0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x570968
mov eax, edi
push eax
call fcn.00566fc0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x5cb12c
push edi
call fcn.00566900
add esp, 0x10
push edi
call fcn.00566fc0
push dword [esi + 0x6013dc]
mov ebx, eax
call fcn.00566fc0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00571290
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00566ec0
push edi
push ebx
call fcn.00566ed0
push 0x5cb128
push ebx
call fcn.00566ed0
push dword [esi + 0x6013dc]
push ebx
call fcn.00566ed0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00574115
add esp, 0x2c
jmp 0x5709f4
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x6013dc]
push dword [esi]
call fcn.00566fc0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00565ca5
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x5713ec
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x600758]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x57141d
xor eax, eax
jmp 0x5715a6
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x95aa80]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x571459
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0057688e
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x571534
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x571572
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x5714bd
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x5714ae
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x57148e
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5714fd
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x571506
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x57147f
jmp 0x571508
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x5715a1
cmp dword [ebp - 0x6c], edi
je 0x571572
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x571567
call fcn.0056ec8c
mov dword [eax], 9
call fcn.0056ec95
mov dword [eax], esi
jmp 0x57159c
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x57155c
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x571508
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x571508
push dword [ebp - 0x6c]
call fcn.0056ec9e
pop ecx
jmp 0x57159c
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x57158a
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x57158a
xor eax, eax
jmp 0x5715a4
call fcn.0056ec8c
mov dword [eax], 0x1c
call fcn.0056ec95
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x5715a4
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00565ca5
add ebp, 0x3a0
leave
ret
Function at 0x571802
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x5719d6
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x95aa80]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x5719d6
test cl, 0x48
je 0x57186d
cmp byte [eax + 5], 0xa
je 0x57186d
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x5718bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x5718a7
call fcn.0056ec8c
mov dword [eax], 9
call fcn.0056ec95
mov dword [eax], esi
jmp 0x5718b7
cmp eax, 0x6d
je 0x5719d6
push eax
call fcn.0056ec9e
pop ecx
or eax, 0xffffffff
jmp 0x5719d8
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x5719d1
test eax, eax
je 0x5718e6
cmp byte [ebx], 0xa
jne 0x5718e6
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x5718ef
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x5719cb
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x5719bb
cmp al, 0xd
je 0x571921
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x5719ad
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x57193b
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x571936
add dword [ebp + 0x10], 2
jmp 0x57198f
mov dword [ebp + 0x10], eax
jmp 0x5719a9
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x571963
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x5719a9
cmp dword [ebp - 0xc], 0
je 0x5719a9
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x571984
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x57198f
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x5719ac
cmp ebx, dword [ebp + 0xc]
jne 0x571994
cmp byte [ebp - 1], 0xa
jne 0x571994
mov byte [ebx], 0xa
jmp 0x5719ac
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.005712cd
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x5719ad
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x571905
jmp 0x5719cb
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x5719cb
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x5719d8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret