Function at 0x40bd70
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [0x7326e4]
test ecx, ecx
je 0x40bf3c
push ebp
push edi
push esi
push ebx
mov esi, edx
sub esp, 0xe5c
mov ebp, dword [edx + 0x168]
mov dword [esp + 0x44], eax
mov dword [esp], ebp
call sym._get_thread
mov ecx, dword [esi + 0x16c]
mov ebx, dword [eax + 0x18]
lea eax, [esi + 0x100]
mov edi, dword [esi + 0x218]
mov dword [esp + 4], 0x20
mov dword [esp], eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x3c], edi
call sym._bin2hex
mov edi, eax
lea eax, [esi + 0x120]
mov dword [esp + 4], 0x20
mov dword [esp], eax
call sym._bin2hex
mov dword [esp], esi
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp + 0x40], eax
call sym._bin2hex
mov esi, dword [esp + 0x40]
mov dword [esp + 0x24], ebp
lea ebp, [esp + 0x50]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x28], esi
mov eax, dword [ebx + 8]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx + 0x18c]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x14], edi
mov dword [esp + 8], str._lu__s__s__s__s_u__u__s__s_n
mov dword [esp + 4], 0x400
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], ecx
mov dword [esp], ebp
mov dword [esp + 0xc], eax
call sym._snprintf
mov dword [esp], edi
mov ebx, eax
call sym._free
mov dword [esp], esi
call sym._free
mov edx, dword [esp + 0x48]
mov dword [esp], edx
call sym._free
cmp ebx, 0x3ff
jg 0x40bf40
test ebx, ebx
js 0x40bf60
mov dword [esp], 0x7326e8
call dbg.pthread_mutex_lock
test eax, eax
jne 0x40bf83
mov eax, dword [0x7326e4]
mov dword [esp + 4], ebx
mov dword [esp + 8], 1
mov dword [esp], ebp
mov dword [esp + 0xc], eax
call sym._fwrite
mov ebx, eax
mov eax, dword [0x7326e4]
mov dword [esp], eax
call sym._fflush
mov dword [esp], 0x7326e8
call dbg.pthread_mutex_unlock
test eax, eax
jne 0x40bff2
call dword [0x5bb9e0]
cmp ebx, 1
je 0x40bf32
cmp byte [0x745ef7], 0
jne 0x40befb
cmp byte [0x732fa0], 0
je 0x40bf50
mov dword [esp + 8], str.sharelog_fwrite_error
lea ebx, [esp + 0x450]
mov dword [esp + 4], 0xa00
mov dword [esp], ebx
call sym._snprintf
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0
call sym.__applog
add esp, 0xe5c
pop ebx
pop esi
pop edi
pop ebp
repz ret
mov byte [esp + 0x44f], 0
jmp 0x40be8a
mov eax, dword [0x5bc2e0]
test eax, eax
jns 0x40befb
jmp 0x40bf32
cmp byte [0x745ef7], 0
jne 0x40bf76
cmp byte [0x732fa0], 0
je 0x40c061
mov dword [esp + 8], str.sharelog_printf_error
jmp 0x40bf03
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 0x18], 0x327
mov dword [esp + 0x14], str.sharelog
lea ebx, [esp + 0x450]
mov dword [esp + 0x10], str.cgminer.c
mov eax, dword [eax]
mov dword [esp + 8], 0x5c1a98
mov dword [esp + 4], 0xa00
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sym._snprintf
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov dword [esp], 0
call sym.__applog
mov dword [esp + 4], 1
mov dword [esp], 1
call sym.___quit
call dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 0x18], 0x32a
mov dword [esp + 0x14], str.sharelog
lea ebx, [esp + 0x450]
mov dword [esp + 0x10], str.cgminer.c
mov eax, dword [eax]
mov dword [esp + 8], 0x5c1ac8
mov dword [esp + 4], 0xa00
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sym._snprintf
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov dword [esp], 0
call sym.__applog
mov dword [esp + 4], 1
mov dword [esp], 1
call sym.___quit
mov edx, dword [0x5bc2e0]
test edx, edx
jns 0x40bf76
jmp 0x40bf32