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

Disassembly:
push ebp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0xdc
mov edx, dword [eax + 8]
test esi, esi
js 0x40d332
lea ebp, [esi + 1]
cmp ebp, edx
jg 0x40d332
mov ebx, eax
mov eax, dword [eax]
lea edi, [edx - 1]
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x10]
and eax, 3
cmp eax, 3
je 0x40d300
test edi, edi
jne 0x40d2f0
mov dword [esp + 0x1c], 1
mov ecx, edx
test ecx, ecx
js 0x40d4be
mov eax, 0
je 0x40d28f
mov edx, 1
mov eax, ecx
call fcn.00404350
mov edx, dword [ebx + 0x14]
imul edx, esi
mov ecx, dword [esp + 0x18]
mov dword [ebx], eax
not esi
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x14]
add esi, dword [ebx + 8]
imul ebp, edx
imul esi, edx
mov eax, ebp
add ebp, dword [esp + 0x18]
sub eax, edx
add eax, dword [ebx]
mov dword [esp + 8], esi
mov dword [esp + 4], ebp
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x1c]
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], eax
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, edi
mov dword [esp + 0x1c], edi
imul ecx, edx
jmp 0x40d271
sub edi, esi
imul ebp, edx
imul edi, edx
mov dword [esp + 8], edi
mov edi, dword [esp + 0x18]
lea eax, [edi + ebp]
sub ebp, edx
add ebp, edi
mov dword [esp + 4], eax
mov dword [esp], ebp
call sub.msvcrt.dll_memmove
sub dword [ebx + 8], 1
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
lea edi, [esp + 0x64]
mov ecx, 0x1b
mov dword [esp + 0x60], esi
rep stosd dword es:[edi], eax
mov eax, 0x100
mov dword [esp + 0x50], str.array.delete:_index_out_of_range__i_
mov dword [esp + 0x54], 0x27
mov dword [esp + 0x58], 1
mov dword [esp + 0x5c], 0xfe07
mov dword [esp + 0x70], 0x4250a8
mov dword [esp + 0x78], 1
mov dword [esp + 0x7c], 0xfe10
mov dword [esp + 0x80], 0x4250a8
mov dword [esp + 0x88], 1
mov dword [esp + 0x90], str.__a.len_
mov dword [esp + 0x94], 0xb
mov dword [esp + 0x98], 1
mov dword [esp + 0x9c], 0xfe07
mov dword [esp + 0xa0], edx
mov dword [esp + 0xb0], 0x42596c
mov dword [esp + 0xb4], 1
mov dword [esp + 0xb8], 1
call fcn.00407230
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0x100
mov dword [esp + 0x48], 1
mov dword [esp + 0x4c], 1
test ecx, ecx
jne 0x40d57a
cmp dword [esp + 0x5c], 0
jne 0x40d568
mov ecx, dword [esp + 0x74]
test ecx, ecx
jne 0x40d548
cmp dword [esp + 0x7c], 0
jne 0x40d536
mov ecx, dword [esp + 0x94]
test ecx, ecx
jne 0x40d513
cmp dword [esp + 0x9c], 0
jne 0x40d4fe
mov ecx, dword [esp + 0xb4]
test ecx, ecx
jne 0x40d4e3
cmp dword [esp + 0xbc], 0
jne 0x40d4d1
lea edx, [esp + 0x2b]
lea eax, [esp + 0x38]
mov byte [esp + 0x2b], 0
call fcn.004087b0
mov ebx, dword [esp + 0x40]
test ebx, ebx
je 0x40d4c5
mov esi, dword [esp + 0x38]
mov eax, ebx
call fcn.00406be0
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edi, dword [esp + 0x40]
xor ecx, ecx
lea edx, [edi - 1]
call fcn.00406aa0
mov eax, ecx
call fcn.00407380
mov eax, 1
call fcn.00407230
jmp 0x40d4b0
lea edx, [esp + 0x38]
lea eax, [esp + 0xb0]
call fcn.00404800
jmp 0x40d47b
mov edx, dword [esp + 0xb0]
jle 0x40d471
test edx, edx
je 0x40d471
lea eax, [esp + 0x38]
call fcn.004075a0
jmp 0x40d471
lea edx, [esp + 0x38]
lea eax, [esp + 0x90]
call fcn.00404800
jmp 0x40d466
mov edx, dword [esp + 0x90]
jle 0x40d458
test edx, edx
je 0x40d458
lea eax, [esp + 0x38]
call fcn.004075a0
jmp 0x40d458
lea edx, [esp + 0x38]
lea eax, [esp + 0x70]
call fcn.00404800
jmp 0x40d449
mov edx, dword [esp + 0x70]
jle 0x40d43e
test edx, edx
je 0x40d43e
lea eax, [esp + 0x38]
call fcn.004075a0
jmp 0x40d43e
lea edx, [esp + 0x38]
lea eax, [esp + 0x50]
call fcn.00404800
jmp 0x40d432
mov edx, dword [esp + 0x50]
test edx, edx
je 0x40d427
test ecx, ecx
jle 0x40d427
lea eax, [esp + 0x38]
call fcn.004075a0
jmp 0x40d427