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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xec
mov eax, dword [0x4a2100]
mov edi, dword [esp + 0x108]
mov ebx, dword [esp + 0x100]
mov dword [esp + 0x18], eax
test edi, edi
je 0x40e752
mov eax, dword [esp + 0x108]
mov dword [eax], 0
movzx eax, byte [ebx + 0x2c]
test al, 8
je 0x40ea70
and eax, 7
cmp al, 3
ja 0x40ea70
test al, al
jne 0x40eb30
mov esi, dword [esp + 0x108]
test esi, esi
je 0x40eb70
mov eax, dword [0x4c0360]
shl eax, 3
mov dword [esp], eax
call fcn.0040fef0
test eax, eax
mov esi, eax
je 0x40ee29
mov edx, dword [0x4a2100]
movzx eax, byte [ebx + 0x2c]
movzx ecx, byte [esp + 0x104]
mov dword [esp + 0x74], edx
mov dword [esp + 0x9c], 0
and ecx, 7
and eax, 0xfffffff8
or eax, ecx
mov byte [ebx + 0x2c], al
mov eax, dword [ebx + 4]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0xb8]
mov dword [esp + 0x5c], eax
mov eax, dword [ebx + 0x90]
mov dword [esp + 0x64], eax
mov eax, dword [ebx + 0x28]
mov dword [esp + 0x60], eax
mov eax, dword [ebx + 0x64]
mov dword [esp + 0x68], eax
mov eax, dword [ebx + 0x68]
mov dword [esp + 0x6c], eax
mov eax, dword [ebx + 0x6c]
mov dword [esp + 0x70], eax
mov eax, dword [ebx + 0x48]
mov dword [esp + 0x78], eax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x7c], eax
mov eax, dword [ebx + 0x50]
mov dword [esp + 0x80], eax
mov eax, dword [ebx + 0x54]
mov dword [esp + 0x84], eax
mov eax, dword [ebx + 0x58]
mov dword [esp + 0x88], eax
mov eax, dword [ebx + 0x5c]
mov dword [esp + 0x8c], eax
mov eax, dword [ebx + 0x60]
mov dword [esp + 0x90], eax
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.00411720
mov edx, dword [ebx + 0xc4]
test eax, eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x98], 0
mov dword [esp + 0x94], edx
je 0x40ea91
lea eax, [ebx + 0x48]
mov dword [esp + 8], 0xc0
mov dword [esp + 4], fcn.004125c0
mov dword [esp], eax
mov dword [esp + 0x44], eax
call fcn.0040f2c0
test al, al
mov byte [esp + 0x23], al
je 0x40ea91
test byte [ebx + 0x2c], 0x40
je 0x40ed8f
mov eax, dword [0x4c0360]
mov ebp, dword [0x4c036c]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp]
test eax, eax
je 0x40f020
lea ecx, [esp + 0x58]
xor edi, edi
mov dword [esp + 0x24], 0x100
mov dword [esp + 0x38], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x40], edi
jmp 0x40e923
jle 0x40f08d
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x40eb90
add ebp, 4
mov eax, dword [ebp]
test eax, eax
je 0x40ec89
cmp eax, 0x4c0400
je 0x40e915
cmp eax, 0x4c9820
jne 0x40e939
mov edx, dword [esp + 0x1c]
test edx, edx
jne 0x40e915
test byte [ebx + 0x2c], 0x40
jne 0x40e945
cmp dword [esp + 0x28], eax
je 0x40e915
mov eax, dword [esp + 0x18]
test edi, edi
mov dword [0x4a2100], eax
je 0x40e957
mov dword [esp], ebx
call edi
and dword [ebx + 0x28], 0xfd800
mov dword [ebx + 0xb8], 0
lea esi, [esp + 0x9c]
mov dword [ebx + 0x90], 0x4beba0
mov dword [ebx + 0xc4], 0
mov dword [esp], ebx
call fcn.004126a0
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x40eb20
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00411ac0
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.00411720
mov dword [esi], eax
mov eax, dword [ebp]
mov dword [ebx + 4], eax
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], ebx
call fcn.0040c6f0
test eax, eax
jne 0x40ee1c
movzx eax, byte [ebx + 0x2c]
mov edx, dword [ebx + 4]
mov dword [esp], ebx
and eax, 7
call dword [edx + eax*4 + 0x68]
test eax, eax
mov edi, eax
je 0x40e915
mov ecx, dword [ebx + 4]
cmp dword [ebp], 0x4c9820
movzx eax, byte [0x4c983b]
movzx edx, byte [ecx + 0x1b]
cmove edx, eax
movzx eax, byte [ebx + 0x2c]
and eax, 7
cmp al, 2
je 0x40eae5
cmp ecx, dword [0x4a23e0]
je 0x40ee33
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40ea43
mov esi, dword [esp + 0x1c]
mov dword [eax + esi*4], ecx
add dword [esp + 0x1c], 1
cmp edx, dword [esp + 0x24]
jge 0x40e900
mov dword [esp + 0x38], 1
mov eax, dword [ebx + 4]
mov dword [esp + 0x24], edx
mov dword [esp + 0x40], eax
jmp 0x40e906
mov dword [esp], 5
call fcn.0040a580
mov byte [esp + 0x23], 0
movzx eax, byte [esp + 0x23]
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x58]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x28]
and byte [ebx + 0x2c], 0xf8
mov dword [ebx + 4], eax
mov dword [esp], esi
call fcn.0049fa48
mov esi, dword [esp + 0x9c]
test esi, esi
je 0x40eac5
lea edx, [esp + 0x9c]
mov eax, ebx
call fcn.0040e630
mov edx, dword [esp + 0x30]
mov eax, ebx
call fcn.0040e680
mov byte [esp + 0x23], 0
movzx eax, byte [esp + 0x23]
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [ebx + 0x2d], 8
jne 0x40eb50
mov eax, dword [esp + 0x34]
cmp dword [0x4a23e0], eax
je 0x40eafe
mov eax, dword [ebp]
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x40eb10
mov eax, dword [ebp]
mov edx, dword [esp + 0x3c]
mov dword [ecx + edx*4], eax
add dword [esp + 0x3c], 1
jmp 0x40e906
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x30]
jmp 0x40e99a
movzx eax, al
cmp eax, dword [esp + 0x104]
sete byte [esp + 0x23]
movzx eax, byte [esp + 0x23]
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x4c], edx
call fcn.0040a280
cmp eax, 4
je 0x40eaeb
mov ecx, dword [ebx + 4]
mov edx, dword [esp + 0x4c]
jmp 0x40ea28
mov eax, dword [0x4c0364]
mov ecx, dword [eax]
test ecx, ecx
jne 0x40e780
mov edx, dword [esp + 0x18]
xor esi, esi
jmp 0x40e7a0
mov eax, dword [ebx + 4]
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 0xb8]
mov dword [esp + 0xa0], eax
mov eax, dword [ebx + 0x90]
mov dword [esp + 0xa8], eax
mov eax, dword [ebx + 0x28]
mov dword [esp + 0xa4], eax
mov eax, dword [ebx + 0x64]
mov dword [esp + 0xac], eax
mov eax, dword [ebx + 0x68]
mov dword [esp + 0xb0], eax
mov eax, dword [ebx + 0x6c]
mov dword [esp + 0xb4], eax
mov eax, dword [0x4a2100]
mov dword [esp + 0xb8], eax
mov eax, dword [ebx + 0x48]
mov dword [esp + 0xbc], eax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0xc0], eax
mov eax, dword [ebx + 0x50]
mov dword [esp + 0xc4], eax
mov eax, dword [ebx + 0x54]
mov dword [esp + 0xc8], eax
mov eax, dword [ebx + 0x58]
mov dword [esp + 0xcc], eax
mov eax, dword [ebx + 0x5c]
mov dword [esp + 0xd0], eax
mov eax, dword [ebx + 0x60]
mov dword [esp + 4], 1
mov dword [esp], ebx
mov dword [esp + 0xd4], eax
call fcn.00411720
mov edx, dword [ebx + 0xc4]
test eax, eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xdc], edi
mov dword [esp + 0xd8], edx
je 0x40ee39
mov eax, dword [esp + 0x44]
mov dword [esp + 8], 0xc0
mov dword [esp + 4], fcn.004125c0
mov dword [esp], eax
call fcn.0040f2c0
test al, al
je 0x40ee39
xor edi, edi
jmp 0x40e915
cmp dword [esp + 0x38], 1
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x40]
je 0x40ed29
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x40ef09
mov eax, dword [esp + 0x34]
cmp dword [0x4a23e0], eax
je 0x40efaa
mov eax, dword [esp + 0x3c]
sub eax, dword [0x4c0360]
test esi, esi
mov dword [esp + 0x1c], eax
je 0x40ecd7
cmp eax, 1
jg 0x40ef86
cmp dword [esp + 0x1c], 1
jle 0x40f09b
mov dword [esp + 0x100], ebx
mov ecx, dword [0x4c0364]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
mov esi, esi
lea edi, [edi]
add ecx, 4
mov edi, dword [ecx - 4]
test edi, edi
je 0x40f0b2
mov eax, ebp
sub eax, 1
js 0x40ed00
cmp edi, dword [esi + eax*4]
jne 0x40ed10
movzx edx, byte [edi + 0x1b]
cmp edx, ebx
jg 0x40ed10
mov ebx, dword [esp + 0x100]
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x1c], 1
test eax, eax
je 0x40ee46
lea edx, [esp + 0x9c]
mov eax, ebx
call fcn.0040e680
mov dword [esp + 0x2c], eax
cmp dword [esp + 0x1c], 1
je 0x40ee46
mov ebp, dword [esp + 0x1c]
test ebp, ebp
jne 0x40ef21
mov dword [esp], 0xc
call fcn.0040a580
mov edi, dword [esp + 0x2c]
test edi, edi
je 0x40ea99
mov dword [esp], ebx
mov eax, dword [esp + 0x2c]
call eax
jmp 0x40ea99
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], ebx
call fcn.0040c6f0
lea ecx, [esp + 0x58]
test eax, eax
mov dword [esp + 0x30], ecx
jne 0x40ea99
movzx eax, byte [ebx + 0x2c]
mov edx, dword [ebx + 4]
mov dword [esp], ebx
and eax, 7
call dword [edx + eax*4 + 0x68]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x40f055
movzx eax, byte [ebx + 0x2c]
and eax, 0x18
cmp al, 0x18
je 0x40ef00
mov dword [esp], esi
call fcn.0049fa48
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x40ee0c
lea edx, [esp + 0x9c]
mov eax, ebx
call fcn.0040e630
mov edx, dword [esp + 0x30]
mov eax, ebx
call fcn.0040e630
jmp 0x40ea81
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x2c], edi
jmp 0x40ed75
mov byte [esp + 0x23], 0
jmp 0x40ea81
mov esi, dword [esp + 0x2c]
jmp 0x40eddc
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x2c], edi
jmp 0x40ed81
cmp dword [esp + 0x48], edi
mov dword [ebx + 4], edi
je 0x40eddc
mov eax, dword [esp + 0x18]
mov dword [0x4a2100], eax
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40efb3
mov dword [esp], ebx
call eax
and dword [ebx + 0x28], 0xfd800
mov dword [ebx + 0xb8], 0
mov dword [ebx + 0x90], 0x4beba0
mov dword [ebx + 0xc4], 0
mov dword [esp], ebx
call fcn.004126a0
mov eax, dword [esp + 0x58]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00411ac0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], ebx
call fcn.0040c6f0
test eax, eax
jne 0x40ed81
movzx eax, byte [ebx + 0x2c]
mov edx, dword [ebx + 4]
mov dword [esp], ebx
and eax, 7
call dword [edx + eax*4 + 0x68]
test eax, eax
jne 0x40eddc
mov dword [esp + 4], 0x1ec
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_format.c
call fcn.0040a4d0
jmp 0x40eddc
or byte [ebx + 0x2d], 4
jmp 0x40edeb
mov dword [esp + 0x34], edi
jmp 0x40ecd7
mov edx, dword [esp + 0x9c]
test edx, edx
jne 0x40ed40
and byte [ebx + 0x2c], 0xf8
mov eax, dword [esp + 0x28]
mov dword [ebx + 4], eax
mov dword [esp], 0xd
call fcn.0040a580
mov ecx, dword [esp + 0x108]
test ecx, ecx
je 0x40f080
mov eax, dword [esp + 0x108]
mov dword [eax], esi
mov eax, dword [esp + 0x1c]
mov dword [esi + eax*4], 0
sub eax, 1
js 0x40ef70
mov edx, dword [esi + eax*4]
mov edx, dword [edx]
mov dword [esi + eax*4], edx
sub eax, 1
cmp eax, 0xffffffff
jne 0x40ef60
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40eaac
mov dword [esp], ebx
call eax
jmp 0x40eaac
lea edx, [eax*4]
mov eax, dword [0x4c0360]
mov dword [esp], esi
mov dword [esp + 8], edx
lea eax, [esi + eax*4]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
jmp 0x40ece2
mov edi, dword [esp + 0x34]
jmp 0x40ed29
and dword [ebx + 0x28], 0xfd800
mov dword [ebx + 0xb8], 0
mov dword [ebx + 0x90], 0x4beba0
mov dword [ebx + 0xc4], 0
mov dword [esp], ebx
call fcn.004126a0
mov eax, dword [esp + 0x58]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00411ac0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], ebx
call fcn.0040c6f0
test eax, eax
je 0x40eece
jmp 0x40ea99
lea eax, [esp + 0x58]
mov dword [esp + 0x38], 0
mov dword [esp + 0x24], 0x100
mov dword [esp + 0x2c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], eax
jmp 0x40ecac
cmp dword [esp + 0x104], 2
jne 0x40e8a6
cmp dword [esp + 0x28], 0x4c0400
jne 0x40e8a6
jmp 0x40ed69
mov dword [esp], esi
call fcn.0049fa48
jmp 0x40ef70
add dword [esp + 0x38], 1
mov edx, dword [esp + 0x24]
jmp 0x40ea5a
cmp dword [esp + 0x9c], 0
mov edi, dword [esp + 0x34]
jne 0x40ed40
jmp 0x40ed52
test esi, esi
mov ebx, dword [esp + 0x100]
je 0x40f0ec
mov ebp, dword [esp + 0x1c]
cmp dword [esp + 0x38], ebp
je 0x40ef12
mov ecx, dword [esp + 0x24]
xor eax, eax
mov edi, dword [esi + eax*4]
movzx edx, byte [edi + 0x1b]
cmp edx, ecx
jle 0x40ed29
add eax, 1
cmp eax, ebp
jl 0x40f0d1
jmp 0x40ed29
cmp dword [esp + 0x9c], 0
jne 0x40ed40
jmp 0x40ed5d