Function at 0x10002180
Capabilities:
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x1c
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push edi
mov edi, dword [esp + 0x2c]
push 0x80
push edi
call esi
push 0
push 0x8000080
push 3
push 0
push 3
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x100021c1
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret
mov eax, dword [esp + 0x30]
push ebp
push 0x80
push eax
call esi
push 0
call fcn.1000b589
push eax
call fcn.1000bad0
add esp, 8
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov ecx, edi
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
test ecx, ecx
jge 0x100021fd
fadd qword [0x10018248]
fmul qword [0x10018240]
push 4
fnstcw word [esp + 0x14]
push 0x1000
movzx eax, word [esp + 0x18]
fadd qword [0x10018238]
or eax, 0xc00
mov dword [esp + 0x20], eax
lea eax, [edi + 0x3e8]
push eax
fldcw word [esp + 0x24]
push 0
fistp qword [esp + 0x2c]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x24], ebp
fldcw word [esp + 0x20]
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x1000
push ebp
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
lea edx, [esp + 0x28]
push edx
push edi
push esi
mov ebp, eax
push ebx
mov dword [esp + 0x30], ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
push edi
push esi
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.100054d0
mov ebx, 0x20
add esp, 0x10
mov edi, ebx
cmp dword [esp + 0x10], ebx
jbe 0x100022a5
call fcn.1000bae2
mov byte [esi + edi], al
inc edi
cmp edi, dword [esp + 0x10]
jb 0x10002296
mov cl, 0x74
mov al, 0x65
mov byte [esi + 0x33], cl
mov byte [esi + 0x34], al
mov dl, 0x63
mov byte [esi + 0x36], cl
mov byte [esi + 0x44], al
mov cl, 0x69
mov al, 0x6d
mov byte [esi + 0x30], 0x50
mov byte [esi + 0x31], 0x72
mov byte [esi + 0x32], 0x6f
mov byte [esi + 0x35], dl
mov byte [esi + 0x37], bl
mov byte [esi + 0x38], 0x62
mov byte [esi + 0x39], 0x79
mov byte [esi + 0x3a], bl
mov byte [esi + 0x3b], 0x5a
mov byte [esi + 0x3c], 0x68
mov byte [esi + 0x3d], 0x61
mov byte [esi + 0x3e], 0x6e
mov byte [esi + 0x3f], 0x67
mov byte [esi + 0x40], bl
mov byte [esi + 0x41], 0x59
mov byte [esi + 0x42], 0x75
mov byte [esi + 0x43], 0x66
mov byte [esi + 0x45], cl
mov byte [esi + 0x46], 0x2c
mov byte [esi + 0x47], bl
mov byte [esi + 0x48], 0x4a
mov byte [esi + 0x49], al
mov byte [esi + 0x4a], cl
mov byte [esi + 0x4b], 0x38
mov byte [esi + 0x4c], 0x2e
mov byte [esi + 0x4d], dl
mov byte [esi + 0x4e], 0x6f
mov byte [esi + 0x4f], al
call fcn.1000bae2
cdq
mov ecx, 0x2bc
idiv ecx
xor eax, eax
lea edi, [esi + 0x5f]
mov ebx, edx
mov dl, byte [eax + ebp]
mov byte [edi], dl
inc eax
dec edi
cmp eax, 0x10
jl 0x10002335
mov eax, 0x10
cmp dword [esp + 0x14], eax
jbe 0x10002360
lea edi, [ebx + esi + 0x11c]
mov cl, byte [eax + ebp]
mov byte [edi + eax], cl
inc eax
cmp eax, dword [esp + 0x14]
jb 0x10002353
xor eax, eax
lea ecx, [esi + 0x81]
jmp 0x10002370
movzx edx, byte [eax + 0x10020918]
mov byte [ecx - 1], dl
movzx edx, byte [eax + 0x10020938]
mov byte [ecx], dl
movzx edx, byte [eax + 0x10020928]
mov byte [ecx + 1], dl
movzx edx, byte [eax + 0x10020b4c]
mov byte [ecx + 2], dl
inc eax
add ecx, 5
cmp eax, 0xc
jl 0x10002370
movzx eax, byte [0x10021170]
mov byte [esi + 0x84], al
movzx ecx, byte [0x10021171]
mov byte [esi + 0x89], cl
movzx edx, byte [0x10021172]
mov byte [esi + 0x8e], dl
movzx eax, byte [0x10021173]
mov byte [esi + 0x93], al
movzx ecx, byte [0x10021174]
mov byte [esi + 0x98], cl
movzx edx, byte [0x10021175]
mov byte [esi + 0x9d], dl
movzx eax, byte [0x10021176]
mov byte [esi + 0xa2], al
movzx ecx, byte [0x10021177]
xor ebp, ebp
mov byte [esi + 0xa7], cl
mov dword [esp + 0x18], ebp
call fcn.1000bae2
mov ecx, eax
and ecx, 0x80000007
jns 0x10002422
dec ecx
or ecx, 0xfffffff8
inc ecx
movzx edi, cl
mov byte [esi + 0x120], cl
mov edx, dword [0x10020f68]
lea eax, [edi + edx]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov byte [esi + 0x121], al
mov eax, dword [0x10020f68]
lea edx, [edi + eax]
and edx, 0x800000ff
jns 0x1000245e
dec edx
or edx, 0xffffff00
inc edx
mov byte [esi + 0x122], dl
mov al, cl
add al, byte [0x10020d60]
mov dl, cl
add dl, bl
mov byte [esi + 0x123], al
mov byte [esi + 0x124], dl
lea eax, [edi + ebx]
mov edx, eax
shr edx, 8
mov byte [esi + 0x125], dl
mov edx, eax
shr eax, 0x18
shr edx, 0x10
mov byte [esi + 0x127], al
mov byte [esi + 0x126], dl
add cl, byte [esp + 0x14]
mov byte [esi + 0x128], cl
mov eax, dword [esp + 0x14]
lea ecx, [edi + eax]
shr ecx, 8
mov byte [esi + 0x129], cl
mov edx, dword [esp + 0x14]
lea eax, [edi + edx]
shr eax, 0x10
mov byte [esi + 0x12a], al
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
lea edx, [edi + ecx]
xor ecx, ecx
shr edx, 0x18
lea ebx, [ecx + 0x22]
mov byte [esi + 0x12b], dl
cmp eax, ebx
jbe 0x1000251b
lea edx, [eax - 0x22]
cmp edx, 2
jl 0x1000250a
dec eax
mov edi, edi
movzx edx, byte [esi + ebx]
add ebp, edx
movzx edx, byte [esi + ebx + 1]
add dword [esp + 0x18], edx
add ebx, 2
cmp ebx, eax
jl 0x100024f0
mov eax, dword [esp + 0x10]
cmp ebx, eax
jae 0x10002513
movzx ecx, byte [esi + ebx]
inc ebx
mov eax, dword [esp + 0x18]
add eax, ebp
add ecx, eax
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
and ecx, 0x800000ff
mov byte [esi + 0x20], al
jns 0x1000253c
dec ecx
or ecx, 0xffffff00
inc ecx
mov ebp, dword [esp + 0x34]
push 0
push 0x8000080
push 2
push 0
push 3
push 0xc0000000
push ebp
mov byte [esi + 0x21], cl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10002591
inc ebx
cmp ebx, 3
jg 0x100025d7
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x8000080
push 2
push 0
push 3
push 0xc0000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x10002563
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x2c]
push ecx
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8000
push 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
call esi
mov eax, dword [esp + 0x1c]
push 0x8000
push 0
push eax
call esi
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret