Function at 0x475e30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6a53c2
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x7e2670]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 0x74], 0
mov ecx, dword [ebp - 0x10c]
add ecx, 0x50
call fcn.00405300
movzx eax, al
test eax, eax
jne 0x475e92
mov ecx, dword [ebp - 0x10c]
add ecx, 0xc4
call fcn.00476d20
test eax, eax
jne 0x475eb0
push 0
mov ecx, dword [ebp - 0x10c]
call fcn.00475550
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0
je 0x475eb0
mov eax, dword [ebp - 0x74]
jmp 0x47646e
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x68], 0
mov byte [ebp - 0x6d], 0
push 0x70a364
mov ecx, dword [ebp - 0x10c]
add ecx, 4
call fcn.00404810
push eax
call fcn.00669fd1
add esp, 8
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
jne 0x475f07
push 0x70a368
call fcn.0066610b
add esp, 4
mov dword [ebp - 0x74], 0xffffffff
jmp 0x476408
mov dword [ebp - 0x7c], 0
push 2
push 0
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.00669e99
add esp, 0xc
mov edx, dword [ebp - 0x6c]
push edx
call fcn.00669daa
add esp, 4
mov dword [ebp - 0x7c], eax
push 0
push 0
mov eax, dword [ebp - 0x6c]
push eax
call fcn.00669e99
add esp, 0xc
mov ecx, dword [ebp - 0x7c]
push ecx
call fcn.00576bfc
add esp, 4
mov dword [ebp - 0xf4], eax
mov edx, dword [ebp - 0xf4]
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x7c]
push eax
push 0
mov ecx, dword [ebp - 0x78]
push ecx
call fcn.006665c0
add esp, 0xc
mov edx, dword [ebp - 0x6c]
push edx
mov eax, dword [ebp - 0x7c]
push eax
push 1
mov ecx, dword [ebp - 0x78]
push ecx
call fcn.00669b18
add esp, 0x10
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0
je 0x475f8f
cmp dword [ebp - 0x80], 0x40
jge 0x475fa8
push 0x70a380
call fcn.0066610b
add esp, 4
mov dword [ebp - 0x74], 0xffffffff
jmp 0x476408
mov dword [ebp - 0x84], 0
jmp 0x475fc3
mov edx, dword [ebp - 0x84]
add edx, 1
mov dword [ebp - 0x84], edx
mov ecx, dword [ebp - 0x10c]
add ecx, 0xc4
call fcn.00476d20
cmp dword [ebp - 0x84], eax
jae 0x476173
mov eax, dword [ebp - 0x84]
push eax
mov ecx, dword [ebp - 0x10c]
add ecx, 0xc4
call fcn.00476d40
mov ecx, dword [eax + 4]
push ecx
call fcn.00576bfc
add esp, 4
mov dword [ebp - 0xf8], eax
mov edx, dword [ebp - 0xf8]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x84]
push eax
mov ecx, dword [ebp - 0x10c]
add ecx, 0xc4
call fcn.00476d40
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x84]
push edx
mov ecx, dword [ebp - 0x10c]
add ecx, 0xc4
call fcn.00476d40
mov ecx, dword [ebp - 0x78]
add ecx, dword [eax]
push ecx
mov edx, dword [ebp - 0x68]
push edx
call fcn.00668860
add esp, 0xc
mov byte [ebp - 0xa8], 0
xor eax, eax
mov dword [ebp - 0xa7], eax
mov word [ebp - 0xa3], ax
mov byte [ebp - 0xa1], al
push 0xa
lea ecx, [ebp - 0xa8]
push ecx
mov edx, dword [ebp - 0x84]
push edx
call fcn.0069bc29
add esp, 0xc
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00404630
mov dword [ebp - 0x110], eax
mov ecx, dword [ebp - 0x110]
mov dword [ebp - 0x114], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x114]
push edx
push 0x70a398
lea eax, [ebp - 0xa0]
push eax
call fcn.004776f0
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2c]
call fcn.00404770
mov ecx, dword [ebp - 0x84]
push ecx
mov ecx, dword [ebp - 0x10c]
add ecx, 0xc4
call fcn.00476d40
mov edx, dword [eax + 4]
push edx
mov eax, dword [ebp - 0x68]
push eax
lea ecx, [ebp - 0xa0]
push ecx
mov ecx, dword [ebp - 0x10c]
call fcn.004759a0
movzx edx, al
test edx, edx
jne 0x47613d
push str.create_temp_file_error._r_n
call fcn.0066610b
add esp, 4
mov dword [ebp - 0x74], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.00404770
jmp 0x476173
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0xfc], eax
mov ecx, dword [ebp - 0xfc]
push ecx
call fcn.00576bf1
add esp, 4
mov dword [ebp - 0x68], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.00404770
jmp 0x475fb4
mov dword [ebp - 0xac], 0
jmp 0x47618e
mov edx, dword [ebp - 0xac]
add edx, 1
mov dword [ebp - 0xac], edx
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b20
cmp dword [ebp - 0xac], eax
jae 0x476400
mov eax, dword [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b40
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x100], esp
push eax
call fcn.0040d8d0
mov dword [ebp - 0x118], eax
lea ecx, [ebp - 0xd0]
call fcn.004783a0
mov dword [ebp - 0x11c], eax
mov dword [ebp - 4], 3
lea ecx, [ebp - 0xd0]
call fcn.00478440
movzx ecx, al
test ecx, ecx
jne 0x476229
push str.ota_file_is_invalid._r_n
call fcn.0066610b
add esp, 4
mov dword [ebp - 0x74], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xd0]
call fcn.00478420
jmp 0x476400
mov edx, dword [ebp - 0xac]
push edx
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b40
add eax, 0x1c
push eax
lea ecx, [ebp - 0xd0]
call fcn.00478600
mov eax, dword [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b40
add eax, 0x38
mov ecx, eax
call fcn.00405300
movzx ecx, al
test ecx, ecx
jne 0x4763e9
lea ecx, [ebp - 0xec]
call fcn.004045c0
mov byte [ebp - 4], 4
mov edx, dword [0x6c2cb8]
push edx
push 0x70a3d4
mov eax, dword [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b40
mov ecx, eax
call fcn.004129c0
mov dword [ebp - 0xf0], eax
mov ecx, dword [ebp - 0xf0]
cmp ecx, dword [0x6c2cb8]
je 0x476322
mov edx, dword [ebp - 0xf0]
add edx, 1
push edx
push 0
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0xac]
push ecx
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b40
mov ecx, eax
call fcn.004129f0
mov dword [ebp - 0x120], eax
mov edx, dword [ebp - 0x120]
mov dword [ebp - 0x124], edx
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x124]
push eax
lea ecx, [ebp - 0xec]
call fcn.00404740
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x48]
call fcn.00404770
mov ecx, dword [ebp - 0xac]
push ecx
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b40
add eax, 0x38
push eax
lea edx, [ebp - 0xec]
push edx
lea eax, [ebp - 0x64]
push eax
call fcn.00477630
add esp, 0xc
mov dword [ebp - 0x128], eax
mov ecx, dword [ebp - 0x128]
mov dword [ebp - 0x12c], ecx
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x12c]
push edx
lea ecx, [ebp - 0xec]
call fcn.00404740
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x64]
call fcn.00404770
lea ecx, [ebp - 0xec]
call fcn.00404810
push eax
mov eax, dword [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b40
mov ecx, eax
call fcn.00404810
push eax
call fcn.0066bb89
add esp, 8
test eax, eax
jne 0x4763da
lea ecx, [ebp - 0xec]
push ecx
mov edx, dword [ebp - 0xac]
push edx
mov ecx, dword [ebp - 0x10c]
add ecx, 0x24
call fcn.00476b40
mov ecx, eax
call fcn.004047d0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xec]
call fcn.00404770
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xd0]
call fcn.00478420
jmp 0x47617f
xor eax, eax
jne 0x475ec9
cmp dword [ebp - 0x6c], 0
je 0x476421
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.00669ba2
add esp, 4
mov dword [ebp - 0x6c], 0
cmp dword [ebp - 0x78], 0
je 0x476446
mov edx, dword [ebp - 0x78]
mov dword [ebp - 0x104], edx
mov eax, dword [ebp - 0x104]
push eax
call fcn.00576bf1
add esp, 4
mov dword [ebp - 0x78], 0
cmp dword [ebp - 0x68], 0
je 0x47646b
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 0x108], ecx
mov edx, dword [ebp - 0x108]
push edx
call fcn.00576bf1
add esp, 4
mov dword [ebp - 0x68], 0
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006665ac
mov esp, ebp
pop ebp
ret