Function at 0x403960
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x11c
mov eax, dword [0x587770]
xor eax, esp
mov dword [esp + 0x118], eax
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 5
jge 0x403b50
xor eax, eax
cmp eax, 0x56444c
je 0x4039d7
mov eax, dword [0x5893c4]
cmp eax, 0xffffffff
je 0x4039d7
push 0
lea ecx, [esp + 0x20]
push ecx
push 1
push 0x56444c
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4039d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_buffer_____Error:__ld
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
push 0x80
lea edx, [esp + 0x24]
push 0
push edx
call fcn.0050e990
mov edx, dword [ebx]
add esp, 0xc
push 1
lea eax, [esp + 0x14]
push eax
push 0x7f
lea ecx, [esp + 0x2c]
push ecx
push edx
mov eax, 0x64
call fcn.0040af10
mov eax, dword [esp + 0x10]
lea esi, [esp + 0x20]
test eax, eax
jle 0x403a23
mov cl, byte [esi]
cmp cl, 0x3f
je 0x403a1d
test cl, cl
jne 0x403a23
dec eax
inc esi
test eax, eax
jg 0x403a12
mov edi, esi
call fcn.00403730
mov eax, str.Synchronized_n
nop
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x403a50
test cl, cl
je 0x403a4c
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x403a50
add esi, 2
add eax, 2
test cl, cl
jne 0x403a30
xor eax, eax
jmp 0x403a55
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403a63
mov dword [esp + 0x14], 1
jmp 0x403aac
cmp dword [ebx], 0
je 0x403aac
cmp byte [ebx + 4], 0
je 0x403aac
mov al, 1
mov cl, al
mov edx, ebx
call fcn.00403780
push 0x64
call ebp
mov eax, dword [0x5893c4]
push 0xf
push eax
call dword [sym.imp.KERNEL32.dll_PurgeComm]
push 0x64
call ebp
mov al, 1
xor cl, cl
mov edx, ebx
call fcn.00403780
push 0x1f4
call ebp
xor al, al
xor cl, cl
mov edx, ebx
call fcn.00403780
inc dword [esp + 0x18]
cmp dword [esp + 0x14], 0
je 0x403987
xor ecx, ecx
cmp ecx, str.Synchronized_r_n
je 0x403b00
mov eax, dword [0x5893c4]
cmp eax, 0xffffffff
je 0x403b00
push ecx
lea edx, [esp + 0x20]
push edx
push 0xe
push str.Synchronized_r_n
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403b00
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_buffer_____Error:__ld
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
mov edx, dword [ebx]
push 2
lea eax, [esp + 0x14]
push eax
push 0x7f
lea ecx, [esp + 0x2c]
push ecx
push edx
mov eax, 0x3e8
call fcn.0040af10
lea edi, [esp + 0x20]
mov esi, edi
call fcn.00403730
mov ecx, str.Synchronized_nOK_n
mov eax, edi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403b75
test dl, dl
je 0x403b4c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403b75
add eax, 2
add ecx, 2
test dl, dl
jne 0x403b30
xor eax, eax
jmp 0x403b7a
cmp dword [esp + 0x14], 0
jne 0x403abb
push str._no_answer_on___n
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 4
or eax, 0xffffffff
jmp 0x403c87
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403b85
push str.No_answer_on_Synchronized_n
jmp 0x403b60
mov esi, dword [esp + 0x12c]
push esi
push str._ld_r_n
lea eax, [esp + 0xa8]
push 0x80
push eax
call fcn.0050ac70
lea eax, [esp + 0xb0]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403bb1
lea ecx, [esp + 0xa0]
sub eax, edx
test ecx, ecx
je 0x403c08
test eax, eax
jle 0x403c08
mov ecx, dword [0x5893c4]
cmp ecx, 0xffffffff
je 0x403c08
push 0
lea edx, [esp + 0x20]
push edx
push eax
lea eax, [esp + 0xac]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403c08
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_buffer_____Error:__ld
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
mov eax, dword [ebx]
push 2
lea ecx, [esp + 0x14]
push ecx
push 0x7f
lea edx, [esp + 0x2c]
push edx
push eax
mov eax, 0x3e8
call fcn.0040af10
push esi
push str._ld_nOK_n
lea ecx, [esp + 0xa8]
push 0x80
push ecx
call fcn.0050ac70
lea edi, [esp + 0x30]
add esp, 0x10
mov esi, edi
call fcn.00403730
lea ecx, [esp + 0xa0]
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403c72
test dl, dl
je 0x403c6e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403c72
add eax, 2
add ecx, 2
test dl, dl
jne 0x403c52
xor eax, eax
jmp 0x403c77
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403c85
push str.No_answer_on_Oscillator_Command_n
jmp 0x403b60
xor eax, eax
mov ecx, dword [esp + 0x124]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0050a0dc
add esp, 0x11c
ret 4