Function at 0x414630
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x4c6af0]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x11], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 8]
push eax
call fcn.00414430
add esp, 4
test eax, eax
jne 0x414674
push str._r_n_Jump_fail_
mov ecx, 0x517534
call fcn.0042cf90
xor eax, eax
jmp 0x414cb9
mov ecx, dword [ebp + 8]
push ecx
call fcn.004144d0
add esp, 4
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
mov dword [0x517484], edx
push 0x2000
call fcn.004527fe
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4146b8
push str._r_n_Memory_fail_
mov ecx, 0x517534
call fcn.0042cf90
xor eax, eax
jmp 0x414cb9
mov dword [0x516784], 0
movsx eax, byte [ebp + 0x10]
cmp eax, 1
jne 0x4147ea
cmp dword [ebp - 0xc], 0x2307
jne 0x414745
mov dword [0x516784], 7
mov byte [ebp - 0x11], 1
movsx ecx, byte [ebp - 0x11]
test ecx, ecx
je 0x414740
push 0x40000
push 0x4d64a8
push 0
push 0xb1
call fcn.0040a690
add esp, 0x10
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x40000
jae 0x414740
push 0x40000
push 0
push 0x4d64a8
call fcn.0044fbf0
add esp, 0xc
push 0x40000
push 0x4d64a8
push 1
push 0xb1
call fcn.0040a690
add esp, 0x10
jmp 0x4147ce
cmp dword [ebp - 0xc], 0x2309
jne 0x41477d
mov dword [0x516784], 9
push 0x40000
push 0
push 0x4d64a8
call fcn.0044fbf0
add esp, 0xc
push str._r_n_no_support_2309_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x4147ce
cmp dword [ebp - 0xc], 0x2311
jne 0x4147bf
mov dword [0x516784], 0x11
push 0x40000
push 0
push 0x4d64a8
call fcn.0044fbf0
add esp, 0xc
push 0x40000
push 0x4d64a8
push 1
push 0xb5
call fcn.0040a690
add esp, 0x10
jmp 0x4147ce
push str._r_n_unknow_controller_
mov ecx, 0x517534
call fcn.0042cf90
push 0x4d61a0
push 0x4d63a0
push 0xff
call fcn.00425da0
add esp, 0xc
jmp 0x414981
movsx edx, byte [ebp + 0x10]
cmp edx, 2
jne 0x4147f8
jmp 0x414981
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x28], 0
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x28]
movsx ecx, byte [eax]
cmp ecx, 0x20
je 0x414825
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x28]
movsx eax, byte [edx]
cmp eax, 9
jne 0x414830
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
jmp 0x414809
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x230], edx
jmp 0x41484a
mov eax, dword [ebp - 0x230]
add eax, 1
mov dword [ebp - 0x230], eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0044f870
add esp, 4
cmp dword [ebp - 0x230], eax
jge 0x41488e
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x230]
movsx eax, byte [edx]
cmp eax, 0x20
jl 0x414880
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x230]
movsx edx, byte [ecx]
cmp edx, 0x7a
jle 0x41488c
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x230]
mov byte [eax], 0
jmp 0x41483b
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x28]
push ecx
push 0x517340
push 0x4b0054
lea edx, [ebp - 0x228]
push edx
call fcn.0044fc6a
add esp, 0x10
push 0x4b005c
lea eax, [ebp - 0x228]
push eax
call fcn.00451db8
add esp, 8
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
jne 0x4148e7
push str._r_n_ISP_file_open_fail_
mov ecx, 0x517534
call fcn.0042cf90
xor eax, eax
jmp 0x414cb9
mov ecx, dword [ebp - 0x22c]
push ecx
call fcn.004526bb
add esp, 4
push eax
call fcn.004525bc
add esp, 4
mov dword [0x4cbd8c], eax
cmp dword [0x4cbd8c], 0x200
jle 0x41491c
cmp dword [0x4cbd8c], 0x20800
jle 0x414932
push str._r_n_ISP_file_size_error_1_
mov ecx, 0x517534
call fcn.0042cf90
xor eax, eax
jmp 0x414cb9
mov edx, dword [ebp - 0x22c]
push edx
mov eax, dword [0x4cbd8c]
push eax
push 1
push 0x4d64a8
call fcn.0045259f
add esp, 0x10
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x22c]
push ecx
call fcn.00451b5c
add esp, 4
mov edx, dword [ebp - 0x28]
cmp edx, dword [0x4cbd8c]
je 0x414981
push str._r_n_ISP_file_size_error_2_
mov ecx, 0x517534
call fcn.0042cf90
xor eax, eax
jmp 0x414cb9
mov byte [0x4d64a0], 0
mov al, byte [0x4d64b8]
mov byte [0x4d64a1], al
mov cl, byte [0x4d64c8]
mov byte [0x4d64a3], cl
mov dl, byte [0x4d64c9]
mov byte [0x4d64a4], dl
movsx eax, byte [0x4d64a1]
movsx ecx, byte [0x4d64a3]
sub eax, ecx
mov byte [0x4d64a2], al
movzx edx, byte [0x4d64b8]
shl edx, 0xa
add edx, 0x200
mov dword [0x4cbd8c], edx
movzx eax, byte [0x4d64c8]
test eax, eax
je 0x4149f4
movzx ecx, byte [0x4d64c9]
test ecx, ecx
je 0x4149f4
mov byte [0x4d64a5], 1
jmp 0x4149fb
mov byte [0x4d64a5], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x234], 0
jmp 0x414a1d
mov edx, dword [ebp - 0x234]
add edx, 1
mov dword [ebp - 0x234], edx
cmp dword [ebp - 0x234], 3
jge 0x414c4e
mov dword [ebp - 0x10], 0
push 0x4d64a8
push 3
push 0
push 0x200
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0042e0a0
add esp, 0x18
test eax, eax
jne 0x414a62
push str._r_n_Write_ISP_Header_fail_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x414a0e
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0042e170
add esp, 8
test eax, eax
jne 0x414a87
push str._r_n_Check_ISP_Header_fail_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x414a0e
movzx eax, byte [ebp - 0x24]
cmp eax, 0x55
je 0x414aa4
push str._r_n_ISP_Header_Status_fail_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x414a0e
mov eax, dword [0x4cbd8c]
cdq
and edx, 0x1ff
add eax, edx
sar eax, 9
mov ecx, dword [0x4cbd8c]
and ecx, 0x800001ff
jns 0x414acb
dec ecx
or ecx, 0xfffffe00
inc ecx
neg ecx
sbb ecx, ecx
neg ecx
lea edx, [eax + ecx - 1]
mov dword [ebp - 0x23c], edx
mov eax, dword [ebp - 0x23c]
shl eax, 9
mov dword [ebp - 0x238], eax
push 0x4d66a8
push 2
push 0
mov ecx, dword [ebp - 0x238]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0042e0a0
add esp, 0x18
test eax, eax
jne 0x414b20
push str._r_n_Write_ISP_Body_fail_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x414a0e
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042e170
add esp, 8
test eax, eax
jne 0x414b48
push str._r_n_Check_ISP_Body_fail_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x414a0e
movzx edx, byte [ebp - 0x24]
cmp edx, 0xa5
je 0x414b68
push str._r_n_ISP_Body_Status_fail_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x414a0e
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x240], 0
jmp 0x414b8a
mov eax, dword [ebp - 0x240]
add eax, 0x10
mov dword [ebp - 0x240], eax
mov ecx, dword [ebp - 0x240]
cmp ecx, dword [ebp - 0x23c]
jge 0x414c41
mov edx, dword [ebp - 0x23c]
sub edx, dword [ebp - 0x240]
mov dword [ebp - 0x244], edx
cmp dword [ebp - 0x244], 0x10
jle 0x414bc1
mov dword [ebp - 0x244], 0x10
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x244]
push ecx
mov edx, dword [ebp - 0x240]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0042e220
add esp, 0x10
test eax, eax
jne 0x414bfb
mov dword [ebp - 0x10], 0
push str._r_n_Read_ISP_fail_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x414c41
mov ecx, dword [ebp - 0x244]
shl ecx, 9
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x240]
shl eax, 9
add eax, 0x4d66a8
push eax
call fcn.0044fdaa
add esp, 0xc
test eax, eax
je 0x414c3c
mov dword [ebp - 0x10], 0
push str._r_n_Compare_ISP_fail_
mov ecx, 0x517534
call fcn.0042cf90
jmp 0x414c41
jmp 0x414b7b
cmp dword [ebp - 0x10], 0
je 0x414c49
jmp 0x414c4e
jmp 0x414a0e
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00452721
add esp, 4
cmp dword [ebp - 0x10], 0
jne 0x414c73
push str._r_n_Install_ISP_fail_
mov ecx, 0x517534
call fcn.0042cf90
xor eax, eax
jmp 0x414cb9
cmp dword [0x516654], 1
jne 0x414c91
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0042e010
add esp, 0xc
mov dword [ebp - 4], eax
jmp 0x414cb6
cmp dword [0x516654], 2
je 0x414ca3
cmp dword [0x516654], 3
jne 0x414cb6
push 1
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0042e010
add esp, 0xc
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0044e8ae
mov esp, ebp
pop ebp
ret