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

Disassembly:
push ebp
lea ebp, [esp - 0x310]
sub esp, 0x310
push 0xfffffffffffffffe
push 0x1016d750
push 0x10118480
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x1017455c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x30c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, dword [ebp + 0x318]
or edi, 0xffffffff
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [ebp - 0x34], ebx
xor eax, eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
mov byte [ebp], al
push 0x103
push eax
lea eax, [ebp + 1]
push eax
call fcn.10116880
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x20], ecx
mov eax, dword [0x1019e934]
cmp eax, ecx
jne 0x100537a5
cmp dword [ebp + 0x31c], ecx
jne 0x100537a5
push ecx
push 1
push str.GlobalGenLogMutex
push ecx
push ecx
call sym.EncDec.dll_MyCreateMutex
mov dword [0x1019e934], eax
cmp esi, 0xffffffff
jne 0x100537c5
push 0x1019e934
call fcn.100673f0
lea ecx, [ebp - 0x1c]
push ecx
call fcn.100673f0
mov edi, dword [ebp - 0x1c]
mov eax, dword [0x1019e934]
cmp dword [ebp + 0x31c], 0
jne 0x100537e1
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
jmp 0x10053cfb
test eax, eax
je 0x10053811
xor ebx, ebx
mov dword [ebp - 0x38], ebx
push 0x5a
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x100537ff
mov ebx, 1
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x2c], ebx
cmp ebx, 1
je 0x10053811
push 0x1019e934
call fcn.100673f0
mov ecx, 1
lea edx, [ebp]
call fcn.100675a0
cmp dword [0x1017e8ec], 0xffffffff
jne 0x10053848
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x1017e8ec
xor ebx, ebx
xor edx, edx
xor ecx, ecx
call fcn.10050110
add esp, 0x20
mov eax, dword [0x1017f1b4]
call fcn.1004cb20
test eax, eax
jne 0x10053981
test esi, esi
je 0x1005394a
cmp byte [esi], al
je 0x1005394a
mov eax, edi
call fcn.1004cb20
test eax, eax
jne 0x10053981
push closesocket
push 4
push 3
push 4
mov edi, esi
call fcn.10033690
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x1c], edi
call fcn.1004cb20
test eax, eax
jne 0x10053981
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x10053c96
push 0x5c
push esi
call fcn.1010e930
add esp, 8
mov edi, eax
test edi, edi
je 0x100538c3
inc edi
jmp 0x100538c5
mov edi, esi
lea edx, [ebp + 0x104]
push edx
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0
push str.locallow_
push str.local_
lea eax, [ebp + 0x104]
push eax
call fcn.10047ed0
add esp, 0x10
lea ecx, [ebp + 0x104]
call fcn.10049c40
push edi
lea ecx, [ebp + 0x104]
push ecx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call esi
push 0x82000000
push 4
push 3
push 4
lea edi, [ebp + 0x104]
call fcn.10033690
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x1c], edi
call fcn.1004cb20
test eax, eax
je 0x10053c96
push 0x1017f1b4
call fcn.100673f0
mov dword [0x1017f1b4], edi
jmp 0x10053987
cmp byte [0x1019e938], 0
je 0x10053a5a
push closesocket
push 4
push 3
push 4
mov edi, 0x1019e938
call fcn.10033690
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x1c], edi
call fcn.1004cb20
test eax, eax
je 0x10053c96
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp byte [0x1019ea40], 0
jne 0x100539d4
mov byte [ebp + 0x204], 0
push 0x104
push 0
lea edx, [ebp + 0x205]
push edx
call fcn.10116880
add esp, 0xc
push 0x105
lea eax, [ebp + 0x204]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x1019ea40
lea ecx, [ebp + 0x204]
call fcn.10045a10
add esp, 4
push 0x5000
call fcn.1010dced
mov ebx, eax
mov dword [ebp - 0x28], ebx
push 0x5000
call fcn.1010dced
add esp, 8
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x10053c83
test eax, eax
je 0x10053c83
mov byte [eax], 0
mov byte [ebx], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea ecx, [ebp]
push ecx
push 0x1019ea40
push str.__s___s__04x__04x__
mov edx, dword [ebp - 0x20]
push edx
call fcn.1010d6a8
lea eax, [ebp + 0x320]
push eax
mov ecx, dword [ebp + 0x31c]
push ecx
push ebx
call fcn.10111b04
add esp, 0x24
push ebx
cmp byte [ebx], 0xa
je 0x10053bb2
mov edx, dword [ebp - 0x20]
push edx
call esi
jmp 0x10053bbc
push 0x105
push 0x1019e938
call fcn.10042f40
add esp, 8
mov ecx, 0x1019e938
call fcn.10049c40
push str.general.log
push 0x1019e938
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call esi
push closesocket
push 4
push 3
push 4
mov edi, 0x1019e938
call fcn.10033690
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x1c], edi
call fcn.1004cb20
test eax, eax
jne 0x10053987
mov byte [0x1019e938], al
push 0x105
push 0x1019e938
call fcn.10042f40
add esp, 8
mov ecx, 0x1019e938
call fcn.10049c40
push str.TEMPgeneral.log
push 0x1019e938
call esi
push closesocket
push 4
push 3
push 4
mov edi, 0x1019e938
call fcn.10033690
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x1c], edi
call fcn.1004cb20
test eax, eax
jne 0x10053987
mov byte [0x1019e938], al
push 0x1019e938
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, 0x1019e938
call fcn.10049c40
push str.general.log
push 0x1019e938
call esi
push closesocket
push 4
push 3
push 4
mov edi, 0x1019e938
call fcn.10033690
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x1c], edi
call fcn.1004cb20
test eax, eax
jne 0x10053987
mov byte [0x1019e938], al
mov ecx, 0x1019e938
call fcn.10063a70
mov ecx, 0x1019e938
call fcn.10049c40
push str.general.log
push 0x1019e938
call esi
push closesocket
push 4
push 3
push 4
mov edi, 0x1019e938
call fcn.10033690
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x1c], edi
call fcn.1004cb20
test eax, eax
je 0x10053c96
jmp 0x10053987
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0x30], 0
mov ecx, dword [ebp - 0x20]
call fcn.10031930
mov ebx, eax
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp - 0x20]
cmp ebx, 1
jne 0x10053bea
cmp byte [eax], 0xa
jne 0x10053be7
mov byte [eax], 0
xor ebx, ebx
mov dword [ebp - 0x24], ebx
jmp 0x10053c0e
cmp ebx, 1
jbe 0x10053c03
cmp byte [ebx + eax - 1], 0xa
jne 0x10053c03
cmp byte [ebx + eax - 2], 0xd
je 0x10053c03
mov byte [ebx + eax - 1], 0
dec ebx
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x10053c0e
cmp byte [ebx + eax - 1], 0xa
je 0x10053c1c
push 0x10148098
push eax
call esi
add ebx, 2
mov dword [ebp - 0x24], ebx
mov ecx, dword [0x1017f1b4]
mov eax, ecx
call fcn.1004cb20
push 2
push 0
push 0
test eax, eax
jne 0x10053c5d
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10053c45
lea ecx, [ebp - 0x1c]
push ecx
jmp 0x10053c91
push 0
lea edx, [ebp - 0x30]
push edx
push ebx
mov eax, dword [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x1c]
push ecx
jmp 0x10053c91
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x10053c8c
push 0
lea edx, [ebp - 0x30]
push edx
push ebx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [0x1017f1b4]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10053c96
lea edx, [ebp - 0x1c]
push edx
call fcn.100673f0
push 0x1017f1b4
call fcn.100673f0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x10053ca6
push eax
call fcn.1010dc10
add esp, 4
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x10053cd4
push eax
call fcn.1010dc10
add esp, 4
jmp 0x10053cd4
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x1019e934]
test eax, eax
je 0x10053cf1
cmp dword [ebp - 0x2c], 1
jne 0x10053cf1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x30c]
xor ecx, ebp
call fcn.1010d699
add ebp, 0x310
mov esp, ebp
pop ebp
ret