Function at 0x58a3f0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x605b9b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x88
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x59]
mov byte [esp + 0x58], bl
mov esi, dword [esp + 0xb4]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x38]
lea ecx, [esp + 0x4c]
push eax
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x1f4]
push edx
mov edx, dword [esi + 0x1ec]
lea eax, [esp + 0x64]
push 0x40
push eax
mov eax, dword [esi + 0x20]
push ecx
push edx
push eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x40], ebx
call fcn.0058eba0
add esp, 0x20
cmp eax, ebx
mov dword [esp + 0x48], eax
je 0x58aa98
push eax
call fcn.005ac640
add esp, 4
cmp eax, ebx
mov dword [esp + 0x50], eax
je 0x58aab4
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0xac]
push ecx
push eax
push edi
mov dword [esp + 0x20], eax
call fcn.005aa830
add esp, 0xc
test eax, eax
je 0x58aad0
mov edx, dword [esp + 0xbc]
mov eax, dword [esp + 0x4c]
mov ebp, dword [esp + 0xb0]
cmp eax, ebx
mov dword [edx], 1
je 0x58a4ea
mov eax, dword [ebp + 0x24]
or al, 8
mov dword [ebp + 0x24], eax
cmp dword [esp + 0x38], ebx
je 0x58a4f8
mov eax, dword [ebp + 0x24]
or al, 0x10
mov dword [ebp + 0x24], eax
cmp dword [esp + 0xa8], 0xffffffff
jne 0x58a521
mov dword [0x68cbe8], 1
mov dword [0x68cbec], 0x3737
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x68cbf0], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x48]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov ecx, dword [esp + 0x20]
lea eax, [esi + 0x28]
mov dword [esi + 0x24], edx
push eax
lea edx, [esp + 0x5c]
push ecx
push edx
mov dword [esi + 0x10], ebx
call fcn.005a9b30
mov eax, dword [esp + 0xb4]
add esp, 0xc
mov dword [esi + 0x38], 0x3e0
mov dword [esi + 0x3c], ebx
push ebx
push ebx
push ebx
push eax
mov dword [esi + 0x40], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x378], ebx
mov dword [esi + 0x37c], ebx
mov dword [esi + 0x380], ebx
mov dword [esi + 0x384], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp ebp, ebx
je 0x58a5b9
mov edx, dword [0x67ca80]
mov ecx, ebp
mov dword [ecx], edx
mov eax, dword [0x67ca84]
mov dword [ecx + 4], eax
mov edx, dword [0x67ca88]
mov dword [ecx + 8], edx
mov eax, dword [0x67ca8c]
mov dword [ecx + 0xc], eax
cmp edi, 0xffffffff
je 0x58a61b
cmp ebp, ebx
je 0x58a61b
lea ecx, [esp + 0x14]
push ebx
push ecx
push 0x3e0
push ebp
push edi
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x58a631
mov dword [0x68cbe8], 0xe
mov dword [0x68cbec], 0x2a09
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x68cbf0], eax
mov dword [0x68cbe8], 0x10
mov dword [0x68cbec], 0x2cb3
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x58aa76
mov dword [0x68cbe8], 1
mov dword [0x68cbec], 0x2a02
jmp 0x58a5f1
mov eax, dword [esi + 0x18]
mov dword [esp + 0x2c], ebx
cmp eax, ebx
mov dword [esp + 0x10], ebx
jne 0x58a656
cmp dword [esi + 0x1c], ebx
jne 0x58a656
mov dword [esp + 0x2c], 1
mov dword [esp + 0x10], ebx
jmp 0x58a8cc
mov ecx, dword [esi + 0x1c]
mov ebp, 0x10000
cmp ecx, ebx
jne 0x58a668
cmp eax, ebp
jae 0x58a668
mov ebp, eax
push ebp
call fcn.005e15b8
mov ecx, dword [esp + 0x54]
add esp, 4
mov dword [esp + 0x34], eax
mov edx, dword [ecx]
push ebp
call dword [edx + 8]
add eax, 4
push eax
mov dword [esp + 0x40], eax
call fcn.005e15b8
add esp, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x38]
push ebx
push ebx
push eax
push edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x64], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [esp + 0x34]
mov ecx, ebp
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x1c]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0xac]
lea eax, [esp + 0x34]
mov dword [esp + 0x34], ebx
push eax
push ebp
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x58a7bb
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x58a7d4
lea edx, [esp + 0x54]
lea ecx, [esp + 0x14]
push edx
lea edx, [esp + 0x20]
push ecx
push edx
lea ecx, [esp + 0x48]
lea edx, [esp + 0x24]
push ecx
push edx
mov edx, dword [esp + 0x64]
push eax
mov eax, dword [esp + 0x38]
push edi
lea ecx, [esp + 0x74]
push eax
push ecx
push edx
mov dword [esp + 0x44], ebx
call fcn.00589690
add esp, 0x28
cmp eax, ebx
jne 0x58a7e1
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add ecx, 4
push eax
push ecx
call fcn.005a9b10
mov edx, dword [esp + 0x20]
add esp, 8
mov dword [edx], eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x44]
push ebx
add ecx, 4
push eax
mov eax, dword [esp + 0xb4]
push ecx
push edx
push eax
mov dword [esp + 0x58], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x58a852
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x44]
add ecx, 4
cmp eax, ecx
jb 0x58a868
mov eax, dword [esi + 0x3c]
cmp eax, ebx
jne 0x58a7af
mov dword [esi + 0x40], ecx
inc eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x3c], eax
jmp 0x58a6ac
mov dword [0x68cbe8], 0xd
mov dword [0x68cbec], 0x2cdd
jmp 0x58a87c
mov dword [esp + 0x2c], 1
jmp 0x58a88f
jge 0x58a83c
push 0x68711c
lea ecx, [esp + 0x14]
call fcn.004669e0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x48]
push 0x2cf0
push edx
push eax
push ecx
lea edx, [esp + 0x20]
push str.Error:_Encrypt_Data_Failed__File__Algrithm_d__DataLen_lu_KeyLen_lu__LINE_d
push edx
mov dword [esp + 0xb8], ebx
call fcn.0046a260
mov eax, dword [esp + 0x28]
push eax
call fcn.005ad4e0
add esp, 0x1c
lea ecx, [esp + 0x10]
mov dword [esp + 0xa0], 0xffffffff
call fcn.00467250
mov dword [0x68cbe8], 0x11
mov dword [0x68cbec], 0x2cf4
jmp 0x58a87c
mov dword [0x68cbe8], 0xe
mov dword [0x68cbec], 0x2cfe
jmp 0x58a87c
mov dword [0x68cbe8], 0xe
mov dword [0x68cbec], 0x2d05
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x68cbf0], eax
mov dword [esp + 0x10], 1
cmp edi, ebx
je 0x58a89c
push edi
call fcn.005e15e1
add esp, 4
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x58a8ad
push eax
call fcn.005e15e1
add esp, 4
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x58a8be
push eax
call fcn.005e15e1
add esp, 4
mov edi, dword [esp + 0xac]
mov ebp, dword [esp + 0xb0]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [esp + 0x2c], ebx
je 0x58aa7b
cmp dword [esp + 0x10], ebx
jne 0x58aa7b
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x40], 1
cmp eax, ebx
je 0x58a9e5
mov eax, dword [esi + 0x3c]
cmp eax, ebx
jne 0x58a917
mov dword [esi + 0x378], 0x3e0
mov dword [esi + 0x37c], ebx
jmp 0x58a947
mov ecx, dword [esi + 0x40]
push ebx
dec eax
push ecx
push ebx
push eax
call fcn.0044e270
mov ecx, dword [esi + 0x44]
xor edi, edi
add eax, ecx
adc edx, edi
mov edi, dword [esp + 0xac]
add eax, 0x3e0
adc edx, ebx
mov dword [esi + 0x378], eax
mov dword [esi + 0x37c], edx
mov edx, dword [esp + 0xb8]
mov eax, dword [ebp + 0x20]
push edx
push esi
push eax
push edi
call fcn.00583a20
add esp, 0x10
test eax, eax
je 0x58a9c6
mov ecx, dword [esp + 0xb8]
push ecx
call fcn.00590f20
add esp, 4
test eax, eax
mov eax, dword [ebp + 0x24]
je 0x58a97c
and al, 0xdf
jmp 0x58a97e
or al, 0x20
mov edx, dword [esp + 0xb8]
mov ecx, eax
or ecx, 4
mov dword [ebp + 0x24], eax
push edx
mov dword [ebp + 0x24], ecx
call fcn.005a9c90
add esp, 4
test eax, eax
jne 0x58a9a5
mov eax, dword [ebp + 0x24]
or al, 1
mov dword [ebp + 0x24], eax
mov eax, dword [esp + 0xb8]
add eax, 0x10
push eax
call fcn.005a9c90
add esp, 4
test eax, eax
jne 0x58a9e5
mov eax, dword [ebp + 0x24]
or al, 2
mov dword [ebp + 0x24], eax
jmp 0x58a9e5
mov dword [0x68cbe8], 0x10
mov dword [0x68cbec], 0x2d4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x68cbf0], eax
mov edx, dword [0x67ca6c]
mov ecx, ebp
push esi
push ebp
mov dword [ecx], edx
mov eax, dword [0x67ca70]
mov dword [ecx + 4], eax
mov edx, dword [0x67ca74]
mov dword [ecx + 8], edx
mov eax, dword [0x67ca78]
mov dword [ecx + 0xc], eax
call fcn.00588e60
add esp, 8
test eax, eax
je 0x58aaec
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x28]
push ebx
push ecx
push 0x3e0
push ebp
push edi
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x58aa7b
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x68cbe8], 0xe
mov dword [0x68cbec], 0x2a09
call esi
mov dword [0x68cbf0], eax
mov dword [0x68cbe8], 0x10
mov dword [0x68cbec], 0x2d5e
call esi
mov dword [0x68cbf0], eax
mov ecx, dword [esp + 0x98]
mov eax, dword [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x94
ret
mov dword [0x68cbe8], 0xb
mov dword [0x68cbec], 0x2c73
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x58aa76
mov dword [0x68cbe8], 0xc
mov dword [0x68cbec], 0x2c7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x58aa76
mov dword [0x68cbe8], 0x25
mov dword [0x68cbec], 0x2c89
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x58aa76
mov dword [0x68cbe8], 0x13
mov dword [0x68cbec], 0x2d56
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x58aa76