Function at 0x45cd30
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8a0
mov eax, dword [0x604e14]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
mov eax, dword [ebp + 8]
push eax
call fcn.00460cf0
add esp, 0x1c
mov dword [ebp - 0x570], eax
cmp dword [ebp - 0x570], 0xffffffff
jne 0x45cd74
xor eax, eax
jmp 0x45d138
push 0
mov ecx, dword [ebp - 0x570]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x77c], eax
cmp dword [ebp - 0x77c], 0
jne 0x45cda8
mov edx, dword [ebp - 0x570]
push edx
call fcn.00460e10
add esp, 4
xor eax, eax
jmp 0x45d138
mov eax, dword [ebp - 0x77c]
add eax, 4
push eax
call fcn.00526059
add esp, 4
mov dword [ebp - 0x898], eax
mov ecx, dword [ebp - 0x898]
mov dword [ebp - 0x56c], ecx
push 4
push 0
mov edx, dword [ebp - 0x56c]
add edx, dword [ebp - 0x77c]
push edx
call fcn.00556110
add esp, 0xc
cmp dword [ebp - 0x56c], 0
jne 0x45ce04
mov eax, dword [ebp - 0x570]
push eax
call fcn.00460e10
add esp, 4
xor eax, eax
jmp 0x45d138
push 0
lea ecx, [ebp - 0x214]
push ecx
mov edx, dword [ebp - 0x77c]
push edx
mov eax, dword [ebp - 0x56c]
push eax
mov ecx, dword [ebp - 0x570]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x570]
push edx
call fcn.00460e10
add esp, 4
lea eax, [ebp - 0x568]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [ebp - 0x888]
push ecx
push 0
push 0x5ae8f8
lea edx, [ebp - 0x568]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0
push 0
push 2
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x888]
push eax
call fcn.00460c60
add esp, 0x1c
mov dword [ebp - 0x570], eax
cmp dword [ebp - 0x570], 0xffffffff
jne 0x45ceb3
mov ecx, dword [ebp - 0x56c]
mov dword [ebp - 0x89c], ecx
mov edx, dword [ebp - 0x89c]
push edx
call fcn.0052604e
add esp, 4
xor eax, eax
jmp 0x45d138
cmp dword [ebp - 0x77c], 2
jae 0x45cf12
mov eax, dword [ebp - 0x56c]
push eax
call fcn.0045c860
add esp, 4
mov dword [ebp - 0x88c], eax
push 0
lea ecx, [ebp - 0x214]
push ecx
mov edx, dword [ebp - 0x88c]
push edx
call fcn.00556680
add esp, 4
push eax
mov eax, dword [ebp - 0x88c]
push eax
mov ecx, dword [ebp - 0x570]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x88c]
push edx
call fcn.005565e6
add esp, 4
jmp 0x45d050
cmp dword [ebp - 0x77c], 2
jb 0x45cf96
mov eax, dword [ebp - 0x56c]
movzx ecx, byte [eax]
cmp ecx, 0xff
jne 0x45cf96
mov edx, dword [ebp - 0x56c]
movzx eax, byte [edx + 1]
cmp eax, 0xfe
jne 0x45cf96
mov ecx, dword [ebp - 0x56c]
add ecx, 2
push ecx
call fcn.0045c6c0
add esp, 4
mov dword [ebp - 0x890], eax
push 0
lea edx, [ebp - 0x214]
push edx
mov eax, dword [ebp - 0x890]
push eax
call fcn.00556680
add esp, 4
push eax
mov ecx, dword [ebp - 0x890]
push ecx
mov edx, dword [ebp - 0x570]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x890]
push eax
call fcn.005565e6
add esp, 4
jmp 0x45d050
cmp dword [ebp - 0x77c], 3
jb 0x45cfff
mov ecx, dword [ebp - 0x56c]
movzx edx, byte [ecx]
cmp edx, 0xef
jne 0x45cfff
mov eax, dword [ebp - 0x56c]
movzx ecx, byte [eax + 1]
cmp ecx, 0xbb
jne 0x45cfff
mov edx, dword [ebp - 0x56c]
movzx eax, byte [edx + 2]
cmp eax, 0xbf
jne 0x45cfff
push 0
lea ecx, [ebp - 0x214]
push ecx
mov edx, dword [ebp - 0x77c]
sub edx, 3
push edx
mov eax, dword [ebp - 0x56c]
add eax, 3
push eax
mov ecx, dword [ebp - 0x570]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x45d050
mov edx, dword [ebp - 0x56c]
push edx
call fcn.0045c860
add esp, 4
mov dword [ebp - 0x894], eax
push 0
lea eax, [ebp - 0x214]
push eax
mov ecx, dword [ebp - 0x894]
push ecx
call fcn.00556680
add esp, 4
push eax
mov edx, dword [ebp - 0x894]
push edx
mov eax, dword [ebp - 0x570]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x894]
push ecx
call fcn.005565e6
add esp, 4
mov edx, dword [ebp - 0x570]
push edx
call fcn.00460e10
add esp, 4
mov eax, dword [ebp - 0x56c]
mov dword [ebp - 0x8a0], eax
mov ecx, dword [ebp - 0x8a0]
push ecx
call fcn.0052604e
add esp, 4
push 0x1e
lea edx, [ebp - 0x254]
push edx
push 0x104
lea eax, [ebp - 0x460]
push eax
push 0x104
lea ecx, [ebp - 0x778]
push ecx
push 0x104
lea edx, [ebp - 0x210]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00557394
add esp, 0x24
lea ecx, [ebp - 0x778]
push ecx
push 0x104
lea edx, [ebp - 0x210]
push edx
call fcn.0045ef70
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
call fcn.005560eb
add esp, 4
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0
je 0x45d0fc
xor ecx, ecx
mov edx, dword [ebp - 0x218]
mov word [ebp + edx*2 - 0x212], cx
lea eax, [ebp - 0x254]
push eax
push 0x104
lea ecx, [ebp - 0x460]
push ecx
call fcn.0045ef70
add esp, 0xc
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x460]
push eax
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 0x888]
push edx
call fcn.0045c980
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00555ac5
mov esp, ebp
pop ebp
ret