Function at 0x40e4b0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x72b047
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x280
mov eax, dword [0x7cdffc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x28c], edi
xor eax, eax
mov byte [ebp - 0x1ec], 0
push str.firmware_fwini.bin
mov word [ebp - 0x1eb], ax
mov byte [ebp - 0x1e9], al
mov byte [ebp - 0x1f4], al
mov word [ebp - 0x1f3], ax
mov byte [ebp - 0x1f1], al
mov byte [ebp - 0x1f0], al
mov word [ebp - 0x1ef], ax
mov byte [ebp - 0x1ed], al
mov byte [ebp - 0x1f8], al
mov word [ebp - 0x1f7], ax
mov byte [ebp - 0x1f5], al
mov dword [ebp - 0x200], eax
lea eax, [ebp - 0x200]
push 0x8b39c8
push eax
call fcn.004079a0
add esp, 0xc
mov dword [ebp - 4], 0
xor eax, eax
push dword [ebp - 0x200]
mov esi, dword [0x74057c]
xorps xmm0, xmm0
push 0xa
mov word [ebp - 0x40], ax
mov word [ebp - 0x2e], ax
lea eax, [ebp - 0x40]
push eax
push 0
push str.NewPKEKeyOldVer
push str.FIRMWARE
movups xmmword [ebp - 0x3e], xmm0
call esi
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x2c]
call fcn.0048e9e0
cmp dword [eax + 0x14], 0x10
jb 0x40e5b2
mov eax, dword [eax]
mov edx, eax
lea ecx, [ebp - 0x1f4]
call fcn.0048e6f0
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x40e5d4
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00404b60
push dword [ebp - 0x200]
lea eax, [ebp - 0x40]
push 0xa
push eax
push 0
push str.NewPKEKeyNewVer
push str.FIRMWARE
call esi
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x2c]
call fcn.0048e9e0
cmp dword [eax + 0x14], 0x10
jb 0x40e601
mov eax, dword [eax]
mov edx, eax
lea ecx, [ebp - 0x1f0]
call fcn.0048e6f0
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x40e623
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00404b60
push dword [ebp - 0x200]
lea eax, [ebp - 0x40]
push 0xa
push eax
push 0
push str.OldPKEKeyVersion
push str.FIRMWARE
call esi
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x2c]
call fcn.0048e9e0
cmp dword [eax + 0x14], 0x10
jb 0x40e650
mov eax, dword [eax]
mov edx, eax
lea ecx, [ebp - 0x1f8]
call fcn.0048e6f0
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x40e672
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00404b60
push 0x190
lea eax, [ebp - 0x1e8]
mov dword [ebp - 0x288], 0
push 0
push eax
call fcn.006e6ec0
add esp, 0xc
call fcn.00563dcb
mov ecx, eax
test ecx, ecx
jne 0x40e6a7
push 0x80004005
call fcn.00407820
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x204], esi
mov byte [ebp - 4], 1
call fcn.00563dcb
mov ecx, eax
test ecx, ecx
jne 0x40e6d0
push 0x80004005
call fcn.00407820
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1fc], eax
push 0x10000
mov byte [ebp - 4], 2
call fcn.00562f31
add esp, 4
mov dword [ebp - 0x280], eax
push 0x10000
push 0
push eax
call fcn.006e6ec0
add esp, 0xc
lea ecx, [ebp - 0x2c]
mov edx, 0x7a2
call fcn.00405cc0
cmp dword [eax + 0x14], 8
jb 0x40e71c
mov eax, dword [eax]
push eax
push 0
push 0x49f
push dword [edi + 0x5c]
call dword [0x740748]
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x40e742
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00404a50
push 0x70
lea eax, [ebp - 0x278]
push 0
push eax
call fcn.006e6ec0
add esp, 0xc
lea ecx, [ebp - 0x278]
call fcn.004a0950
push ecx
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 3
call fcn.004a0b10
test al, al
jne 0x40e77e
mov edi, 0x449
jmp 0x40ed16
xorps xmm0, xmm0
mov byte [ebp - 0x50], 0
lea eax, [ebp - 0x50]
movq qword [ebp - 0x4f], xmm0
push eax
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x47], 0
mov word [ebp - 0x43], 0
mov byte [ebp - 0x41], 0
mov dword [ebp - 0x24], 0x20000002
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x18], 0
call fcn.004a19c0
mov ecx, 0xef00
cmp ax, cx
je 0x40e7d1
mov edi, 0x44a
jmp 0x40ed16
lea eax, [ebp - 0x50]
mov eax, dword [eax]
lea ecx, [ebp - 0x24]
cmp eax, dword [ecx]
je 0x40e814
lea eax, [ebp - 0x27c]
mov dword [ebp - 0x27c], 0
push eax
lea ecx, [ebp - 0x278]
call fcn.004a1fd0
movss xmm0, dword [0x79c3e4]
comiss xmm0, dword [ebp - 0x27c]
jbe 0x40e814
mov edi, 0x43b
jmp 0x40ed16
push ecx
lea ecx, [ebp - 0x278]
call fcn.004a7260
test al, al
je 0x40ed11
push ecx
push 0
push 0
lea eax, [ebp - 0x1ec]
push eax
lea ecx, [ebp - 0x278]
call fcn.004a72d0
movzx eax, ax
mov ecx, 0xef00
cmp ax, cx
jne 0x40ed06
push 1
call dword [0x7405ac]
mov al, byte [ebp - 0x1ec]
cmp al, 1
jne 0x40e950
mov al, byte [ebp - 0x1ea]
cmp al, 1
je 0x40e878
test al, al
jne 0x40e911
lea eax, [ebp - 0x1ec]
mov eax, dword [eax]
lea ecx, [ebp - 0x1f4]
cmp eax, dword [ecx]
jne 0x40e8d7
push ecx
push 1
push 0x783d44
push 0
lea ecx, [ebp - 0x278]
call fcn.004a72d0
mov edx, 0x7b0
lea ecx, [ebp - 0x2c]
call fcn.00405cc0
cmp dword [eax + 0x14], 8
jb 0x40e8b4
mov eax, dword [eax]
push 0
push 0x783858
push eax
push dword [edi + 0x5c]
call dword [0x740754]
lea ecx, [ebp - 0x2c]
call fcn.00404ac0
mov edi, 0x4e0
jmp 0x40ed16
movzx eax, byte [ebp - 0x1f1]
push eax
movzx eax, byte [ebp - 0x1f2]
push eax
movzx eax, byte [ebp - 0x1f3]
push eax
movzx eax, byte [ebp - 0x1f4]
push eax
lea eax, [ebp - 0x1fc]
push 0x783d48
push eax
call fcn.0040cf30
mov al, byte [ebp - 0x1ea]
add esp, 0x18
cmp al, 2
jne 0x40e99e
lea eax, [ebp - 0x1ec]
mov eax, dword [eax]
lea ecx, [ebp - 0x1f0]
cmp eax, dword [ecx]
je 0x40e88a
movzx eax, byte [ebp - 0x1ed]
push eax
movzx eax, byte [ebp - 0x1ee]
push eax
movzx eax, byte [ebp - 0x1ef]
push eax
movzx eax, byte [ebp - 0x1f0]
jmp 0x40e989
cmp al, 2
jne 0x40e99e
lea eax, [ebp - 0x1ec]
mov eax, dword [eax]
lea ecx, [ebp - 0x1f8]
cmp eax, dword [ecx]
je 0x40e88a
movzx eax, byte [ebp - 0x1f5]
push eax
movzx eax, byte [ebp - 0x1f6]
push eax
movzx eax, byte [ebp - 0x1f7]
push eax
movzx eax, byte [ebp - 0x1f8]
push eax
lea eax, [ebp - 0x1fc]
push 0x783d48
push eax
call fcn.0040cf30
add esp, 0x18
lea eax, [ebp - 0x1fc]
push eax
lea eax, [ebp - 0x284]
push 0x8b39c8
push eax
call fcn.0040edd0
add esp, 0xc
push eax
lea ecx, [ebp - 0x204]
mov byte [ebp - 4], 4
call fcn.0040f250
lea ecx, [ebp - 0x284]
mov byte [ebp - 4], 3
call fcn.00407980
mov esi, dword [ebp - 0x204]
push 0x783d8c
push esi
call fcn.006ee3b3
add esp, 8
mov dword [ebp - 0x27c], eax
test eax, eax
jne 0x40ea00
mov edi, 0x454
jmp 0x40ed16
push 2
push 0
push eax
call fcn.006eed41
add esp, 0xc
push dword [ebp - 0x27c]
call fcn.006ef33a
add esp, 4
mov dword [ebp - 0x284], eax
push 0
push 0
push dword [ebp - 0x27c]
call fcn.006eed41
add esp, 0xc
push dword [ebp - 0x27c]
push 1
push dword [ebp - 0x284]
push dword [ebp - 0x280]
call fcn.006ef511
push dword [ebp - 0x27c]
call fcn.006ee6f2
mov al, byte [ebp - 0x1ec]
add esp, 0x14
cmp al, 1
jne 0x40eb04
mov al, byte [ebp - 0x1ea]
cmp al, 1
je 0x40eacc
test al, al
je 0x40eacc
mov edx, 0x7ae
lea ecx, [ebp - 0x2c]
call fcn.00405cc0
mov ecx, eax
cmp dword [ecx + 0x14], 8
jb 0x40ea8d
mov ecx, dword [ecx]
movzx eax, byte [ebp - 0x1ed]
push eax
movzx eax, byte [ebp - 0x1ee]
push eax
movzx eax, byte [ebp - 0x1ef]
push eax
movzx eax, byte [ebp - 0x1f0]
push eax
movzx eax, byte [ebp - 0x1e9]
push eax
movzx eax, byte [ebp - 0x1ea]
push eax
movzx eax, byte [ebp - 0x1eb]
push eax
push 1
jmp 0x40eb59
mov edx, 0x7ae
lea ecx, [ebp - 0x2c]
call fcn.00405cc0
mov ecx, eax
cmp dword [ecx + 0x14], 8
jb 0x40eae3
mov ecx, dword [ecx]
movzx eax, byte [ebp - 0x1f1]
push eax
movzx eax, byte [ebp - 0x1f2]
push eax
movzx eax, byte [ebp - 0x1f3]
push eax
movzx eax, byte [ebp - 0x1f4]
jmp 0x40eaac
cmp al, 2
jne 0x40eb72
mov edx, 0x7ae
lea ecx, [ebp - 0x2c]
call fcn.00405cc0
mov ecx, eax
cmp dword [ecx + 0x14], 8
jb 0x40eb1f
mov ecx, dword [ecx]
movzx eax, byte [ebp - 0x1f5]
push eax
movzx eax, byte [ebp - 0x1f6]
push eax
movzx eax, byte [ebp - 0x1f7]
push eax
movzx eax, byte [ebp - 0x1f8]
push eax
movzx eax, byte [ebp - 0x1e9]
push eax
movzx eax, byte [ebp - 0x1ea]
push eax
movzx eax, byte [ebp - 0x1eb]
push eax
push 2
push ecx
lea eax, [ebp - 0x1e8]
push eax
call dword [0x74074c]
add esp, 0x28
lea ecx, [ebp - 0x2c]
call fcn.00404ac0
push 0x24
push 0x783858
lea eax, [ebp - 0x1e8]
push eax
push dword [edi + 0x5c]
call dword [0x740754]
cmp eax, 6
je 0x40ebad
push ecx
push 1
push 0x783d44
push 0
lea ecx, [ebp - 0x278]
call fcn.004a72d0
mov edi, 0x4e0
jmp 0x40ed16
mov edx, 0x7ac
lea ecx, [ebp - 0x58]
call fcn.00405cc0
cmp dword [eax + 0x14], 8
jb 0x40ebc2
mov eax, dword [eax]
push eax
push 0
push 0x49f
push dword [edi + 0x5c]
call dword [0x740748]
lea ecx, [ebp - 0x58]
call fcn.00404ac0
push ecx
push 1
push 0x783d94
push 0
lea ecx, [ebp - 0x278]
call fcn.004a72d0
mov eax, dword [ebp - 0x280]
mov edi, dword [ebp - 0x284]
push ecx
push 0x10
lea ecx, [ebp - 0x278]
movups xmm0, xmmword [eax + edi - 0x10]
lea eax, [ebp - 0x24]
push eax
push 0
movups xmmword [ebp - 0x24], xmm0
call fcn.004a72d0
movzx eax, ax
mov ecx, 0xef00
cmp ax, cx
jne 0x40ed06
push ecx
push 4
lea eax, [ebp - 0x27c]
sub edi, 0x10
push eax
push 0
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x27c], edi
call fcn.004a72d0
movzx eax, ax
mov ecx, 0xef00
cmp ax, cx
jne 0x40ed06
mov eax, dword [ebp - 0x27c]
mov edx, 0xf0
mov ecx, dword [ebp - 0x288]
mov edi, edx
sub eax, ecx
movzx eax, ax
cmp ax, dx
jae 0x40ec7a
mov edi, eax
push ecx
movzx eax, di
push eax
movzx eax, cx
lea ecx, [ebp - 0x278]
add eax, dword [ebp - 0x280]
push eax
push 0
call fcn.004a72d0
movzx eax, ax
mov ecx, 0xef00
cmp ax, cx
jne 0x40ed06
mov eax, dword [ebp - 0x288]
add eax, edi
mov dword [ebp - 0x288], eax
test di, di
je 0x40ece0
movzx eax, ax
xor edx, edx
imul eax, eax, 0x64
mov edi, dword [ebp - 0x28c]
push 0
div dword [ebp - 0x27c]
push eax
push 0x49d
push dword [edi + 0x5c]
call dword [0x740748]
jmp 0x40ec5b
push ecx
push 0
push 0
push 0
lea ecx, [ebp - 0x278]
call fcn.004a72d0
movzx eax, ax
mov ecx, 0xef00
cmp ax, cx
jne 0x40ed06
mov edi, 0x7aa
jmp 0x40ed16
push eax
push str.update_Key_PKE_error
call fcn.0048a990
mov edi, 0x7ad
push dword [ebp - 0x280]
call fcn.004b3b30
add esp, 4
lea ecx, [ebp - 0x278]
call fcn.004a1400
lea ecx, [ebp - 0x278]
call fcn.004a0a00
mov byte [ebp - 4], 1
or ecx, 0xffffffff
mov edx, dword [ebp - 0x1fc]
mov eax, ecx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ed61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
or ecx, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ecx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40ed7f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
or ecx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x200]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x40eda1
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.006a7b19
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4