Function at 0x10040b390
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x578
cmp qword [0x1004546f8], 0
mov rdi, rcx
mov r12, rdx
je 0x10040b567
mov esi, dword [rdx + 0x170]
lea rbp, [rsp + 0x170]
mov ecx, esi
call fcn.100409920
mov r8, qword [r12 + 0x178]
mov edx, 0x20
mov r9, qword [r12 + 0x288]
lea rcx, [r12 + 0x100]
mov rbx, qword [rax + 0x28]
mov qword [rsp + 0x68], r8
mov qword [rsp + 0x60], r9
call fcn.1004207f0
lea rcx, [r12 + 0x120]
mov edx, 0x20
mov r14, rax
call fcn.1004207f0
mov rcx, r12
mov edx, pe_nt_image_headers64
mov r13, rax
call fcn.1004207f0
mov qword [rsp + 0x50], r13
mov r8, qword [rsp + 0x68]
mov rcx, rbp
mov qword [rsp + 0x58], rax
mov r15, rax
mov r9, qword [rsp + 0x60]
mov edx, 0x400
mov dword [rsp + 0x48], esi
mov eax, dword [rbx + 0x10]
mov dword [rsp + 0x40], eax
mov rax, qword [rbx + 8]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x38], rax
mov rax, qword [r8 + 0x1a0]
lea r8, str._lu__s__s__s__s_u__u__s__s_n
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x20], rdi
call sub.cygwin1.dll_snprintf
mov rcx, r14
mov r12d, eax
call fcn.10043bf30
mov rcx, r13
call fcn.10043bf30
mov rcx, r15
call fcn.10043bf30
cmp r12d, 0x3ff
jg 0x10040b580
test r12d, r12d
js 0x10040b5a0
lea rcx, [0x100454700]
call sub.cygwin1.dll_pthread_mutex_lock
test eax, eax
jne 0x10040b5e8
mov r9, qword [0x1004546f8]
movsxd rdx, r12d
mov r8d, 1
mov rcx, rbp
call sub.cygwin1.dll_fwrite
mov rcx, qword [0x1004546f8]
mov r12, rax
call sub.cygwin1.dll_fflush
lea rcx, [0x100454700]
call sub.cygwin1.dll_pthread_mutex_unlock
test eax, eax
jne 0x10040b650
mov rax, qword [0x10044d0b0]
call qword [rax]
cmp r12, 1
je 0x10040b567
cmp byte [0x100456840], 0
jne 0x10040b51e
mov rax, qword [0x10044cf80]
cmp byte [rax], 0
je 0x10040b590
movabs rdi, 0x676f6c6572616873
lea rdx, [rsp + 0x70]
movabs rbp, 0x2065746972776620
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], rbp
mov eax, 0x72
xor r8d, r8d
mov ecx, 3
mov dword [rsp + 0x80], 0x6f727265
mov word [rsp + 0x84], ax
call fcn.100433050
nop
add rsp, 0x578
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov byte [rsp + 0x56f], 0
jmp 0x10040b4ab
mov rax, qword [0x10044cf70]
cmp dword [rax], 2
jle 0x10040b567
jmp 0x10040b51e
cmp byte [0x100456840], 0
jne 0x10040b5b9
mov rax, qword [0x10044cf80]
cmp byte [rax], 0
je 0x10040b690
movabs rbx, 0x676f6c6572616873
lea rdx, [rsp + 0x70]
movabs rsi, 0x2066746e69727020
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rsi
jmp 0x10040b541
call sub.cygwin1.dll___errno
lea rbx, str.sharelog
lea r12, [rsp + 0x70]
mov dword [rsp + 0x30], 0x2c5
lea rsi, str.cgminer.c
mov qword [rsp + 0x28], rbx
lea r8, [0x100441b18]
mov qword [rsp + 0x20], rsi
mov r9d, dword [rax]
mov edx, 0x100
mov rcx, r12
call sub.cygwin1.dll_snprintf
mov rdx, r12
mov ecx, 3
mov r8d, 1
call fcn.100433050
mov edx, 1
mov ecx, 1
call fcn.100405a50
nop dword [rax + rax]
lea rdi, str.sharelog
lea r12, [rsp + 0x70]
call sub.cygwin1.dll___errno
mov qword [rsp + 0x28], rdi
lea rdi, str.cgminer.c
lea r8, [0x100441b98]
mov dword [rsp + 0x30], 0x2c8
mov qword [rsp + 0x20], rdi
mov r9d, dword [rax]
jmp 0x10040b61c
mov rax, qword [0x10044cf70]
cmp dword [rax], 2
jle 0x10040b567
jmp 0x10040b5b9