Function at 0x4f2270
Capabilities:
Get common file path
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4fc
mov eax, dword [0x5c04b4]
xor eax, esp
mov dword [esp + 0x4f8], eax
push ebx
push esi
push edi
xor eax, eax
mov ebx, ecx
push 0x206
push eax
mov word [esp + 0xf8], ax
lea eax, [esp + 0xfa]
push eax
mov dword [esp + 0x1c], ebx
call sub.MSVCR120.dll_memset
add esp, 0xc
mov dword [esp + 0x1c], 0
mov edi, 4
test ebx, ebx
jne 0x4f22dc
lea eax, [ebx + 0xa]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4f8]
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0xf0]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x4f296b
cmp eax, 0x104
ja 0x4f296b
lea eax, [esp + 0x2f8]
push eax
push 0
push 0x589fcc
lea eax, [esp + 0xfc]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x4f296b
lea ecx, [esp + 0x2f8]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f2331
sub ecx, edx
lea eax, [esp + 0x2f8]
sar ecx, 1
cmp ecx, 0x104
jae 0x4f2368
push eax
lea eax, [esp + 0xf4]
push 0x104
push eax
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x4f238e
push 0x103
push eax
lea eax, [esp + 0xf8]
push 0x104
push eax
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [esp + 0x2f6], ax
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4f239c
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x10000
call dword [sym.imp.MSVCR120.dll_malloc]
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
test esi, esi
je 0x4f23bc
mov dword [esp + 0x1c], 0x10000
xor dl, dl
mov ecx, ebx
call fcn.004f0bb0
mov edx, 5
lea ecx, [esp + 0xf0]
call fcn.004f0e30
mov dword [esp + 0x18], eax
test eax, eax
je 0x4f2941
mov eax, dword [esp + 0x10]
xor esi, esi
mov edi, dword [ebx + 0x1c]
xor ebx, ebx
mov dword [esp + 0x44], ebx
cmp dword [eax + 0x20], ebx
jbe 0x4f25a7
lea ebx, [ebx]
lea ecx, [esp + 0xcc]
or edx, 0xffffffff
push ecx
push esi
push edi
mov ecx, eax
call fcn.004f1710
add esp, 0xc
test al, al
je 0x4f2928
test byte [esp + 0xe8], 1
jne 0x4f258b
mov ebx, dword [esp + 0xd0]
mov eax, dword [esp + 0xd4]
sub ebx, eax
cmp ebx, dword [esp + 0x1c]
jbe 0x4f2468
push ebx
push dword [esp + 0x18]
call dword [sym.imp.MSVCR120.dll_realloc]
add esp, 8
test eax, eax
je 0x4f2928
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xd4]
mov dword [esp + 0x1c], ebx
add edi, eax
mov eax, dword [esp + 0x10]
adc esi, 0
cmp byte [0x5c6a90], 0
mov dword [esp + 0x40], esi
mov eax, dword [eax + 0x10]
je 0x4f24e3
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], esi
test esi, esi
jg 0x4f24a2
jl 0x4f2493
test edi, edi
jae 0x4f24a2
push 0x19
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
or ecx, eax
jmp 0x4f251c
push 0xe
push 8
lea ecx, [esp + 0x68]
push ecx
lea ecx, [esp + 0x88]
push ecx
push eax
call dword [0x5c0080]
mov esi, eax
push esi
call dword [0x5c00a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
mov esi, dword [esp + 0x40]
jns 0x4f24d9
or eax, 0xffffffff
or ecx, eax
jmp 0x4f251c
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
jmp 0x4f251c
push 0
lea ecx, [esp + 0x40]
mov dword [esp + 0x3c], edi
push ecx
push edi
push eax
mov dword [esp + 0x4c], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x38], eax
cmp eax, 0xffffffff
jne 0x4f2518
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f2514
or eax, 0xffffffff
or ecx, eax
jmp 0x4f251c
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
cmp eax, 0xffffffff
jne 0x4f2529
cmp ecx, eax
je 0x4f2928
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push ebx
mov ecx, dword [eax + 0x10]
call fcn.00501a70
add esp, 4
cmp ebx, eax
jne 0x4f2928
push dword [esp + 0xec]
mov edx, dword [esp + 0xdc]
push ecx
push dword [esp + 0xf0]
mov ecx, dword [esp + 0x24]
push dword [esp + 0xf0]
push dword [esp + 0xf0]
push ebx
push dword [esp + 0x2c]
call fcn.004f1140
add esp, 0x1c
cmp eax, 0xffffffff
je 0x4f2928
add edi, ebx
mov ebx, dword [esp + 0x44]
jmp 0x4f2592
add edi, dword [esp + 0xd0]
mov eax, dword [esp + 0x10]
adc esi, 0
inc ebx
mov dword [esp + 0x44], ebx
cmp ebx, dword [eax + 0x20]
jb 0x4f2400
mov ecx, dword [esp + 0x18]
xor dl, dl
call fcn.004f0bb0
mov ebx, dword [esp + 0x10]
lea edi, [esp + 0x94]
mov ecx, 0xe
mov dl, 1
lea esi, [ebx + 0x18]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x48], 0
call fcn.004f0bb0
mov eax, dword [ebx + 0x1c]
xor edx, edx
mov ecx, dword [ebx + 0x10]
cmp byte [0x5c6a90], dl
je 0x4f2661
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
test edx, edx
jg 0x4f2618
jl 0x4f2600
test eax, eax
jae 0x4f2618
push 0x19
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
or eax, 0xffffffff
or ecx, eax
jmp 0x4f269c
push 0xe
push 8
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x98]
push eax
push ecx
call dword [0x5c0080]
mov esi, eax
push esi
call dword [0x5c00a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jns 0x4f2651
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
or eax, 0xffffffff
or ecx, eax
jmp 0x4f269c
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4f269c
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
mov dword [esp + 0x38], edx
lea edx, [esp + 0x38]
push edx
push eax
push ecx
mov dword [esp + 0x40], eax
call edi
mov dword [esp + 0x30], eax
cmp eax, 0xffffffff
jne 0x4f2698
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f2694
or eax, 0xffffffff
or ecx, eax
jmp 0x4f269c
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp eax, 0xffffffff
jne 0x4f26a9
cmp ecx, eax
je 0x4f292c
cmp byte [0x5c6a90], 0
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
je 0x4f2710
push 0xe
push 8
lea ecx, [esp + 0x50]
mov dword [esp + 0x50], 0x38
push ecx
lea ecx, [esp + 0x90]
mov dword [esp + 0x58], 0
push ecx
push eax
call dword [0x5c0080]
mov esi, eax
push esi
call dword [0x5c00a8]
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
push eax
call edi
test esi, esi
jns 0x4f2702
mov esi, dword [esp + 0x18]
or eax, 0xffffffff
or ecx, eax
jmp 0x4f2754
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x18]
jmp 0x4f2754
push 0
lea ecx, [esp + 0x30]
mov dword [esp + 0x2c], 0x38
push ecx
push 0x38
push eax
mov dword [esp + 0x3c], 0
call edi
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x4f274a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f2746
or eax, 0xffffffff
or ecx, eax
jmp 0x4f274e
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
cmp eax, 0xffffffff
jne 0x4f2761
cmp ecx, eax
je 0x4f292c
cmp byte [0x5c6a90], 0
mov eax, dword [esi + 0x10]
push 0
je 0x4f27c9
xor ecx, ecx
push ecx
push dword [esp + 0x24]
mov dword [esp + 0x64], ecx
push dword [esp + 0x20]
mov dword [esp + 0x6c], ecx
lea ecx, [esp + 0x68]
push ecx
push 0
push 0
push 0
push eax
call dword [0x5c0260]
mov esi, eax
cmp esi, 0xc0000011
jne 0x4f27a8
mov dword [esp + 0x5c], 0
xor esi, esi
push esi
call dword [0x5c00a8]
push eax
call edi
test esi, esi
jns 0x4f27bf
mov esi, dword [esp + 0x14]
or edi, 0xffffffff
jmp 0x4f27eb
mov edi, dword [esp + 0x5c]
mov esi, dword [esp + 0x14]
jmp 0x4f27eb
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x70]
push ecx
push dword [esp + 0x24]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4f27e7
or edi, 0xffffffff
jmp 0x4f27eb
mov edi, dword [esp + 0x6c]
cmp edi, 0xffffffff
je 0x4f292c
mov eax, dword [ebx + 0x10]
test edi, edi
je 0x4f2883
cmp byte [0x5c6a90], 0
push 0
je 0x4f2851
xor ecx, ecx
push ecx
push edi
push esi
mov dword [esp + 0x84], ecx
mov dword [esp + 0x88], ecx
lea ecx, [esp + 0x84]
push ecx
push 0
push 0
push 0
push eax
call dword [0x5c0268]
mov esi, eax
push esi
call dword [0x5c00a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jns 0x4f284b
or eax, 0xffffffff
jmp 0x4f286c
mov eax, dword [esp + 0x78]
jmp 0x4f286c
lea ecx, [esp + 0x74]
push ecx
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4f2868
or eax, 0xffffffff
jmp 0x4f286c
mov eax, dword [esp + 0x70]
cmp edi, eax
jne 0x4f292c
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [esp + 0x18]
jmp 0x4f2761
cmp byte [0x5c6a90], 0
je 0x4f28a1
push 0
push 0
mov edx, 1
mov ecx, eax
call fcn.00502a40
add esp, 8
jmp 0x4f28e9
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x24], 0
push ecx
push 0
push eax
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x4f28e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f28e1
or eax, 0xffffffff
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
jmp 0x4f28e5
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov ecx, dword [ebx + 0x10]
push edx
push eax
call fcn.00501b20
mov esi, dword [esp + 0x20]
lea edi, [ebx + 0x18]
mov eax, dword [esp + 0xb0]
add esi, 0x18
mov ecx, 0xe
add esp, 8
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x2c], eax
mov dl, 1
mov eax, dword [esp + 0xac]
mov ecx, ebx
mov dword [ebx + 0x30], eax
call fcn.004f0bb0
xor edi, edi
jmp 0x4f2931
mov ebx, dword [esp + 0x10]
mov edi, 4
push dword [esp + 0x18]
call fcn.004f0dc0
mov esi, dword [esp + 0x18]
add esp, 4
test esi, esi
je 0x4f294f
push esi
call dword [sym.imp.MSVCR120.dll_free]
add esp, 4
xor edx, edx
lea ecx, [esp + 0xf0]
call fcn.00501d80
mov ecx, dword [ebx + 0x14]
test ecx, ecx
je 0x4f296b
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x504]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret