Function at 0x10037a70
Capabilities:
Check mutex on windows
Get file size
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1008e698
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x448
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x28], ebp
mov al, byte [ebp + 0x10c]
lea esi, [ebp + 0x10c]
test al, al
jne 0x10037aaf
mov eax, 1
jmp 0x10037f89
mov ebx, dword [esp + 0x468]
test ebx, ebx
jl 0x10037f84
cmp ebx, 0xc
jge 0x10037f84
lea eax, [ebp + 0x314]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
test edi, edi
mov dword [esp + 0x2c], edi
jne 0x10037aec
mov eax, 8
jmp 0x10037f89
push 0x2710
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x10037f76
cmp eax, 0xffffffff
je 0x10037f76
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x59]
mov byte [esp + 0x58], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edi, dword [ebx*4 + 0x1009419c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [ebp + 0x108]
mov edx, dword [esp + 0x56]
push eax
mov eax, dword [esp + 0x58]
add ebp, 4
push ecx
mov ecx, dword [esp + 0x5a]
push ebp
and edx, 0xffff
push edi
push edx
mov edx, dword [esp + 0x64]
and eax, 0xffff
and ecx, 0xffff
push eax
mov eax, dword [esp + 0x66]
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x66]
push edx
mov edx, dword [esp + 0x68]
and eax, 0xffff
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
lea eax, [esp + 0x88]
push str._04d__02d__02d__02d:_02d:_02d:_03d_t_s_t_s_t_d_t_x:_x_t
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [esp + 0x4a4]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x38
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x58]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 2]
mov dword [esp + 0x40], eax
call fcn.10061a10
mov ebp, eax
mov al, byte [ebp + 0x2c]
test al, al
je 0x10037d60
mov cl, byte [esp + 0x17]
xor eax, eax
mov byte [esp + 0x18], cl
mov edi, esi
or ecx, 0xffffffff
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x20], eax
mov ebx, ecx
lea ecx, [esp + 0x1c]
push ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x10037c3a
mov edi, dword [esp + 0x1c]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], ebx
mov byte [eax + ebx], 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x460], 0
push ecx
mov ecx, ebp
call fcn.10061ba0
test eax, eax
je 0x10037c9d
mov esi, dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x10037c93
mov al, byte [ecx - 1]
test al, al
je 0x10037c89
cmp al, 0xff
je 0x10037c89
dec al
mov byte [ecx - 1], al
mov eax, 0xa
jmp 0x10037f89
dec ecx
push ecx
call fcn.10088e50
add esp, 4
mov eax, 0xa
jmp 0x10037f89
lea edx, [esp + 0x18]
mov ecx, ebp
push edx
call fcn.10062390
cmp eax, 0xffffffff
jne 0x10037cb0
xor eax, eax
mov ecx, dword [esp + 0x40]
add eax, ecx
mov ecx, dword [0x100a7e48]
cmp eax, ecx
jle 0x10037cd4
mov edx, dword [esp + 0x470]
lea eax, [esp + 0x18]
push edx
push eax
mov ecx, ebp
call fcn.10061ef0
lea ecx, [esp + 0x58]
lea edx, [esp + 0x18]
push ecx
push edx
mov ecx, ebp
call fcn.10061d50
mov eax, dword [esp + 0x46c]
lea ecx, [esp + 0x18]
push eax
push ecx
mov ecx, ebp
call fcn.10061d50
lea edx, [esp + 0x18]
push 0x100a8138
push edx
mov ecx, ebp
call fcn.10061d50
cmp dword [esp + 0x468], 8
jne 0x10037d25
lea eax, [esp + 0x18]
push 0x100a8138
push eax
mov ecx, ebp
call fcn.10061d50
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x460], 0xffffffff
test ecx, ecx
je 0x10037f2e
mov al, byte [ecx - 1]
test al, al
je 0x10037d51
cmp al, 0xff
je 0x10037d51
dec al
mov byte [ecx - 1], al
jmp 0x10037f2e
dec ecx
push ecx
call fcn.10088e50
add esp, 4
jmp 0x10037f2e
push 0
push 0x80
push 3
push 0
push 0
push connect
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10037d8d
xor ebx, ebx
test edi, edi
je 0x10037d9d
cmp edi, 0xffffffff
je 0x10037d9d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x40]
mov eax, dword [0x100a7e48]
add ebx, ecx
cmp ebx, eax
jle 0x10037e6a
xor eax, eax
mov edi, esi
or ecx, 0xffffffff
mov dl, byte [esp + 0x17]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
lea ecx, [esp + 0x34]
push ebx
mov byte [esp + 0x38], dl
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x10037e0d
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x34]
mov ecx, ebx
mov edx, ecx
lea esi, [eax + 0x10c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x38], ebx
mov byte [eax + ebx], 0
mov ecx, dword [esp + 0x470]
lea edx, [esp + 0x30]
push ecx
push edx
mov ecx, ebp
mov dword [esp + 0x468], 1
call fcn.10061ef0
mov eax, dword [esp + 0x34]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x460], 0xffffffff
je 0x10037e5e
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x10037e55
cmp al, 0xff
je 0x10037e55
dec al
mov byte [ecx], al
jmp 0x10037e5e
push ecx
call fcn.10088e50
add esp, 4
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov eax, dword [esp + 0x28]
push 0
push 0x80
push 4
push 0
push 1
add eax, 0x10c
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x10037f5d
cmp esi, 0xffffffff
je 0x10037f5d
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x10]
push ebx
push ecx
lea edi, [esp + 0x60]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x60]
not ecx
dec ecx
mov dword [esp + 0x18], ebx
push ecx
push edx
push esi
call ebp
mov edx, dword [esp + 0x46c]
lea eax, [esp + 0x10]
push ebx
push eax
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x18], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call ebp
lea ecx, [esp + 0x10]
push ebx
push ecx
push 2
push 0x100a8138
push esi
mov dword [esp + 0x24], ebx
call ebp
cmp dword [esp + 0x468], 8
jne 0x10037f27
lea edx, [esp + 0x10]
push ebx
push edx
push 2
push 0x100a8138
push esi
mov dword [esp + 0x24], ebx
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x468]
xor edi, edi
cmp eax, 5
jne 0x10037f47
mov ecx, dword [esp + 0x28]
call fcn.10037fd0
mov edi, eax
mov esi, dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x10037f89
mov esi, dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xa
jmp 0x10037f89
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 9
jmp 0x10037f89
mov eax, 2
mov ecx, dword [esp + 0x458]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x454
ret 0xc