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

Disassembly:
push 0xffffffffffffffff
push 0x4b196b
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 + 0x48]
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x28]
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 + 0x58], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x44], ebx
call fcn.00419ec0
add esp, 0x20
cmp eax, ebx
mov dword [esp + 0x3c], eax
je 0x418cc4
push eax
call fcn.00410ee0
add esp, 4
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x418ccd
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x28]
push ecx
push edx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0xac]
push ecx
push eax
push edi
mov dword [esp + 0x2c], eax
call fcn.00429600
add esp, 0xc
test eax, eax
je 0x418cd6
mov edx, dword [esp + 0xbc]
mov eax, dword [esp + 0x38]
mov ebp, dword [esp + 0xb0]
cmp eax, ebx
mov dword [edx], 1
je 0x41888a
mov eax, dword [ebp + 0x24]
or al, 8
mov dword [ebp + 0x24], eax
cmp dword [esp + 0x48], ebx
je 0x418898
mov eax, dword [ebp + 0x24]
or al, 0x10
mov dword [ebp + 0x24], eax
mov eax, dword [esp + 0xa8]
push eax
call fcn.0041a2a0
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x40]
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], edx
mov edx, dword [esp + 0x28]
lea ecx, [esi + 0x28]
mov dword [esi + 0x24], eax
push ecx
lea eax, [esp + 0x60]
push edx
push eax
call fcn.0042f280
mov ecx, dword [esp + 0xb8]
add esp, 0x10
mov dword [esi + 0x38], 0x3e0
mov dword [esi + 0x3c], ebx
push ebx
push ebx
push ebx
push ecx
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]
push ebp
call fcn.004178f0
push 0x3e0
push ebp
push edi
call fcn.00417c30
add esp, 0x10
test eax, eax
je 0x418cdf
mov eax, dword [esi + 0x18]
mov dword [esp + 0x2c], ebx
cmp eax, ebx
mov dword [esp + 0x10], ebx
jne 0x418958
cmp dword [esi + 0x1c], ebx
jne 0x418958
mov dword [esp + 0x2c], 1
mov dword [esp + 0x10], ebx
jmp 0x418b96
mov ecx, dword [esi + 0x1c]
mov ebp, 0x10000
cmp ecx, ebx
jne 0x41896a
cmp eax, ebp
jae 0x41896a
mov ebp, eax
push ebp
call fcn.004a2973
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x20], eax
mov edx, dword [ecx]
push ebp
call dword [edx + 8]
add eax, 4
push eax
mov dword [esp + 0x48], eax
call fcn.004a2973
add esp, 4
mov dword [esp + 0x54], eax
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x38]
push ebx
push ebx
push eax
push edi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x60], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [esp + 0x20]
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 + 0x48]
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 + 0x24]
mov ecx, dword [esp + 0xac]
lea eax, [esp + 0x38]
mov dword [esp + 0x38], ebx
push eax
push ebp
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x418abd
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x418ac6
lea edx, [esp + 0x50]
lea ecx, [esp + 0x30]
push edx
lea edx, [esp + 0x20]
push ecx
push edx
lea ecx, [esp + 0x50]
lea edx, [esp + 0x24]
push ecx
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x3c]
push edi
lea ecx, [esp + 0x74]
push eax
push ecx
push edx
mov dword [esp + 0x44], ebx
call fcn.00417db0
add esp, 0x28
cmp eax, ebx
jne 0x418ad3
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add ecx, 4
push eax
push ecx
call fcn.004289c0
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 + 0x4c]
push ebx
add ecx, 4
push eax
mov eax, dword [esp + 0xb4]
push ecx
push edx
push eax
mov dword [esp + 0x60], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x418b37
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x4c]
add ecx, 4
cmp eax, ecx
jb 0x418b3e
mov eax, dword [esi + 0x3c]
cmp eax, ebx
jne 0x418ab1
mov dword [esi + 0x40], ecx
inc eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x3c], eax
jmp 0x4189ae
push 0x2ad8
push 0xd
jmp 0x418b45
mov dword [esp + 0x2c], 1
jmp 0x418b55
jge 0x418b2e
push 0x4f4c50
lea ecx, [esp + 0x18]
call fcn.00447770
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x3c]
push 0x2aeb
push edx
push eax
push ecx
lea edx, [esp + 0x24]
push str.Error:_Encrypt_Data_Failed__File__Algrithm_d__DataLen_lu_KeyLen_lu__LINE_d
push edx
mov dword [esp + 0xb8], ebx
call fcn.00449050
mov eax, dword [esp + 0x2c]
push eax
call fcn.00424560
add esp, 0x1c
lea ecx, [esp + 0x14]
mov dword [esp + 0xa0], 0xffffffff
call fcn.00447cd0
push 0x2aef
push 0x11
jmp 0x418b45
push 0x2af9
jmp 0x418b43
push 0x2b00
push 0xe
call fcn.00413b00
add esp, 8
mov dword [esp + 0x10], 1
cmp edi, ebx
je 0x418b62
push edi
call fcn.004a299c
add esp, 4
mov eax, dword [esp + 0x54]
cmp eax, ebx
je 0x418b73
push eax
call fcn.004a299c
add esp, 4
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x418b88
push eax
call fcn.004a299c
add esp, 4
mov dword [esp + 0x30], ebx
mov ebp, dword [esp + 0xb0]
mov edi, dword [esp + 0xac]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [esp + 0x2c], ebx
je 0x418cfe
cmp dword [esp + 0x10], ebx
jne 0x418cfe
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x40], 1
cmp eax, ebx
je 0x418c91
mov eax, dword [esi + 0x3c]
cmp eax, ebx
jne 0x418be1
mov dword [esi + 0x378], 0x3e0
mov dword [esi + 0x37c], ebx
jmp 0x418c11
mov ecx, dword [esi + 0x40]
push ebx
dec eax
push ecx
push ebx
push eax
call fcn.00438980
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.00414c30
add esp, 0x10
test eax, eax
je 0x418c82
mov ecx, dword [esp + 0xb8]
lea eax, [ebp + 0x24]
push ecx
push eax
call fcn.0041af90
mov ecx, dword [ebp + 0x24]
mov edx, dword [esp + 0xc0]
or ecx, 4
push edx
mov dword [ebp + 0x24], ecx
call fcn.00428ae0
add esp, 0xc
test eax, eax
jne 0x418c61
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.00428ae0
add esp, 4
test eax, eax
jne 0x418c91
mov eax, dword [ebp + 0x24]
or al, 2
mov dword [ebp + 0x24], eax
jmp 0x418c91
push 0x2b47
push 0x10
call fcn.00413b00
add esp, 8
push ebp
call fcn.00417930
push esi
push ebp
call fcn.00417720
add esp, 0xc
test eax, eax
je 0x418ce6
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x3e0
push ebp
push edi
call fcn.00417c30
add esp, 0xc
test eax, eax
je 0x418cef
jmp 0x418cfe
push 0x2a6e
push 0xb
jmp 0x418cf6
push 0x2a75
push 0xc
jmp 0x418cf6
push 0x2a84
push 0x25
jmp 0x418cf6
push 0x2aae
jmp 0x418cf4
push 0x2b51
push 0x13
jmp 0x418cf6
push 0x2b59
push 0x10
call fcn.00413b00
add esp, 8
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