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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x60
mov eax, dword [esp + 0x7c]
mov esi, dword [esp + 0x78]
mov ebx, dword [esp + 0x74]
cmp edx, 0x101
jb 0x40d88a
cmp byte [ecx + 0x100], 0xbf
mov edi, pe_nt_image_headers32
jg 0x40d877
cmp byte [ecx + 0xff], 0xbf
mov edi, 0xff
jg 0x40d877
cmp byte [ecx + 0xfe], 0xbf
mov edi, 0xfe
jg 0x40d877
cmp byte [ecx + 0xfd], 0xbf
mov edi, 0xfd
jle 0x40da6d
mov dword [esp], ecx
mov dword [esp + 4], edi
mov edi, 5
mov ebp, str._..._begin___end____when_slicing___
jmp 0x40d898
mov dword [esp], ecx
mov dword [esp + 4], edx
xor edi, edi
mov ebp, 0x4e7238
cmp ebx, edx
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], edi
ja 0x40d918
cmp esi, edx
ja 0x40d918
cmp ebx, esi
jbe 0x40d984
lea ecx, [esp + 0x74]
lea esi, [esp + 0x78]
mov edx, esp
mov dword [esp + 0xc], 0x4989a8
mov dword [esp + 0x10], 4
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], fcn.00409880
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], fcn.00409880
mov dword [esp + 0x34], edx
lea edx, [esp + 0x24]
lea esi, [esp + 0x4c]
mov dword [esp + 0x38], 0x40a180
mov dword [esp + 0x3c], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x40], 0x40a180
mov dword [esp + 0x18], 4
jmp 0x40d977
cmp ebx, edx
lea ecx, [esp + 0x54]
mov edx, esp
mov dword [esp + 0xc], 0x498a48
mov dword [esp + 0x10], 3
mov dword [esp + 0x1c], 0
cmova esi, ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], fcn.00409880
mov dword [esp + 0x2c], edx
lea edx, [esp + 0x24]
mov dword [esp + 0x30], 0x40a180
mov dword [esp + 0x54], esi
lea esi, [esp + 0x4c]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 3
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], 0x40a180
lea ecx, [esp + 0xc]
mov edx, eax
call fcn.00493a60
ud2
test ebx, ebx
je 0x40d992
cmp ebx, edx
jae 0x40d992
cmp byte [ecx + ebx], 0xc0
jl 0x40d994
mov ebx, esi
cmp ebx, edx
mov esi, edx
mov dword [esp + 0x5c], ebx
jae 0x40d9df
mov edi, ebx
xor esi, esi
sub edi, 3
cmovb edi, esi
lea esi, [ebx + 1]
cmp edi, esi
jbe 0x40d9c2
mov ecx, edi
mov edx, esi
push 0x498a7c
call fcn.00493d80
add esp, 4
ud2
add esi, ecx
add ebx, ecx
sub esi, ecx
sub esi, edi
nop word [eax + eax]
test esi, esi
je 0x40d9dd
dec esi
cmp byte [ebx], 0xc0
lea ebx, [ebx - 1]
jl 0x40d9d0
add esi, edi
test esi, esi
jne 0x40d9e7
mov edi, edx
jmp 0x40d9fa
mov edi, edx
sub edi, esi
jbe 0x40d9f8
cmp byte [ecx + esi], 0xbf
jg 0x40d9fa
push eax
push edx
push esi
jmp 0x40da75
jne 0x40d9f3
test edi, edi
jne 0x40da13
mov ecx, str.called__Option::unwrap____on_a__None__value
mov edx, 0x2b
push eax
call fcn.00493be0
add esp, 4
ud2
movzx ebx, byte [ecx + esi]
movzx edx, bl
test bl, bl
js 0x40da2c
mov dword [esp + 8], edx
mov edx, 1
jmp 0x40dabb
movzx ebp, byte [ecx + esi + 1]
and edx, 0x1f
and ebp, 0x3f
cmp bl, 0xdf
jbe 0x40da7f
movzx edi, byte [ecx + esi + 2]
shl ebp, 6
and edi, 0x3f
or edi, ebp
cmp bl, 0xf0
jb 0x40da88
movzx ecx, byte [ecx + esi + 3]
and edx, 7
shl edi, 6
shl edx, 0x12
and ecx, 0x3f
or ecx, edi
or ecx, edx
cmp ecx, 0x110000
je 0x40d9fe
jmp 0x40da8f
push eax
push 0xfd
push 0
call fcn.00494080
add esp, 0xc
ud2
shl edx, 6
or edx, ebp
mov ecx, edx
jmp 0x40da8f
shl edx, 0xc
or edi, edx
mov ecx, edi
mov edx, 1
cmp ecx, 0x80
mov dword [esp + 8], ecx
jb 0x40dabb
mov edx, 2
cmp ecx, 0x800
jb 0x40dabb
cmp ecx, 0x10000
mov edx, 4
sbb edx, 0
add edx, esi
mov dword [esp + 0x54], esi
lea ecx, [esp + 0x5c]
lea esi, [esp + 0x54]
mov dword [esp + 0xc], 0x498a08
mov dword [esp + 0x10], 5
mov dword [esp + 0x1c], 0
mov dword [esp + 0x58], edx
lea edx, [esp + 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], fcn.00409880
mov dword [esp + 0x2c], edx
mov edx, esp
mov dword [esp + 0x30], 0x40db40
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], 0x40dc50
lea esi, [esp + 0x4c]
mov dword [esp + 0x3c], edx
lea edx, [esp + 0x24]
mov dword [esp + 0x40], 0x40a180
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], 0x40a180
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 5
jmp 0x40d977