Function at 0x481e50
Capabilities:
Get common file path
Write file on windows

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x210
test eax, eax
jne 0x481e6c
mov eax, 0x80030009
add esp, 0x210
ret 0x10
mov eax, dword [esp + 0x220]
test eax, eax
jne 0x481e82
lea eax, [esp + 4]
mov dword [esp + 0x220], eax
mov ecx, dword [esp + 0x220]
push ebp
push esi
mov esi, dword [esp + 0x21c]
lea ebp, [esi + 8]
mov dword [ecx], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x481ea9
push ebp
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [esi + 0x24]
test eax, eax
push ebx
push edi
je 0x481eb7
cmp dword [esi + 0x28], eax
jae 0x481f07
test eax, eax
mov ebx, dword [esp + 0x22c]
mov edi, ebx
je 0x481ecd
sub eax, dword [esi + 0x28]
cmp eax, ebx
jae 0x481ecd
mov edi, eax
mov edx, dword [esp + 0x228]
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x2c]
push edi
push edx
push eax
call fcn.00481d40
mov edx, dword [esi + 0x28]
mov eax, dword [esp + 0x228]
mov ecx, dword [esp + 0x230]
add edx, edi
sub ebx, edi
add eax, edi
mov dword [esi + 0x28], edx
mov dword [ecx], edi
mov dword [esp + 0x228], eax
jmp 0x481f0e
mov ebx, dword [esp + 0x22c]
test ebx, ebx
jbe 0x482069
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x481fd2
lea edx, [esp + 0x18]
push edx
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
mov edi, dword [sym.imp.KERNEL32.DLL_GetTempFileNameA]
lea eax, [esp + 0x11c]
push eax
push 0
push 0x55d524
lea ecx, [esp + 0x24]
push ecx
call edi
test eax, eax
jne 0x481f77
push 0x104
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
lea eax, [esp + 0x11c]
push eax
push 0
push 0x55d524
lea ecx, [esp + 0x24]
push ecx
call edi
push 0
push 0x4000000
push 3
push 0
push 0
push 0xc0000000
lea edx, [esp + 0x134]
push edx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x30], eax
jne 0x481fc6
mov dword [esi + 0x30], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x481fb4
push ebp
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
call fcn.004368a0
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x210
ret 0x10
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 0x2c]
push eax
call fcn.00481cc0
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x30]
push 0
push 0
sub ecx, edx
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
jne 0x48200e
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x481ffc
push ebp
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
call fcn.004368a0
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x210
ret 0x10
mov ecx, dword [esp + 0x228]
mov eax, dword [esi + 0x30]
push 0
lea edx, [esp + 0x14]
push edx
push ebx
push ecx
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x482054
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x482042
push ebp
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
call fcn.004368a0
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x210
ret 0x10
mov edi, dword [esi + 0x28]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x230]
add edi, eax
mov dword [esi + 0x28], edi
add dword [ecx], eax
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x482077
push ebp
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x210
ret 0x10