Function at 0x46acd0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x840
mov eax, dword [0x4bacc0]
xor eax, esp
mov dword [esp + 0x83c], eax
mov eax, dword [esp + 0x844]
push esi
mov esi, dword [esp + 0x850]
add eax, 0xfffffbce
cmp eax, 0x1f
push edi
ja case.0x46ad09.1078
movzx eax, byte [eax + 0x46b1a8]
jmp dword [eax*4 + 0x46b180]
mov edx, dword [esp + 0x850]
xor ecx, ecx
test esi, esi
sete cl
lea ecx, [ecx*4 + 4]
push ecx
push edx
call fcn.00434740
xor esi, esi
jmp 0x46b166
mov eax, dword [esp + 0x850]
push esi
push eax
call fcn.00434620
mov esi, eax
and esi, 0xfffffff
jmp 0x46b166
mov ecx, dword [esp + 0x850]
push ecx
call fcn.00434320
mov esi, eax
and esi, 0xfffffff
jmp 0x46b166
mov ecx, dword [esp + 0x850]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.00434480
mov esi, eax
test esi, esi
jne 0x46b166
mov esi, dword [esp + 0x24]
add esi, esi
or esi, dword [esp + 0xc]
jmp 0x46b166
mov edx, dword [esp + 0x850]
push 0
push edx
call fcn.00434860
xor esi, esi
jmp 0x46b166
test esi, esi
je 0x46adcd
mov eax, dword [0x4fcfd8]
push esi
push 3
push 0x401
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
xor esi, esi
jmp 0x46b166
mov ecx, dword [0x4fcfd8]
push 0x4def48
push 3
push 0x401
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
xor esi, esi
jmp 0x46b166
mov eax, dword [esp + 0x850]
sub eax, 1
je 0x46ae39
sub eax, 1
je 0x46ae1e
sub eax, 1
jne 0x46ae4d
push 0
push 0
push 0
push esi
push 0x78c
call fcn.004683f0
add esp, 0x14
xor esi, esi
jmp 0x46b166
push 0
push 0
push 0
push esi
push 0x728
call fcn.004683f0
add esp, 0x14
xor esi, esi
jmp 0x46b166
push 0
push 0
push 0
push esi
push 0x6c4
call fcn.004683f0
add esp, 0x14
xor esi, esi
jmp 0x46b166
mov edi, dword [esp + 0x850]
lea eax, [edi - 1]
cmp eax, 3
ja case.0x46ad09.1078
jmp dword [eax*4 + 0x46b1c8]
mov edx, dword [esi]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push edx
lea eax, [esp + 0x48]
push str.COM_d
push eax
call edi
add esp, 0xc
push 0
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
lea ecx, [esp + 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x18], eax
je 0x46aef8
lea edx, [esp + 0x28]
push edx
push eax
mov dword [esp + 0x30], 0x1c
call dword [sym.imp.KERNEL32.dll_GetCommState]
mov cl, byte [esi + 8]
mov dl, byte [esi + 0xc]
mov eax, dword [esi + 4]
mov byte [esp + 0x3a], cl
lea ecx, [esp + 0x28]
mov byte [esp + 0x3b], dl
mov edx, dword [esi + 0x18]
mov dword [esp + 0x2c], eax
mov al, byte [esi + 0x10]
push ecx
push edx
mov byte [esp + 0x44], al
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x46af00
mov eax, dword [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
jmp 0x46b166
cmp dword [esi + 0x14], 0
je 0x46af61
mov ecx, dword [0x4fcfbc]
mov edx, dword [0x4def38]
push esi
push 0x46aab0
push ecx
push 0xa7
push edx
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [esi + 0x1c], eax
mov eax, dword [esi]
push 0x4dec98
push eax
lea ecx, [esp + 0x4c]
push str.COM_d___Log____s
push ecx
call edi
mov eax, dword [esi + 0x1c]
add esp, 0x10
lea edx, [esp + 0x44]
push edx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [esi + 0x1c]
push 5
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
xor esi, esi
jmp 0x46b166
mov dword [esi + 0x1c], 0
xor esi, esi
jmp 0x46b166
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x46af7d
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
mov edx, dword [esi + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
jmp 0x46b166
xor eax, eax
push eax
push eax
push 1
push eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp edi, 3
mov dword [esp + 0x20], eax
jne 0x46afd6
mov edx, dword [esi + 0x24]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi + 0x20]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esi + 0x18]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x46aff2
mov ecx, dword [esi + 0x24]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esi + 0x20]
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 0x18]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 0x28]
mov edx, dword [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
mov eax, dword [esi + 0x18]
jne 0x46b077
push eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
cmp dword [esi + 0x1c], 0
je 0x46b062
cmp edi, 3
mov eax, str._In__02d___02d_:
je 0x46b027
mov eax, str.Out__02d___02d_:
mov ecx, dword [esp + 8]
mov edx, dword [esi + 0x24]
push ecx
push edx
push eax
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x54]
push ecx
push edx
call fcn.0046abf0
mov eax, dword [esi + 0x1c]
push str.Time_out_r_n
push eax
call fcn.0046abf0
add esp, 0x20
push 0
call fcn.00432430
mov edx, dword [esp + 0x20]
push edx
mov esi, 0xfffffffe
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x46b166
push 1
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp dword [esi + 0x1c], 0
je 0x46b107
cmp edi, 3
mov eax, str._In__02d___02d_:
je 0x46b09f
mov eax, str.Out__02d___02d_:
mov ecx, dword [esp + 8]
mov edx, dword [esi + 0x24]
push ecx
push edx
push eax
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x54]
push ecx
push edx
call fcn.0046abf0
mov eax, dword [esp + 0x20]
add esp, 0x18
test eax, eax
je 0x46b0ef
push 1
push eax
mov eax, dword [esi + 0x20]
push eax
lea ecx, [esp + 0x50]
push ecx
call fcn.0046f8e0
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0x54]
push edx
push eax
call fcn.0046abf0
add esp, 0x18
mov ecx, dword [esi + 0x1c]
push 0x4a1894
push ecx
call fcn.0046abf0
add esp, 8
push 0
call fcn.00432430
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x46b166
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push eax
push ecx
push edx
lea eax, [esp + 0x50]
push str.__d:_d:_d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
add esp, 0x14
push ecx
mov ecx, dword [esi + 0x14]
push edx
mov edx, dword [esi + 0x10]
push eax
mov eax, dword [esi + 0xc]
push ecx
push edx
push eax
lea ecx, [esp + 0x5c]
push ecx
call fcn.00433fd0
mov esi, eax
and esi, 0xfffffff
jmp 0x46b166
mov esi, dword [esp + 0xc]
mov ecx, dword [esp + 0x844]
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.004810ab
add esp, 0x840
ret