Function at 0x402659
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x898
mov eax, dword [0x4e5130]
mov eax, dword [eax + 0x18]
add eax, 0x28
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.KERNEL32.DLL_CreateFileA
sub esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4026f2
mov dword [esp], str.ERROR:_usb_open_failed_while_sending_payload_n
call sub.msvcrt.dll_printf
cmp dword [0x4e5080], 0
je 0x4026e3
mov dword [esp + 4], str.ERROR:_usb_open_failed_while_sending_payload_n
mov eax, dword [0x4e5080]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [ebp - 0x854], 0xffffffff
jmp 0x402c2f
mov dword [esp + 8], 8
mov dword [esp + 4], 0
lea eax, [ebp - 0x828]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov byte [ebp - 0x828], 0x21
mov byte [ebp - 0x827], 1
mov byte [ebp - 0x826], 0
mov byte [ebp - 0x822], 0
mov byte [ebp - 0x821], 8
mov dword [ebp - 0x84c], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x858], eax
cmp dword [ebp - 0x858], 0
jns 0x402759
add dword [ebp - 0x858], 0x7ff
mov eax, dword [ebp - 0x858]
sar eax, 0xb
cmp eax, dword [ebp - 0x84c]
jle 0x402893
mov dword [esp + 8], 0x800
mov eax, dword [ebp - 0x84c]
shl eax, 0xb
add eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x828]
add eax, 8
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x82c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x808
lea eax, [ebp - 0x828]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.DLL_WriteFile
sub esp, 0x14
test eax, eax
jne 0x402806
mov dword [esp], str.ERROR:_usb_send_file_failed_1_n
call sub.msvcrt.dll_printf
cmp dword [0x4e5080], 0
je 0x4027f7
mov dword [esp + 4], str.ERROR:_usb_send_file_failed_1_n
mov eax, dword [0x4e5080]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [ebp - 0x854], 0xffffffff
jmp 0x402c2f
lea eax, [ebp - 0x826]
inc byte [eax]
mov dword [esp + 8], 0xe
mov dword [esp + 4], 0
lea eax, [ebp - 0x848]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov byte [ebp - 0x848], 0xa1
mov byte [ebp - 0x847], 3
mov dword [esp + 0x1c], 0
lea eax, [ebp - 0x82c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0xe
lea eax, [ebp - 0x848]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xe
lea eax, [ebp - 0x848]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x2200a0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.DLL_DeviceIoControl
sub esp, 0x20
lea eax, [ebp - 0x84c]
inc dword [eax]
jmp 0x40273d
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x85c], eax
mov edx, dword [ebp - 0x85c]
mov dword [ebp - 0x860], edx
cmp dword [ebp - 0x860], 0
jns 0x4028bb
add dword [ebp - 0x860], 0x7ff
mov eax, dword [ebp - 0x860]
sar eax, 0xb
shl eax, 0xb
mov edx, dword [ebp - 0x85c]
sub edx, eax
mov eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x84c]
shl eax, 0xb
add eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x828]
add eax, 8
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x864], eax
mov edx, dword [ebp - 0x864]
mov dword [ebp - 0x868], edx
cmp dword [ebp - 0x868], 0
jns 0x40291e
add dword [ebp - 0x868], 0x7ff
mov eax, dword [ebp - 0x868]
sar eax, 0xb
shl eax, 0xb
mov edx, dword [ebp - 0x864]
sub edx, eax
mov al, 0xff
and al, dl
mov byte [ebp - 0x822], al
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x86c], eax
mov edx, dword [ebp - 0x86c]
mov dword [ebp - 0x870], edx
cmp dword [ebp - 0x870], 0
jns 0x402964
add dword [ebp - 0x870], 0x7ff
mov eax, dword [ebp - 0x870]
sar eax, 0xb
shl eax, 0xb
mov edx, dword [ebp - 0x86c]
sub edx, eax
mov eax, edx
sar eax, 8
mov byte [ebp - 0x821], al
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x82c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x874], eax
mov edx, dword [ebp - 0x874]
mov dword [ebp - 0x878], edx
cmp dword [ebp - 0x878], 0
jns 0x4029bd
add dword [ebp - 0x878], 0x7ff
mov eax, dword [ebp - 0x878]
sar eax, 0xb
shl eax, 0xb
mov edx, dword [ebp - 0x874]
sub edx, eax
mov eax, edx
add eax, 8
mov dword [esp + 8], eax
lea eax, [ebp - 0x828]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.DLL_WriteFile
sub esp, 0x14
test eax, eax
jne 0x402a2f
mov dword [esp], str.ERROR:_usb_send_file_failed_2_n
call sub.msvcrt.dll_printf
cmp dword [0x4e5080], 0
je 0x402a20
mov dword [esp + 4], str.ERROR:_usb_send_file_failed_2_n
mov eax, dword [0x4e5080]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [ebp - 0x854], 0xffffffff
jmp 0x402c2f
mov dword [esp + 8], 0xe
mov dword [esp + 4], 0
lea eax, [ebp - 0x848]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov byte [ebp - 0x848], 0xa1
mov byte [ebp - 0x847], 3
mov dword [esp + 0x1c], 0
lea eax, [ebp - 0x82c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0xe
lea eax, [ebp - 0x848]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xe
lea eax, [ebp - 0x848]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x2200a0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.DLL_DeviceIoControl
sub esp, 0x20
lea eax, [ebp - 0x826]
inc byte [eax]
mov byte [ebp - 0x822], 0
mov byte [ebp - 0x821], 0
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x82c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 8
lea eax, [ebp - 0x828]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.DLL_WriteFile
sub esp, 0x14
test eax, eax
jne 0x402b2c
mov dword [esp], str.ERROR:_usb_send_file_failed_3_n
call sub.msvcrt.dll_printf
cmp dword [0x4e5080], 0
je 0x402b1d
mov dword [esp + 4], str.ERROR:_usb_send_file_failed_3_n
mov eax, dword [0x4e5080]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [ebp - 0x854], 0xffffffff
jmp 0x402c2f
mov dword [ebp - 0x850], 0x604946f1
mov dword [ebp - 0x84c], 0
mov dword [esp], str.Your_jailbreak_is_done_once_the_device_reboots._For_tethered__run_again_to_boot._nIf_this_was_the_simplest_jailbreak_ever__please_go_to_blackra1n.com_and_donate_to_support_future_development____nIf_you_paid_anything_for_this_software_demand_a_refund._nAvailable_free_from_blackra1n.com__funded_solely_on_after_the_fact_donations
call sub.msvcrt.dll_strlen
and eax, 0xfffc
cmp dword [ebp - 0x84c], eax
jae 0x402b79
mov eax, dword [ebp - 0x84c]
add eax, str.Your_jailbreak_is_done_once_the_device_reboots._For_tethered__run_again_to_boot._nIf_this_was_the_simplest_jailbreak_ever__please_go_to_blackra1n.com_and_donate_to_support_future_development____nIf_you_paid_anything_for_this_software_demand_a_refund._nAvailable_free_from_blackra1n.com__funded_solely_on_after_the_fact_donations
mov edx, dword [eax]
lea eax, [ebp - 0x850]
xor dword [eax], edx
lea eax, [ebp - 0x84c]
add dword [eax], 4
jmp 0x402b40
mov dword [ebp - 0x84c], 0
cmp dword [ebp - 0x84c], 2
jg 0x402c17
mov dword [esp + 8], 0xe
mov dword [esp + 4], 0
lea eax, [ebp - 0x848]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov byte [ebp - 0x848], 0xa1
mov byte [ebp - 0x847], 3
mov dword [esp + 0x1c], 0
lea eax, [ebp - 0x82c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0xe
lea eax, [ebp - 0x848]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xe
lea eax, [ebp - 0x848]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x850]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.DLL_DeviceIoControl
sub esp, 0x20
lea eax, [ebp - 0x84c]
inc dword [eax]
jmp 0x402b83
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [ebp - 0x854], 0
mov eax, dword [ebp - 0x854]
leave
ret