Function at 0x409800
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4703c6
mov eax, dword fs:[0]
push eax
sub esp, 0x888
mov eax, dword [0x48b670]
xor eax, esp
mov dword [esp + 0x880], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48b670]
xor eax, esp
push eax
lea eax, [esp + 0x89c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x8ac]
mov edi, edx
mov edx, dword [str.FlashBoot]
mov dword [esp + 0x30], ecx
mov ecx, dword [0x47b59c]
mov dword [esp + 0x34], eax
mov eax, dword [0x47b598]
mov dword [esp + 0x6c], edx
mov edx, dword [0x47b5a0]
mov dword [esp + 0x74], ecx
mov ecx, dword [str.FlashData]
mov dword [esp + 0x70], eax
mov eax, dword [0x47b5a4]
mov dword [esp + 0x78], edx
mov edx, dword [0x47b5ac]
mov dword [esp + 0x80], ecx
mov ecx, dword [0x47b5b4]
xor esi, esi
mov dword [esp + 0x7c], eax
mov eax, dword [0x47b5b0]
mov dword [esp + 0x84], edx
mov edx, dword [0x47b5b8]
mov dword [esp + 0x8c], ecx
lea ecx, [esp + 0x50]
mov dword [esp + 0x64], edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x88], eax
mov dword [esp + 0x90], edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x18], esi
call fcn.0041a82f
xor ebp, ebp
push 0x3f8
mov ecx, edi
mov dword [esp + 0x8a8], esi
mov dword [esp + 0x2c], ebp
call fcn.00416fa1
mov eax, dword [eax + 0x20]
push esi
push esi
push 0xf0
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x38], eax
cmp eax, esi
jne 0x409a85
cmp dword [edi + 0x2cc], esi
jne 0x409a85
push str.SDBoot.bin
add edi, 0x24c
lea ecx, [esp + 0x64]
push edi
push ecx
call fcn.0040c5e0
add esp, 0xc
push esi
mov byte [esp + 0x8a8], 1
mov eax, dword [eax]
push 0x8000
push eax
lea ecx, [esp + 0x5c]
call fcn.0041aca7
mov ebx, eax
mov byte [esp + 0x8a4], 0
mov eax, dword [esp + 0x60]
add eax, 0xfffffff0
mov dword [esp + 0x20], ebx
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40997a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp ebx, esi
jne 0x4099aa
cmp dword [0x4a120c], esi
je 0x409bdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4a120c]
push eax
push str.Error:WriteLoader___Open_SDBoot.bin_failed_err_d
push ecx
call fcn.00451cb0
add esp, 0xc
jmp 0x409bdf
lea ecx, [esp + 0x50]
call fcn.0041a71a
mov edi, eax
push edi
call fcn.00411469
mov ebp, eax
add esp, 4
mov dword [esp + 0x28], ebp
lea ecx, [esp + 0x50]
test ebp, ebp
jne 0x4099f1
call fcn.0041a7c9
mov eax, dword [0x4a120c]
test eax, eax
je 0x409bdf
push str.Error:WriteLoader___new_SDBoot.bin_memory_failed
push eax
call fcn.00451cb0
add esp, 8
jmp 0x409bdf
push edi
push ebp
call fcn.0041a523
lea ecx, [esp + 0x50]
cmp eax, edi
je 0x409a32
call fcn.0041a7c9
cmp dword [0x4a120c], 0
je 0x409bdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x4a120c]
push eax
push str.Error:WriteLoader___Read_SDBoot.bin_failed_err_d
push edx
call fcn.00451cb0
add esp, 0xc
jmp 0x409bdf
call fcn.0041a7c9
push 0x44
call fcn.0041143a
mov esi, eax
add esp, 4
test esi, esi
je 0x409a59
push edi
lea edi, [esp + 0x24]
mov eax, ebp
call fcn.00404a90
mov ebx, dword [esp + 0x20]
jmp 0x409a5b
xor eax, eax
mov esi, eax
mov dword [esp + 0x24], eax
test ebx, ebx
jne 0x409a8f
mov eax, dword [0x4a120c]
test eax, eax
je 0x409bdf
push str.Error:WriteLoader___create_boot_object_failed
push eax
call fcn.00451cb0
add esp, 8
jmp 0x409bdf
mov eax, dword [esp + 0x30]
mov esi, dword [eax]
mov dword [esp + 0x24], esi
lea ecx, [esp + 0x6c]
push ecx
call fcn.00404a30
mov bl, al
cmp bl, 0xff
jne 0x409ac0
mov eax, dword [0x4a120c]
test eax, eax
je 0x409bd4
push str.Error:WriteLoader___no_found_flashboot
push eax
call fcn.00451cb0
add esp, 8
jmp 0x409bd4
mov dl, byte [esi + 0x31]
mov ecx, dword [esi + 0x2c]
mov al, byte [esi + 0x30]
cmp bl, dl
jae 0x409af3
mov ebp, dword [esp + 0x24]
movzx eax, al
movzx edx, bl
imul eax, edx
add eax, dword [ebp + 0x38]
add eax, ecx
mov ecx, dword [eax + 0x31]
mov dword [esp + 0x48], ecx
test ecx, ecx
jbe 0x409b13
lea eax, [ecx - 1]
shr eax, 9
inc eax
jmp 0x409b15
mov eax, dword [0x4a120c]
test eax, eax
je 0x409bcc
push str.Error:WriteLoader___get_flashboot_property_failed
push eax
call fcn.00451cb0
add esp, 8
jmp 0x409bcc
mov eax, ecx
test eax, eax
jbe 0x409b34
test ecx, ecx
jbe 0x409b2b
lea eax, [ecx - 1]
shr eax, 9
inc eax
dec eax
shr eax, 2
inc eax
jmp 0x409b43
mov eax, ecx
dec eax
shr eax, 2
inc eax
jmp 0x409b43
test ecx, ecx
jbe 0x409b41
lea eax, [ecx - 1]
shr eax, 9
inc eax
jmp 0x409b43
mov eax, ecx
add eax, eax
add eax, eax
movzx eax, ax
movzx esi, ax
shl esi, 9
push esi
mov dword [esp + 0x6c], eax
mov dword [esp + 0x50], esi
call fcn.00411469
push esi
mov edi, eax
push 0
push edi
mov dword [esp + 0x30], edi
call fcn.00431210
add esp, 0x10
push edi
mov dl, bl
mov eax, ebp
call fcn.004049e0
test eax, eax
jne 0x409c13
mov eax, dword [0x4a120c]
test eax, eax
je 0x409b99
push str._Error:WriteLoader___Get_Loader_Code_failed
push eax
call fcn.00451cb0
add esp, 8
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x409bae
push eax
call fcn.00411474
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x409bbf
push eax
call fcn.00411474
add esp, 4
test ebp, ebp
je 0x409bcc
push ebp
call fcn.00411474
add esp, 4
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x38], 0
jne 0x40a0e2
mov ecx, dword [esp + 0x64]
cmp dword [ecx + 0x2cc], 0
jne 0x40a0e2
test esi, esi
je 0x40a0d5
mov eax, dword [esi + 0x38]
test eax, eax
je 0x409c08
push eax
call fcn.00411474
add esp, 4
push esi
call fcn.00411474
jmp 0x40a0df
mov edi, dword [esp + 0x30]
mov esi, dword [edi]
lea ecx, [esp + 0x80]
push ecx
call fcn.00404a30
mov byte [esp + 0x1f], al
cmp al, 0xff
jne 0x409c45
mov eax, dword [0x4a120c]
test eax, eax
je 0x409b99
push str.Error:WriteLoader___no_found_flashdata
jmp 0x409b90
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [edi]
mov dl, al
call fcn.00404990
test eax, eax
jne 0x409c73
mov eax, dword [0x4a120c]
test eax, eax
je 0x409b99
push str.Error:WriteLoader___get_flashdata_property_failed
jmp 0x409b90
mov esi, dword [esp + 0x44]
test esi, esi
jbe 0x409c84
lea eax, [esi - 1]
shr eax, 9
inc eax
jmp 0x409c86
mov eax, esi
test eax, eax
jbe 0x409ca5
test esi, esi
jbe 0x409c9c
lea eax, [esi - 1]
shr eax, 9
inc eax
dec eax
shr eax, 2
inc eax
jmp 0x409cb4
mov eax, esi
dec eax
shr eax, 2
inc eax
jmp 0x409cb4
test esi, esi
jbe 0x409cb2
lea eax, [esi - 1]
shr eax, 9
inc eax
jmp 0x409cb4
mov eax, esi
lea edx, [eax*4]
movzx ebx, dx
movzx edi, bx
mov dword [esp + 0x3c], edi
shl edi, 9
push edi
call fcn.00411469
push edi
mov ebp, eax
push 0
push ebp
mov dword [esp + 0x3c], ebp
call fcn.00431210
mov dl, byte [esp + 0x2f]
add esp, 0x10
push ebp
mov ebp, dword [esp + 0x34]
mov eax, dword [ebp]
call fcn.004049e0
test eax, eax
jne 0x409d0c
mov eax, dword [0x4a120c]
test eax, eax
je 0x409b99
push str._Error:WriteLoader___Get_Loader_Data_failed
jmp 0x409b90
push 0x800
lea eax, [esp + 0x98]
push 0
push eax
call fcn.00431210
mov eax, dword [ebp]
add esp, 0xc
mov dword [esp + 0x94], 0xff0aa55
cmp dword [eax], 0
je 0x409d85
mov eax, esi
shr eax, 9
mov dword [esp + 0x9c], 1
test eax, eax
jbe 0x409d62
mov esi, dword [esp + 0x2c]
mov ebp, eax
mov ecx, esi
call section..text
add esi, 0x200
sub ebp, 1
jne 0x409d50
mov eax, dword [esp + 0x48]
shr eax, 9
test eax, eax
jbe 0x409d85
mov esi, dword [esp + 0x20]
mov ebp, eax
mov ecx, esi
call section..text
add esi, 0x200
sub ebp, 1
jne 0x409d73
mov eax, dword [esp + 0x68]
mov ecx, 4
mov edx, ecx
mov word [esp + 0x28e], bx
mov word [esp + 0xa0], cx
add ebx, eax
lea ecx, [esp + 0x94]
mov word [esp + 0xa2], dx
mov word [esp + 0x290], bx
call section..text
cmp dword [esp + 0x38], 0
je 0x409dd0
mov dword [esp + 0x2fc], 1
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x94]
push ecx
push 0x800
push 0
push 0x8000
mov ecx, esi
call fcn.00455750
test eax, eax
jne 0x409e1e
cmp dword [0x4a120c], eax
je 0x409b99
call fcn.00455450
mov edx, dword [0x4a120c]
push eax
push str._Error:WriteLoader___write_idb_failed_err_d
push edx
call fcn.00451cb0
add esp, 0xc
jmp 0x409b99
push 0x800
call fcn.00411469
add esp, 4
mov ebp, eax
push ebp
push 0x800
push 0
push 0x8000
mov ecx, esi
call fcn.004556b0
test eax, eax
jne 0x409e6f
cmp dword [0x4a120c], eax
je 0x409b9d
call fcn.00455450
push eax
mov eax, dword [0x4a120c]
push str._Error:WriteLoader___read_idb_failed_err_d
push eax
call fcn.00451cb0
add esp, 0xc
jmp 0x409b9d
lea edx, [esp + 0x94]
mov ecx, 0x800
mov eax, ebp
sub edx, ebp
nop
mov ebx, dword [eax + edx]
cmp ebx, dword [eax]
jne 0x409ee4
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x409e80
test ebp, ebp
je 0x409ea1
push ebp
call fcn.00411474
add esp, 4
xor ebp, ebp
mov ebx, dword [esp + 0x2c]
push ebx
push edi
push 0
push 0x8800
mov ecx, esi
call fcn.00455750
test eax, eax
jne 0x409f04
cmp dword [0x4a120c], eax
je 0x409b9d
call fcn.00455450
mov ecx, dword [0x4a120c]
push eax
push str._Error:WriteLoader___write_loader_data_failed_err_d
push ecx
call fcn.00451cb0
add esp, 0xc
jmp 0x409b9d
mov eax, dword [0x4a120c]
test eax, eax
je 0x409b9d
push str._Error:WriteLoader___check_idb_failed
push eax
call fcn.00451cb0
add esp, 8
jmp 0x409b9d
push edi
call fcn.00411469
add esp, 4
mov ebp, eax
push ebp
push edi
push 0
push 0x8800
mov ecx, esi
call fcn.004556b0
test eax, eax
jne 0x409f4e
cmp dword [0x4a120c], eax
je 0x409b9d
call fcn.00455450
mov edx, dword [0x4a120c]
push eax
push str._Error:WriteLoader___read_loader_data_failed_err_d
push edx
call fcn.00451cb0
add esp, 0xc
jmp 0x409b9d
mov eax, dword [esp + 0x44]
mov ecx, ebp
mov esi, ebx
cmp eax, 4
jb 0x409f74
jmp 0x409f60
mov edx, dword [esi]
cmp edx, dword [ecx]
jne 0x409f98
sub eax, 4
add ecx, 4
add esi, 4
cmp eax, 4
jae 0x409f60
test eax, eax
je 0x409fb8
mov dl, byte [ecx]
cmp dl, byte [esi]
jne 0x409f98
cmp eax, 1
jbe 0x409fb8
mov dl, byte [ecx + 1]
cmp dl, byte [esi + 1]
jne 0x409f98
cmp eax, 2
jbe 0x409fb8
mov al, byte [ecx + 2]
cmp al, byte [esi + 2]
je 0x409fb8
mov eax, dword [0x4a120c]
test eax, eax
je 0x409b9d
push str._Error:WriteLoader___check_loader_data_failed
push eax
call fcn.00451cb0
add esp, 8
jmp 0x409b9d
test ebp, ebp
je 0x409fc7
push ebp
call fcn.00411474
add esp, 4
xor ebp, ebp
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x4c]
add eax, 0x44
shl eax, 9
push ecx
mov ecx, dword [esp + 0x38]
cdq
push ebx
mov edi, edx
mov esi, eax
push edi
push esi
call fcn.00455750
test eax, eax
jne 0x40a01a
cmp dword [0x4a120c], eax
je 0x409b9d
call fcn.00455450
mov edx, dword [0x4a120c]
push eax
push str._Error:WriteLoader___write_loader_code_failed_err_d
push edx
call fcn.00451cb0
add esp, 0xc
jmp 0x409b9d
push ebx
call fcn.00411469
mov ecx, dword [esp + 0x38]
add esp, 4
mov ebp, eax
push ebp
push ebx
push edi
push esi
call fcn.004556b0
test eax, eax
jne 0x40a060
cmp dword [0x4a120c], eax
je 0x409b9d
call fcn.00455450
push eax
mov eax, dword [0x4a120c]
push str._Error:WriteLoader___read_loader_code_failed_err_d
push eax
call fcn.00451cb0
add esp, 0xc
jmp 0x409b9d
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x20]
mov ecx, ebp
cmp eax, 4
jb 0x40a084
nop
mov edx, dword [esi]
cmp edx, dword [ecx]
jne 0x40a0a8
sub eax, 4
add ecx, 4
add esi, 4
cmp eax, 4
jae 0x40a070
test eax, eax
je 0x40a0c8
mov dl, byte [ecx]
cmp dl, byte [esi]
jne 0x40a0a8
cmp eax, 1
jbe 0x40a0c8
mov dl, byte [ecx + 1]
cmp dl, byte [esi + 1]
jne 0x40a0a8
cmp eax, 2
jbe 0x40a0c8
mov al, byte [ecx + 2]
cmp al, byte [esi + 2]
je 0x40a0c8
mov eax, dword [0x4a120c]
test eax, eax
je 0x409b9d
push str._Error:WriteLoader___check_loader_code_failed
push eax
call fcn.00451cb0
add esp, 8
jmp 0x409b9d
mov dword [esp + 0x40], 1
jmp 0x409b9d
test ebp, ebp
je 0x40a0e2
push ebp
call fcn.00411474
add esp, 4
lea ecx, [esp + 0x50]
mov dword [esp + 0x8a4], 0xffffffff
call fcn.0041a937
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x89c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x880]
xor ecx, esp
call fcn.0042fc9e
add esp, 0x894
ret 4