Function at 0x407ec5
Capabilities:
Resolve function by parsing pe exports
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x460
mov esi, ecx
cmp dword [ecx], 0
je 0x407e7e
cmp byte [esi + 0xe], 0
je 0x407f52
mov eax, dword [esi]
test eax, eax
je 0x407f52
push esi
push fcn.00419ce0
push eax
call fcn.004354e0
add esp, 0xc
jmp 0x407f52
mov ebx, edx
mov eax, dword [esi + 0x260]
mov edi, dword [eax + 4]
movzx eax, byte [esi + 9]
test al, al
je 0x407ea4
cmp al, 6
ja 0x407ef5
movzx eax, al
jmp dword [eax*4 + 0x51c150]
push esi
push 0
jmp 0x407eed
test edi, edi
je 0x407ec1
cmp byte [edi], 0
je 0x407ec1
push 0
push edi
call fcn.00405fc0
add esp, 8
mov byte [esi + 9], al
cmp al, 6
jbe 0x407e95
jmp 0x407ef5
mov byte [esi + 9], 1
mov eax, dword [esi + 0x30]
or eax, 6
push 0
push eax
push esi
push edi
call fcn.0043bff0
add esp, 0x10
jmp 0x407ef5
mov eax, dword [esi + 0x30]
or eax, 6
push str.apndvfs
jmp 0x407ecd
push esi
push 0x51cf2a
call fcn.0043b8e0
add esp, 8
mov dword [esp + 0x10], edi
mov eax, dword [esi]
mov dword [0x53dde8], eax
test eax, eax
je 0x407f11
push eax
call fcn.0043b750
add esp, 4
test eax, eax
je 0x407f5a
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov edi, eax
push dword [esi]
call fcn.004362c0
add esp, 4
push eax
push dword [esp + 0x14]
push 0x51e17b
push edi
call fcn.004014c0
add esp, 0x10
test bl, 1
je 0x4086d7
push esi
push 0x51cf2a
call fcn.0043b8e0
add esp, 8
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
sub esp, 8
push dword [esi]
call fcn.004015e0
add esp, 0xc
push 0x401dc0
push 0
push 1
push str.uint
push dword [esi]
call fcn.0043c130
add esp, 0xc
push dword [esi]
call fcn.00401fa0
add esp, 0xc
mov edi, esi
mov esi, dword [esi]
push 0
push 0
push 0x402c90
push 0
push 0x200801
push 2
push 0x51cef6
push esi
call fcn.0043a2a0
add esp, 0x20
test eax, eax
jne 0x407fd0
push 0
push 0
push 0x402c90
push esi
push 0x200801
push 2
push str.regexpi
push esi
call fcn.0043a2a0
add esp, 0x20
mov dword [esp + 0x1c], edi
mov edi, dword [edi]
xor ebx, ebx
mov esi, 0x51ce10
nop dword [eax]
push 0
push 0
push dword [esi + 4]
push esi
push 0x200001
push dword [esi - 4]
push dword [esi - 8]
push edi
call fcn.0043a2a0
add esp, 0x20
cmp ebx, 4
ja 0x408009
inc ebx
add esi, 0x10
test eax, eax
je 0x407fe0
mov edi, dword [esp + 0x1c]
mov esi, dword [edi]
call fcn.00438c10
push 0
push 0x53c028
push str.generate_series
push esi
mov esi, edi
call fcn.00437170
add esp, 8
push dword [edi]
call fcn.00403a70
add esp, 0xc
push 0
push 0x53c088
push str.completion
push dword [edi]
call fcn.00437170
add esp, 0x10
push 0
push 0
push 0x4190f0
push 0
push 1
push 3
push str.shell_add_schema
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
push 0
push 0
push 0x419310
push 0
push 1
push 1
push str.shell_module_schema
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
push 0
push 0
push 0x419380
push edi
push 1
push 1
push str.shell_putsnl
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
push 0
push 0
push 0x4193c0
push 0
push 1
push 1
push str.shell_escape_crnl
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
push 0
push 0
push 0x419790
push 0
push 1
push 2
push str.shell_int32
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
push 0
push 0
push 0x4197f0
push 0
push 1
push 1
push str.shell_idquote
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
push 0
push 0
push 0x419830
push 0
push 1
push 1
push str.usleep
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
push 0
push 0
push 0x419870
push 0
push 1
push 1
push str.edit
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
push 0
push 0
push 0x419870
push 0
push 1
push 2
push str.edit
push dword [edi]
call fcn.0043a2a0
add esp, 0x20
movzx eax, byte [edi + 9]
movzx ecx, al
lea edx, [ecx - 5]
cmp edx, 2
jae 0x4081f1
mov dword [esp + 0x20], 0
cmp al, 5
mov ecx, dword [esp + 0x10]
jne 0x408240
lea edx, [esp + 0x20]
call fcn.00419c30
mov edx, dword [esp + 0x20]
mov ecx, edx
sar ecx, 0x1f
push 3
push ecx
push edx
push ecx
push edx
push eax
push 0x51db42
push dword [esi]
call fcn.0042d270
add esp, 0x20
test eax, eax
je 0x4081c7
mov edi, eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push edi
push str.Error:_sqlite3_deserialize___returns__d_n
push eax
call fcn.004014c0
add esp, 0xc
mov eax, dword [esi + 0x7c]
cmp dword [esi + 0x78], 1
sbb eax, 0
jl 0x407e56
lea eax, [esi + 0x78]
push eax
push 0x24
push 0x51db42
push dword [esi]
call fcn.0043d690
add esp, 0x10
jmp 0x407e56
cmp ecx, 3
mov eax, dword [esp + 0x10]
jne 0x407e56
push eax
push str.CREATE_VIRTUAL_TABLE_zip_USING_zipfile__Q__
call fcn.00428600
add esp, 8
test eax, eax
je 0x4086de
mov edi, eax
push 0
push 0
push 0
push eax
push dword [esi]
call fcn.00435e30
add esp, 0x14
push edi
call fcn.00424f10
add esp, 4
jmp 0x407e56
mov eax, dword [esi + 0x30]
or eax, 1
jmp 0x407ecb
mov dword [esp + 0x14], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 0x260]
mov edi, dword [eax + 4]
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x60], xmm0
movdqa xmmword [esp + 0x50], xmm0
movdqa xmmword [esp + 0x40], xmm0
movdqa xmmword [esp + 0x30], xmm0
lea eax, [esp + 0x74]
push 0x3e8
push 0xff
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
test edi, edi
je 0x4082ba
push 0x51e453
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
test eax, eax
je 0x408604
xor ebx, ebx
jmp 0x4082cf
mov ebx, dword [esi + 0x2c]
mov eax, dword [esi + 0x34]
test eax, eax
jne 0x4082cf
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov dword [esp + 0x10], eax
push eax
push 0x3e8
lea edi, [esp + 0x7c]
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
mov dword [esp + 0x18], 0
test eax, eax
je 0x408633
lea eax, [esp + 0x28]
lea ecx, [esp + 0x14]
push eax
push ecx
push str._size__d_pagesize__d
push edi
call fcn.0041a570
add esp, 0x10
cmp eax, 2
jne 0x408633
mov ecx, dword [esp + 0x14]
test ecx, ecx
js 0x408633
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x200]
cmp edx, 0xfe00
ja 0x408633
mov esi, eax
shr esi, 1
and esi, 0x55555555
mov edx, eax
sub edx, esi
mov esi, edx
and esi, 0x33333333
shr edx, 2
and edx, 0x33333333
add edx, esi
mov esi, edx
shr esi, 4
add esi, edx
and esi, 0xf0f0f0f
imul edx, esi, 0x1010101
mov esi, dword [esp + 0x1c]
shr edx, 0x18
cmp edx, 1
ja 0x408633
add ecx, eax
dec ecx
neg eax
and eax, ecx
mov dword [esp + 0x14], eax
mov ecx, 1
cmovne ecx, eax
push ecx
call fcn.00424d00
add esp, 4
test eax, eax
je 0x4086de
push dword [esp + 0x14]
push 0
mov dword [esp + 0x20], eax
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov eax, dword [esp + 0x28]
lea ecx, [eax - 0x200]
cmp ecx, 0xfe00
ja 0x40861a
mov ecx, eax
shr ecx, 1
and ecx, 0x55555555
sub eax, ecx
mov ecx, eax
and ecx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, ecx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
imul eax, ecx, 0x1010101
shr eax, 0x18
cmp eax, 2
jae 0x40861a
add ebx, 2
push dword [esp + 0x10]
push 0x3e8
lea eax, [esp + 0x7c]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
test eax, eax
je 0x4086af
mov dword [esp + 0x2c], 0
lea edi, [esp + 0x74]
jmp 0x40845d
mov eax, dword [esp + 0xc]
mov dword [esp + 0x2c], eax
inc ebx
push dword [esp + 0x10]
push 0x3e8
lea edi, [esp + 0x7c]
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
test eax, eax
je 0x4086af
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x28]
push eax
push str._page__d_offset__d
push edi
call fcn.0041a570
add esp, 0x10
cmp eax, 2
je 0x408436
mov eax, dword [esp + 0x74]
mov ecx, 0x6e65207c
xor eax, ecx
movzx ecx, word [esp + 0x78]
xor ecx, 0x2064
or ecx, eax
je 0x4086af
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x64]
push eax
push str.__d:__x__x__x__x__x__x__x__x__x__x__x__x__x__x__x__x
lea eax, [esp + 0xbc]
push eax
call fcn.0041a570
add esp, 0x4c
cmp eax, 0x11
jne 0x40843e
mov ecx, dword [esp + 0x24]
mov eax, ecx
mov edi, dword [esp + 0x2c]
add eax, edi
mov dword [esp + 0xc], eax
mov edx, dword [esp + 0x18]
js 0x40843e
add ecx, edi
add ecx, 0x10
cmp ecx, dword [esp + 0x14]
jg 0x40843e
movzx ecx, byte [esp + 0x30]
mov byte [edx + eax], cl
movzx eax, byte [esp + 0x34]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 1], al
movzx eax, byte [esp + 0x38]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 2], al
movzx eax, byte [esp + 0x3c]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 3], al
movzx eax, byte [esp + 0x40]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 4], al
movzx eax, byte [esp + 0x44]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 5], al
movzx eax, byte [esp + 0x48]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 6], al
movzx eax, byte [esp + 0x4c]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 7], al
movzx eax, byte [esp + 0x50]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 8], al
movzx eax, byte [esp + 0x54]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 9], al
movzx eax, byte [esp + 0x58]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 0xa], al
movzx eax, byte [esp + 0x5c]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 0xb], al
movzx eax, byte [esp + 0x60]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 0xc], al
movzx eax, byte [esp + 0x64]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 0xd], al
movzx eax, byte [esp + 0x68]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 0xe], al
movzx eax, byte [esp + 0x6c]
mov ecx, dword [esp + 0xc]
mov byte [ecx + edx + 0xf], al
jmp 0x40843e
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push edi
push str.cannot_open___s__for_reading_n
jmp 0x4086a4
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push str.invalid_pagesize_n
push eax
call fcn.004014c0
add esp, 8
inc ebx
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 0x34]
je 0x408648
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
jmp 0x408687
mov esi, 0x6e65207c
mov eax, dword [esp + 0x1c]
push dword [eax + 0x34]
push 0x3e8
lea eax, [esp + 0x7c]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
test eax, eax
je 0x408680
inc ebx
mov eax, dword [esp + 0x74]
xor eax, esi
movzx ecx, word [esp + 0x78]
xor ecx, 0x2064
or ecx, eax
jne 0x40864d
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x2c], ebx
push dword [esp + 0x18]
call fcn.00424f10
add esp, 4
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push ebx
push str.Error_on_line__d_of___hexdb_input_n
push eax
call fcn.004014c0
jmp 0x407e76
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 0x34]
je 0x4086cb
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
jmp 0x4086ce
mov dword [esi + 0x2c], ebx
mov eax, dword [esp + 0x18]
jmp 0x408188
push 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 1
push 0x15
push str.Error:_out_of_memory_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
push 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
nop word cs:[eax + eax]