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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [ebp + 8]
push eax
call fcn.1000ef40
add esp, 4
test eax, eax
ja 0x100028b8
mov eax, 0x3ea
jmp 0x10002ef5
push 0x14
push 0
lea ecx, [ebp - 0x14]
push ecx
call fcn.1000f350
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
call fcn.1000ef40
add esp, 4
push eax
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x14]
push ecx
call fcn.1000efc0
add esp, 0xc
mov dword [ebp - 0x54], 0
jmp 0x100028f7
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x54], edx
lea eax, [ebp - 0x14]
push eax
call fcn.1000ef40
add esp, 4
cmp dword [ebp - 0x54], eax
jae 0x10002930
mov ecx, dword [ebp - 0x54]
movsx edx, byte [ebp + ecx - 0x14]
push edx
call fcn.1000f430
add esp, 4
test eax, eax
je 0x1000292e
mov eax, dword [ebp - 0x54]
mov cl, byte [ebp + eax - 0x14]
sub cl, 0x20
mov edx, dword [ebp - 0x54]
mov byte [ebp + edx - 0x14], cl
jmp 0x100028ee
push 0x1001c0c8
lea eax, [ebp - 0x14]
push eax
call fcn.1000f3b0
add esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x10002954
mov eax, 0x3ea
jmp 0x10002ef5
cmp dword [ebp + 0xc], 0x960
je 0x100029a6
cmp dword [ebp + 0xc], 0x12c0
je 0x100029a6
cmp dword [ebp + 0xc], 0x2580
je 0x100029a6
cmp dword [ebp + 0xc], 0x4b00
je 0x100029a6
cmp dword [ebp + 0xc], 0x9600
je 0x100029a6
cmp dword [ebp + 0xc], 0xdac0
je 0x100029a6
cmp dword [ebp + 0xc], 0xe100
je 0x100029a6
cmp dword [ebp + 0xc], 0x1c200
je 0x100029a6
mov eax, 0x3ea
jmp 0x10002ef5
cmp dword [ebp + 0x10], 0
jl 0x100029b2
cmp dword [ebp + 0x10], 3
jle 0x100029bc
mov eax, 0x3ea
jmp 0x10002ef5
push 0x14
push 0
lea ecx, [ebp - 0x4c]
push ecx
call fcn.1000f350
add esp, 0xc
lea edx, [ebp - 0x14]
push edx
call fcn.1000ef40
add esp, 4
cmp eax, 5
jb 0x10002a0f
push 4
push 0x1001c0cc
lea eax, [ebp - 0x4c]
push eax
call fcn.1000efc0
add esp, 0xc
lea ecx, [ebp - 0x14]
push ecx
call fcn.1000ef40
add esp, 4
push eax
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x48]
push eax
call fcn.1000efc0
add esp, 0xc
jmp 0x10002a2c
lea ecx, [ebp - 0x14]
push ecx
call fcn.1000ef40
add esp, 4
push eax
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x4c]
push eax
call fcn.1000efc0
add esp, 0xc
cmp dword [0x10017050], 0xffffffff
je 0x10002a4c
mov ecx, dword [0x10017050]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea edx, [ebp - 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x10017050], eax
cmp dword [0x10017050], 0xffffffff
jne 0x10002a7d
mov eax, 0x3e9
jmp 0x10002ef5
mov dword [ebp - 0x88], 0x1c
lea eax, [ebp - 0x88]
push eax
mov ecx, dword [0x10017050]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x10002ac9
cmp dword [0x10017050], 0xffffffff
je 0x10002abf
mov edx, dword [0x10017050]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3e9
jmp 0x10002ef5
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x84], eax
mov byte [ebp - 0x76], 8
mov byte [ebp - 0x74], 0
mov byte [ebp - 0x75], 0
mov ecx, dword [ebp - 0x80]
and ecx, 0xfffffff7
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
and edx, 0xffffffcf
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
and al, 0xfb
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
and ch, 0xcf
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
and edx, 0xffffffbf
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
and ah, 0xfe
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
and ch, 0xfd
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x8c], edx
cmp dword [ebp - 0x8c], 3
ja case.default.0x10002b38
mov eax, dword [ebp - 0x8c]
jmp dword [eax*4 + 0x10002efb]
mov ecx, dword [ebp - 0x80]
and ecx, 0xffffffcf
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
and dh, 0xcf
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
and al, 0xfb
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
and ecx, 0xfffffff7
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
or dh, 1
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
or ah, 2
mov dword [ebp - 0x80], eax
mov byte [ebp - 0x73], 0x11
mov byte [ebp - 0x72], 0x13
mov ecx, dword [ebp - 0x80]
and ecx, 0xffffffbf
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
and dl, 0x7f
mov dword [ebp - 0x80], edx
jmp case.default.0x10002b38
mov eax, dword [ebp - 0x80]
and al, 0xcf
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
and ch, 0xcf
or ch, 0x10
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
or edx, 4
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
and al, 0xf7
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
and ecx, 0xffffffbf
mov dword [ebp - 0x80], ecx
jmp case.default.0x10002b38
mov edx, dword [ebp - 0x80]
and edx, 0xffffffcf
or edx, 0x10
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
and ah, 0xcf
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
and ecx, 0xfffffffb
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
or edx, 8
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
and al, 0xbf
mov dword [ebp - 0x80], eax
jmp case.default.0x10002b38
mov ecx, dword [ebp - 0x80]
and ecx, 0xffffffcf
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
and dh, 0xcf
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
and al, 0xfb
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
and ecx, 0xfffffff7
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
and dh, 0xfe
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
or al, 1
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
or ecx, 2
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0x80]
and dh, 0xf7
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
and ah, 0xbf
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
or cl, 0x80
mov dword [ebp - 0x80], ecx
lea edx, [ebp - 0x88]
push edx
mov eax, dword [0x10017050]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x10002c8d
cmp dword [0x10017050], 0xffffffff
je 0x10002c83
mov ecx, dword [0x10017050]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3e9
jmp 0x10002ef5
lea edx, [ebp - 0x38]
push edx
mov eax, dword [0x10017050]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
test eax, eax
jne 0x10002ccb
cmp dword [0x10017050], 0xffffffff
je 0x10002cc1
mov ecx, dword [0x10017050]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3e9
jmp 0x10002ef5
mov dword [ebp - 0x38], 0xffffffff
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0xbb8
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0x1388
lea edx, [ebp - 0x38]
push edx
mov eax, dword [0x10017050]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x10002d2c
cmp dword [0x10017050], 0xffffffff
je 0x10002d22
mov ecx, dword [0x10017050]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3e9
jmp 0x10002ef5
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0xc
mov edx, dword [0x10017050]
push edx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
test eax, eax
jne 0x10002d73
cmp dword [0x10017050], 0xffffffff
je 0x10002d69
mov eax, dword [0x10017050]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3e9
jmp 0x10002ef5
push 3
push 0
lea ecx, [ebp - 0x58]
push ecx
call fcn.1000f350
add esp, 0xc
push 3
push 0
lea edx, [ebp - 0x20]
push edx
call fcn.1000f350
add esp, 0xc
push 2
push 0x1001c0d4
lea eax, [ebp - 0x20]
push eax
call fcn.1000f2f5
add esp, 0xc
push 0
lea ecx, [ebp - 0x50]
push ecx
push 2
lea edx, [ebp - 0x20]
push edx
mov eax, dword [0x10017050]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10002dec
cmp dword [0x10017050], 0xffffffff
je 0x10002de2
mov ecx, dword [0x10017050]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3e9
jmp 0x10002ef5
cmp dword [ebp - 0x50], 2
je 0x10002e1c
cmp dword [0x10017050], 0xffffffff
je 0x10002e12
mov edx, dword [0x10017050]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3e9
jmp 0x10002ef5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
add eax, 0xbb8
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x60]
jle 0x10002eb7
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x5c]
push eax
mov ecx, dword [0x10017050]
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
cmp dword [ebp - 0x68], 1
jne 0x10002ea9
push 0
lea edx, [ebp - 0x18]
push edx
push 1
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [0x10017050]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10002e97
cmp dword [0x10017050], 0xffffffff
je 0x10002e90
mov edx, dword [0x10017050]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3e9
jmp 0x10002ef5
movsx eax, byte [ebp - 0x58]
cmp eax, 0x59
je 0x10002ea7
mov eax, 0x3e9
jmp 0x10002ef5
jmp 0x10002eb7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x60], eax
jmp 0x10002e30
mov ecx, dword [ebp - 0x60]
cmp ecx, dword [ebp - 0x24]
jl 0x10002ee6
cmp dword [0x10017050], 0xffffffff
je 0x10002edf
mov edx, dword [0x10017050]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10017050], 0xffffffff
mov eax, 0x3f2
jmp 0x10002ef5
mov dword [0x1001fb18], 1
mov eax, 0x3e8
mov esp, ebp
pop ebp
ret 0xc